| 1 |
<div id="acym__users__import__from_database" class="grid-x padding-vertical-2 padding-horizontal-2"> |
| 2 |
<div class="cell large-3"></div> |
| 3 |
<div class="cell large-6 grid-x margin-y"> |
| 4 |
<label class="cell medium-4" for="acym__users__import__from_database__field--tablename"><?php echo acym_translation('ACYM_TABLE_NAME'); ?></label> |
| 5 |
<?php |
| 6 |
echo '<div class="cell medium-8">'; |
| 7 |
array_unshift($data['tables'], acym_translation('ACYM_SELECT_TABLE')); |
| 8 |
echo acym_select( |
| 9 |
$data['tables'], |
| 10 |
'tablename', |
| 11 |
null, |
| 12 |
[ |
| 13 |
'class' => 'acym__select', |
| 14 |
], |
| 15 |
'value', |
| 16 |
'name', |
| 17 |
'acym__users__import__from_database__field--tablename' |
| 18 |
); |
| 19 |
echo '</div>'; |
| 20 |
|
| 21 |
$userFields = acym_getColumns('user'); |
| 22 |
if (!empty($userFields)) { |
| 23 |
foreach ($userFields as $oneUserField) { |
| 24 |
if (!in_array($oneUserField, ['id', 'key', 'automation'])) { |
| 25 |
echo '<label class="cell medium-4" for="acym__users__import__from_database__field--'.$oneUserField.'">'.$oneUserField.'</label>'; |
| 26 |
echo '<div class="cell medium-8">'; |
| 27 |
echo '<select acym-data-infinite class="acym__users__import__from_database__fields acym__select" name="fields['.$oneUserField.']" id="acym__users__import__from_database__field--'.$oneUserField.'"></select>'; |
| 28 |
echo '</div>'; |
| 29 |
} |
| 30 |
} |
| 31 |
} |
| 32 |
if ($this->config->get('require_confirmation')) { ?> |
| 33 |
<div class="cell grid-x"> |
| 34 |
<?php echo acym_switch('import_confirmed_database', 1, acym_translation('ACYM_IMPORT_USERS_AS_CONFIRMED')); ?> |
| 35 |
</div> |
| 36 |
<?php } ?> |
| 37 |
|
| 38 |
<div class="cell grid-x grid-margin-x"> |
| 39 |
<div class="cell hide-for-small-only medium-auto"></div> |
| 40 |
<?php echo acym_cancelButton('ACYM_CANCEL', '', 'button medium-6 large-shrink margin-bottom-0'); ?> |
| 41 |
<button type="button" class="button cell medium-shrink margin-bottom-0" data-open="acym__user__import__add-subscription__modal" data-from="database"> |
| 42 |
<?php echo acym_translation('ACYM_IMPORT'); ?> |
| 43 |
</button> |
| 44 |
<button id="submit_import_database" class="acym__import__submit is-hidden" data-from="database"></button> |
| 45 |
<div class="cell hide-for-small-only medium-auto"></div> |
| 46 |
</div> |
| 47 |
</div> |
| 48 |
<div class="cell large-3"></div> |
| 49 |
</div> |
| 50 |
|