Fix params for the custom_fields.php

This commit is contained in:
Alex Tselegidis 2024-02-13 14:23:58 +01:00
parent 4f2927fb67
commit 5b87d75c10

View file

@ -12,12 +12,12 @@ $disabled = $disabled ?? false; ?>
<div class="mb-3">
<label for="custom-field-<?= $i ?>" class="form-label">
<?= setting('label_custom_field_' . $i) ?: lang('custom_field') . ' #' . $i ?>
<?php if (vars('require_custom_field_' . $i)): ?>
<span class="text-danger" hidden>*</span>
<?php if (setting('require_custom_field_' . $i)): ?>
<span class="text-danger" <?= $disabled ? 'hidden' : '' ?>>*</span>
<?php endif; ?>
</label>
<input type="text" id="custom-field-<?= $i ?>"
class="<?= vars('require_custom_field_' . $i) ? 'required' : '' ?> form-control"
class="<?= setting('require_custom_field_' . $i) ? 'required' : '' ?> form-control"
maxlength="120" <?= $disabled ? 'disabled' : '' ?>/>
</div>
<?php endif; ?>