Aggiunto rea-mask e provincia-mask

Pulizia campi anagrafiche doppi
This commit is contained in:
Luca 2020-04-30 16:21:53 +02:00
parent a5d18a6fe1
commit 1fb0a35319
4 changed files with 25 additions and 11 deletions

View File

@ -9,13 +9,23 @@ function start_inputmask(element) {
var date = dateFormatMoment(globals.date_format).toLowerCase();
$(element + ".date-mask").not('.bound').inputmask(date, {
"placeholder": date
placeholder: date
}).addClass('bound');
$(element + '.email-mask').not('.bound').inputmask('Regex', {
regex: "^[a-zA-Z0-9_!#$%&'*+/=?`{|}~^-]+(?:\\.[a-zA-Z0-9_!#$%&'*+/=?`{|}~^-]+)*@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$",
}).addClass('bound');
$(element + '.rea-mask').not('.bound').inputmask( {
mask: "AA-999999{1,15}",
casing: "upper",
}).addClass('bound');
$(element + '.provincia-mask').not('.bound').inputmask( {
mask: "AA",
casing: "upper",
}).addClass('bound');
$(element + '.alphanumeric-mask').not('.bound').inputmask('Regex', {
regex: "[A-Za-z0-9#_|\/\\-.]*",
}).addClass('bound');

View File

@ -157,7 +157,7 @@ if (!$is_cliente) {
<div class="row">
<div class="col-md-3">
{[ "type": "text", "label": "<?php echo tr('Provincia'); ?>", "name": "provincia", "maxlength": 2, "class": "text-center text-uppercase", "value": "$provincia$", "extra": "onkeyup=\"this.value = this.value.toUpperCase();\"" ]}
{[ "type": "text", "label": "<?php echo tr('Provincia'); ?>", "name": "provincia", "maxlength": 2, "class": "text-center provincia-mask text-uppercase", "value": "$provincia$", "extra": "onkeyup=\"this.value = this.value.toUpperCase();\"" ]}
</div>
<div class="col-md-3">
@ -444,23 +444,27 @@ if ($is_cliente or $is_fornitore or $is_tecnico) {
<div class="panel-body">
<div class="row">
<div class="col-md-3">
{[ "type": "text", "label": "<?php echo tr('Codice registro imprese'); ?>", "name": "codiceri", "value": "$codiceri$" ]}
</div>
<div class="col-md-3">
{[ "type": "text", "label": "<?php echo tr('Numero d\'iscrizione registro imprese'); ?>", "name": "codiceri", "value": "$codiceri$", "help": "<?php echo tr('Il numero registro imprese è il numero di iscrizione attribuito dal Registro Imprese della Camera di Commercio.'); ?>" ]}
</div>
<div class="col-md-3">
{[ "type": "text", "label": "<?php echo tr('Codice R.E.A.').'<small>('.tr('provincia-C.C.I.A.A.').')</small>'; ?>", "name": "codicerea", "value": "$codicerea$", "help": "<?php echo tr('Formato: _PATTERN_', [
{[ "type": "text", "label": "<?php echo tr('Codice R.E.A.').' <small>('.tr('provincia-C.C.I.A.A.').')</small>'; ?>", "name": "codicerea", "value": "$codicerea$", "class": "rea-mask", "help": "<?php echo tr('Formato: _PATTERN_', [
'_PATTERN_' => 'RM-123456',
]); ?>" ]}
</div>
</div>
<div class="col-md-3">
<!-- campi già specificati in Codice R.E.A., da eliminare nelle prossime release -->
<!--div class="col-md-3">
{[ "type": "text", "label": "<?php echo tr('Num. iscr. C.C.I.A.A.'); ?>", "name": "cciaa", "value": "$cciaa$" ]}
</div>
<div class="col-md-3">
{[ "type": "text", "label": "<?php echo tr('Città iscr. C.C.I.A.A.'); ?>", "name": "cciaa_citta", "value": "$cciaa_citta$" ]}
</div>
</div-->
</div>
<div class="row">
<div class="col-md-3">

View File

@ -38,7 +38,7 @@ echo '
</div>
<div class="col-md-2">
{[ "type": "text", "label": "'.tr('Provincia').'", "name": "provincia", "maxlength": 2, "class": "text-center text-uppercase", "extra": "onkeyup=\"this.value = this.value.toUpperCase();\"" ]}
{[ "type": "text", "label": "'.tr('Provincia').'", "name": "provincia", "maxlength": 2, "class": "text-center provincia-mask text-uppercase", "extra": "onkeyup=\"this.value = this.value.toUpperCase();\"" ]}
</div>
<div class="col-md-2">

View File

@ -45,7 +45,7 @@ echo '
</div>
<div class="col-md-2">
{[ "type": "text", "label": "'.tr('Provincia').'", "name": "provincia", "value": "$provincia$", "maxlength": 2, "class": "text-center text-uppercase", "extra": "onkeyup=\"this.value = this.value.toUpperCase();\"" ]}
{[ "type": "text", "label": "'.tr('Provincia').'", "name": "provincia", "value": "$provincia$", "maxlength": 2, "class": "text-center provincia-mask text-uppercase", "extra": "onkeyup=\"this.value = this.value.toUpperCase();\"" ]}
</div>
<div class="col-md-2">