Skip to content

Commit 43d24f3

Browse files
committed
feat: disable checkbox for multiedit fields if a field is disabled
1 parent 1b5c6b9 commit 43d24f3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

themes/simple/templates/sys-template-parts/parts/form.part.fieldtoggle.tpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
<label for="{$data.id}" class="{if $formType neq "vertical" and $formType neq "navbar"}col-form-label{else}form-label{/if}">
55
{include file="sys-template-parts/parts/form.part.icon.tpl"}
66
{$data.label}
7-
<input class="form-check-input focus-ring" type="checkbox" id="toggle_{$data.id}" name="toggle_{$data.id}" data-bs-toggle="tooltip" title="{$l10n->get('SYS_FORM_USE_FOR_EDIT')}" value="1"tabindex="-1" autofocus="false">
7+
<input class="form-check-input focus-ring" type="checkbox" id="toggle_{$data.id}" name="toggle_{$data.id}" data-bs-toggle="tooltip" title="{$l10n->get('SYS_FORM_USE_FOR_EDIT')}" value="1" tabindex="-1" autofocus="false"
8+
{* disable checkbox if field is disabled *}
9+
{if isset($data.attributes.disabled)}
10+
disabled="disabled"
11+
{/if}
12+
>
813
</label>
914
</div>
1015
{else}

0 commit comments

Comments
 (0)