| 1 |
<h2 class="cell acym__title acym__title__secondary"><?php echo acym_translation('ACYM_INFORMATION'); ?></h2> |
| 2 |
<?php |
| 3 |
if (!empty($data['translation_languages'])) { |
| 4 |
echo acym_displayLanguageRadio( |
| 5 |
$data['translation_languages'], |
| 6 |
'field[translation]', |
| 7 |
empty($data['field']->translation) ? '' : $data['field']->translation, |
| 8 |
acym_translation('ACYM_LANGUAGE_CUSTOM_FIELD_DESC'), |
| 9 |
'', |
| 10 |
'field' |
| 11 |
); |
| 12 |
} ?> |
| 13 |
<label class="cell xlarge-12 large-6 margin-top-1"> |
| 14 |
<?php echo acym_translation('ACYM_NAME'); ?> |
| 15 |
<input required type="text" name="field[name]" value="<?php echo empty($data['field']->name) ? '' : acym_escape($data['field']->name); ?>"> |
| 16 |
</label> |
| 17 |
<label class="cell xlarge-12 large-6 margin-top-1"> |
| 18 |
<?php |
| 19 |
echo acym_translation('ACYM_FIELD_TYPE'); |
| 20 |
|
| 21 |
$attributes = [ |
| 22 |
'acym-data-infinite' => true, |
| 23 |
'class' => 'acym__fields__edit__select acym__select', |
| 24 |
]; |
| 25 |
if (!empty($data['field']->id) && in_array($data['field']->id, [1, 2, $data['languageFieldId']])) { |
| 26 |
$attributes['disabled'] = true; |
| 27 |
} |
| 28 |
|
| 29 |
echo acym_select( |
| 30 |
$data['fieldType'], |
| 31 |
'field[type]', |
| 32 |
$data['field']->type, |
| 33 |
$attributes, |
| 34 |
'value', |
| 35 |
'name' |
| 36 |
); |
| 37 |
?> |
| 38 |
</label> |
| 39 |
|
| 40 |
<div class="cell large-12 grid-x margin-top-1"> |
| 41 |
<?php |
| 42 |
$disableActiveSwitch = !empty($data['field']->core) || in_array($data['field']->id, [2, $data['languageFieldId']]); |
| 43 |
|
| 44 |
echo acym_switch( |
| 45 |
'field[active]', |
| 46 |
$data['field']->active, |
| 47 |
acym_translation('ACYM_ACTIVE'), |
| 48 |
[], |
| 49 |
'auto', |
| 50 |
'shrink', |
| 51 |
'margin-0', |
| 52 |
null, |
| 53 |
true, |
| 54 |
'', |
| 55 |
$disableActiveSwitch |
| 56 |
); ?> |
| 57 |
</div> |
| 58 |
|
| 59 |
<?php if (empty($data['field']->id) || !in_array($data['field']->id, [2, $data['languageFieldId']])) { ?> |
| 60 |
<div class="cell large-12 grid-x acym__fields__change margin-top-1" id="acym__fields__required"> |
| 61 |
<?php echo acym_switch( |
| 62 |
'field[required]', |
| 63 |
$data['field']->required, |
| 64 |
acym_translation('ACYM_REQUIRED').acym_info(['textShownInTooltip' => 'ACYM_REQUIRED_DESC']), |
| 65 |
[], |
| 66 |
'auto', |
| 67 |
'shrink', |
| 68 |
'margin-0', |
| 69 |
'required_error_message' |
| 70 |
); ?> |
| 71 |
</div> |
| 72 |
<div class="cell margin-top-1 large-11" id="required_error_message"> |
| 73 |
<label class="acym__fields__change" id="acym__fields__error-message"> |
| 74 |
<?php echo acym_translation('ACYM_CUSTOM_ERROR'); ?> |
| 75 |
<input type="text" |
| 76 |
name="field[option][error_message]" |
| 77 |
value="<?php echo empty($data['field']->option->error_message) ? '' : acym_escape($data['field']->option->error_message); ?>" |
| 78 |
placeholder="<?php echo acym_escape(acym_translationSprintf('ACYM_DEFAULT_REQUIRED_MESSAGE', 'xxx')); ?>"> |
| 79 |
</label> |
| 80 |
</div> |
| 81 |
<?php } ?> |
| 82 |
|