| @@ -1,57 +1,0 @@ | ||
| 1 | -<?php | |
| 2 | -// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. | |
| 3 | -defined('ABSPATH') || die('Restricted Access'); | |
| 4 | -?> | |
| 5 | -<div id="acym__users__import__from_database" class="grid-x padding-vertical-2 padding-horizontal-2"> | |
| 6 | - <div class="cell large-3"></div> | |
| 7 | - <div class="cell large-6 grid-x margin-y"> | |
| 8 | - <label class="cell medium-4" for="acym__users__import__from_database__field--tablename"><?php echo esc_html(acym_translation('ACYM_TABLE_NAME')); ?></label> | |
| 9 | - <?php | |
| 10 | - echo '<div class="cell medium-8">'; | |
| 11 | - array_unshift($data['tables'], acym_translation('ACYM_SELECT_TABLE')); | |
| 12 | - acym_select( | |
| 13 | - $data['tables'], | |
| 14 | - 'tablename', | |
| 15 | - null, | |
| 16 | - [ | |
| 17 | - 'class' => 'acym__select', | |
| 18 | - ], | |
| 19 | - 'value', | |
| 20 | - 'name', | |
| 21 | - 'acym__users__import__from_database__field--tablename', | |
| 22 | - false, | |
| 23 | - true | |
| 24 | - ); | |
| 25 | - echo '</div>'; | |
| 26 | - | |
| 27 | - $userFields = acym_getColumns('user'); | |
| 28 | - if (!empty($userFields)) { | |
| 29 | - foreach ($userFields as $oneUserField) { | |
| 30 | - if (!in_array($oneUserField, ['id', 'key', 'automation'])) { | |
| 31 | - echo '<label class="cell medium-4" for="acym__users__import__from_database__field--'.esc_attr($oneUserField).'">'.esc_html($oneUserField).'</label>'; | |
| 32 | - echo '<div class="cell medium-8">'; | |
| 33 | - echo '<select acym-data-infinite class="acym__users__import__from_database__fields acym__select" name="fields['.esc_attr( | |
| 34 | - $oneUserField | |
| 35 | - ).']" id="acym__users__import__from_database__field--'.esc_attr($oneUserField).'"></select>'; | |
| 36 | - echo '</div>'; | |
| 37 | - } | |
| 38 | - } | |
| 39 | - } | |
| 40 | - if ($this->config->get('require_confirmation')) { ?> | |
| 41 | - <div class="cell grid-x"> | |
| 42 | - <?php acym_switch(['name' => 'import_confirmed_database', 'value' => 1, 'label' => acym_translation('ACYM_IMPORT_USERS_AS_CONFIRMED')]); ?> | |
| 43 | - </div> | |
| 44 | - <?php } ?> | |
| 45 | - | |
| 46 | - <div class="cell grid-x grid-margin-x"> | |
| 47 | - <div class="cell hide-for-small-only medium-auto"></div> | |
| 48 | - <?php acym_cancelButton('ACYM_CANCEL', '', 'button medium-6 large-shrink margin-bottom-0'); ?> | |
| 49 | - <button type="button" class="button cell medium-shrink margin-bottom-0" data-open="acym__user__import__add-subscription__modal" data-from="database"> | |
| 50 | - <?php echo esc_html(acym_translation('ACYM_IMPORT')); ?> | |
| 51 | - </button> | |
| 52 | - <button id="submit_import_database" class="acym__import__submit is-hidden" data-from="database"></button> | |
| 53 | - <div class="cell hide-for-small-only medium-auto"></div> | |
| 54 | - </div> | |
| 55 | - </div> | |
| 56 | - <div class="cell large-3"></div> | |
| 57 | -</div> | |