1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-18 04:20:50 +01:00

Fix visibilità checkbox indipendenti

This commit is contained in:
Dasc3er 2020-09-04 14:25:25 +02:00
parent 32b0aa83a6
commit 6a904efafb
2 changed files with 9 additions and 9 deletions

View File

@ -949,37 +949,37 @@ div.tip {
/* Fancy checkbox: https://bootsnipp.com/snippets/M2bda */ /* Fancy checkbox: https://bootsnipp.com/snippets/M2bda */
.form-group input[type="checkbox"] { .checkbox-group input[type="checkbox"] {
display: none; display: none;
} }
.form-group input[type="checkbox"] + .btn-group > label span { .checkbox-group input[type="checkbox"] + .btn-group > label span {
width: 20px; width: 20px;
} }
.form-group input[type="checkbox"] + .btn-group { .checkbox-group input[type="checkbox"] + .btn-group {
width: 100%; width: 100%;
display: flex; display: flex;
overflow: auto; overflow: auto;
} }
.form-group input[type="checkbox"] + .btn-group label:last-child { .checkbox-group input[type="checkbox"] + .btn-group label:last-child {
flex-grow: 100; flex-grow: 100;
} }
.form-group input[type="checkbox"] + .btn-group > label span:first-child { .checkbox-group input[type="checkbox"] + .btn-group > label span:first-child {
display: none; display: none;
} }
.form-group input[type="checkbox"] + .btn-group > label span:last-child { .checkbox-group input[type="checkbox"] + .btn-group > label span:last-child {
display: inline-block; display: inline-block;
} }
.form-group input[type="checkbox"]:checked + .btn-group > label span:first-child { .checkbox-group input[type="checkbox"]:checked + .btn-group > label span:first-child {
display: inline-block; display: inline-block;
} }
.form-group input[type="checkbox"]:checked + .btn-group > label span:last-child { .checkbox-group input[type="checkbox"]:checked + .btn-group > label span:last-child {
display: none; display: none;
} }

View File

@ -54,7 +54,7 @@ class ChoicesHandler implements HandlerInterface
// Generazione del codice HTML // Generazione del codice HTML
// "+ this.checked" rende il valore booleano un numero // "+ this.checked" rende il valore booleano un numero
$result = ' $result = '
<div class="form-group"> <div class="form-group checkbox-group">
<input type="hidden" name="|name|" value="|value|"> <input type="hidden" name="|name|" value="|value|">
<input type="checkbox" id="|id|" value="|value|" autocomplete="off" class="hidden" |attr| onchange="$(this).parent().find(\'[type = hidden]\').val(+this.checked).trigger(\'change\')"/> <input type="checkbox" id="|id|" value="|value|" autocomplete="off" class="hidden" |attr| onchange="$(this).parent().find(\'[type = hidden]\').val(+this.checked).trigger(\'change\')"/>
<div class="btn-group checkbox-buttons"> <div class="btn-group checkbox-buttons">