| 1 |
<form id="acym_form" action="<?php echo acym_completeLink(acym_getVar('cmd', 'ctrl')); ?>" method="post" name="acyForm"> |
| 2 |
<?php $data['toolbar']->displayToolbar($data); ?> |
| 3 |
<div id="acym__fields" class="acym__content"> |
| 4 |
<div class="cell acym__listing__actions margin-bottom-1 grid-x"> |
| 5 |
<?php |
| 6 |
$actions = [ |
| 7 |
'setActive' => acym_translation('ACYM_ENABLE'), |
| 8 |
'setInactive' => acym_translation('ACYM_DISABLE'), |
| 9 |
'delete' => acym_translation('ACYM_DELETE'), |
| 10 |
]; |
| 11 |
echo acym_listingActions($actions, acym_translation('ACYM_DELETE_CUSTOM_FIELDS_TYPE_DATE')); |
| 12 |
?> |
| 13 |
</div> |
| 14 |
|
| 15 |
<div class="grid-x acym__listing"> |
| 16 |
<div class="grid-x cell acym__listing__header"> |
| 17 |
<div class="medium-shrink small-1 cell"> |
| 18 |
<input id="checkbox_all" type="checkbox" name="checkbox_all"> |
| 19 |
</div> |
| 20 |
<div class="medium-1 small-1 cell acym__listing__header__title text-center"> |
| 21 |
|
| 22 |
</div> |
| 23 |
<div class="grid-x medium-auto small-8 cell"> |
| 24 |
<div class="medium-4 small-7 cell acym__listing__header__title"> |
| 25 |
<?php echo acym_translation('ACYM_NAME'); ?> |
| 26 |
</div> |
| 27 |
<div class="medium-auto hide-for-small-only cell acym__listing__header__title "> |
| 28 |
<?php echo acym_translation('ACYM_FIELD_TYPE'); ?> |
| 29 |
</div> |
| 30 |
<div class="medium-1 small-3 small-text-right text-center cell acym__listing__header__title"> |
| 31 |
<?php echo acym_translation('ACYM_REQUIRED'); ?> |
| 32 |
</div> |
| 33 |
<div class="medium-1 small-3 hide-for-small-only small-text-right text-center cell acym__listing__header__title"> |
| 34 |
<?php echo acym_translation('ACYM_ACTIVE'); ?> |
| 35 |
</div> |
| 36 |
<div class="medium-1 small-2 text-center cell acym__listing__header__title"> |
| 37 |
<?php echo acym_translationSprintf('ACYM_ID'); ?> |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<div class="acym__sortable__listing cell grid-x" data-sort-ctrl="fields"> |
| 42 |
<?php |
| 43 |
foreach ($data['allFields'] as $field) { |
| 44 |
$generalClass = in_array($field->id, [1, 2, $data['languageFieldId']]) ? ' acym_opacity-5 acym_disabled ' : ' acym_toggleable cursor-pointer '; |
| 45 |
?> |
| 46 |
<div class="grid-x cell align-middle acym__listing__row" data-id-element="<?php echo acym_escape($field->id); ?>"> |
| 47 |
<div class="medium-shrink small-1 cell"> |
| 48 |
<input id="checkbox_<?php echo acym_escape($field->id); ?>" type="checkbox" name="elements_checked[]" value="<?php echo acym_escape($field->id); ?>"> |
| 49 |
</div> |
| 50 |
<div class="medium-1 small-1 cell text-center"> |
| 51 |
<div class="grabbable acym__sortable__listing__handle grid-x"> |
| 52 |
<i class="acymicon-ellipsis-h cell acym__color__dark-gray"></i> |
| 53 |
<i class="acymicon-ellipsis-h cell acym__color__dark-gray"></i> |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
<div class="grid-x medium-auto small-8 cell acym__field__listing"> |
| 57 |
<div class="medium-4 small-7 cell acym__listing__title grid-x"> |
| 58 |
<a href="<?php echo acym_completeLink('fields&task=edit&fieldId='.$field->id); ?>" class="cell auto"> |
| 59 |
<h6><?php echo acym_escape(acym_translation($field->name)); ?></h6> |
| 60 |
</a> |
| 61 |
</div> |
| 62 |
<div class="medium-auto hide-for-small-only cell acym__listing__title "> |
| 63 |
<h6><?php echo acym_translation('ACYM_'.strtoupper(acym_escape($field->type))); ?></h6> |
| 64 |
</div> |
| 65 |
<div class="acym__listing__controls acym__field__controls medium-1 small-3 text-center cell"> |
| 66 |
<?php |
| 67 |
$class = $field->required == 1 ? 'acymicon-check-circle acym__color__green" data-acy-newvalue="0' : 'acymicon-times-circle acym__color__red" data-acy-newvalue="1'; |
| 68 |
echo '<i data-acy-table="field" data-acy-field="required" data-acy-elementid="'.acym_escape( |
| 69 |
$field->id |
| 70 |
).'" class="'.(in_array($field->id, [2, $data['languageFieldId']]) ? ' acym_opacity-5 acym_disabled ' : ' acym_toggleable cursor-pointer ').$class.'"></i>'; |
| 71 |
?> |
| 72 |
</div> |
| 73 |
<div class="acym__listing__controls hide-for-small-only acym__field__controls medium-1 small-1 text-center cell"> |
| 74 |
<?php |
| 75 |
$class = $field->active == 1 ? 'acymicon-check-circle acym__color__green" data-acy-newvalue="0' : 'acymicon-times-circle acym__color__red" data-acy-newvalue="1'; |
| 76 |
echo '<i data-acy-table="field" data-acy-field="active" data-acy-elementid="'.acym_escape($field->id).'" class="'.$generalClass.$class.'"></i>'; |
| 77 |
?> |
| 78 |
</div> |
| 79 |
<h6 class="text-center medium-1 small-2 acym__listing__text"><?php echo acym_escape($field->id); ?></h6> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
<?php } ?> |
| 83 |
</div> |
| 84 |
</div> |
| 85 |
</div> |
| 86 |
<?php acym_formOptions(); ?> |
| 87 |
</form> |
| 88 |
|