Commit 539d7708 authored by Carsten  Rose's avatar Carsten Rose

Implements #3995 partly: CheckBox and Radio can now be locked.

parent 19bb2c34
Pipeline #2815 passed with stages
in 2 minutes and 42 seconds
......@@ -423,14 +423,27 @@ EOF;
if (!$skip && HelperFormElement::booleParameter($formElement[FE_INPUT_EXTRA_BUTTON_LOCK] ?? '-')) {
$formElement[FE_MODE] = FE_MODE_READONLY;
$extraButton .= <<<EOF
<button class="btn btn-info"
onclick="$('#$id').prop('readonly',!$('#$id').prop('readonly'))">
<span class="glyphicon glyphicon-lock" aria-hidden="true"></span>
</button>
switch ($formElement[FE_TYPE]) {
case FE_TYPE_CHECKBOX:
case FE_TYPE_RADIO:
$extraButton .= <<<EOF
<button class="btn btn-info"
onclick="$('[id^=$id]').parent('label').toggleClass('qfq-disabled')">
<span class="glyphicon glyphicon-lock" aria-hidden="true"></span>
</button>
EOF;
}
break;
default:
$extraButton .= <<<EOF
<button class="btn btn-info"
onclick="$('#$id').prop('readonly',!$('#$id').prop('readonly'))">
<span class="glyphicon glyphicon-lock" aria-hidden="true"></span>
</button>
EOF;
break;
}
}
// PASSWORD
// if (!$skip && isset($formElement[FE_INPUT_EXTRA_BUTTON_PASSWORD])) {
if (!$skip && HelperFormElement::booleParameter($formElement[FE_INPUT_EXTRA_BUTTON_PASSWORD] ?? '-')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment