1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-25 15:22:24 +01:00

Fix impostazione segmento predefinito limitata ai sezionali

This commit is contained in:
Pek5892 2024-02-23 16:22:17 +01:00
parent 7efb51f0bb
commit 8227b32fda
2 changed files with 5 additions and 12 deletions

View File

@ -28,25 +28,18 @@ include_once __DIR__.'/../../core.php';
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "name", "required": 1, "value": "$name$" ]} {[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "name", "required": 1, "value": "$name$" ]}
</div> </div>
<div class="col-md-3"> <div class="col-md-6">
{[ "type": "text", "label": "<?php echo tr('Maschera'); ?>", "name": "pattern", "class": "alphanumeric-mask", "value": "$pattern$", "maxlength": 25, "placeholder":"####/YYYY" ]} {[ "type": "text", "label": "<?php echo tr('Maschera'); ?>", "name": "pattern", "class": "alphanumeric-mask", "value": "$pattern$", "maxlength": 25, "placeholder":"####/YYYY" ]}
</div> </div>
<div class="col-md-3">
{[ "type": "checkbox", "label": "<?php echo tr('Sezionale'); ?>", "help": "<?php echo tr('Se attivo verrà utilizzato il contatore'); ?>", "name": "is_sezionale", "value": "$is_sezionale$" ]}
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6">
{[ "type": "checkbox", "label": "<?php echo tr('Sezionale'); ?>", "help": "<?php echo tr('Se attivo verrà utilizzato il contatore'); ?>", "name": "is_sezionale", "value": "$is_sezionale$" ]}
</div>
<div class="col-md-6"> <div class="col-md-6">
{[ "type": "select", "label": "<?php echo tr('Modulo'); ?>", "name": "module", "required": 1, "values": "query=SELECT id, IF(title!='', title, name) AS descrizione FROM zz_modules WHERE enabled = 1 AND options != 'custom' ORDER BY descrizione ASC", "value": "" ]} {[ "type": "select", "label": "<?php echo tr('Modulo'); ?>", "name": "module", "required": 1, "values": "query=SELECT id, IF(title!='', title, name) AS descrizione FROM zz_modules WHERE enabled = 1 AND options != 'custom' ORDER BY descrizione ASC", "value": "" ]}
</div> </div>
<div class="col-md-6">
{[ "type": "checkbox", "label": "<?php echo tr('Predefinito'); ?>", "name": "predefined", "value": "0", "help": "<?php echo tr('Seleziona per rendere il segmento predefinito.'); ?>", "placeholder": "<?php echo tr('Segmento predefinito'); ?>" ]}
</div>
</div> </div>
<div class="row"> <div class="row">

View File

@ -42,7 +42,7 @@ include_once __DIR__.'/../../core.php';
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
{[ "type": "checkbox", "label": "<?php echo tr('Predefinito'); ?>", "name": "predefined", "value": "$predefined$", "help": "<?php echo tr('Seleziona per rendere il segmento predefinito.'); ?>", "placeholder": "<?php echo tr('Segmento predefinito'); ?>", "extra": "<?php echo ($record['predefined']) ? 'readonly' : ''; ?>" ]} {[ "type": "checkbox", "label": "<?php echo tr('Predefinito'); ?>", "name": "predefined", "value": "$predefined$", "help": "<?php echo tr('Seleziona per rendere il segmento predefinito.'); ?>", "placeholder": "<?php echo tr('Segmento predefinito'); ?>", "extra": "<?php echo (($record['predefined']) || ($record['is_sezionale'] == 0) ? 'readonly' : ''); ?>" ]}
</div> </div>
<div class="col-md-2"> <div class="col-md-2">