This commit is contained in:
Luca 2018-03-02 17:19:15 +01:00
parent 70cf3401b4
commit 5f89f16ba6
7 changed files with 13 additions and 6 deletions

View File

@ -1019,10 +1019,17 @@ function start_inputmask(element) {
if (min == 'undefined') {
min = false;
}
var max = $this.attr('max-value');
if (max == 'undefined') {
max = false;
}
$this.inputmask("decimal", {
min: min ? min : undefined,
allowMinus: !min || min < 0 ? true : false,
max: max ? max : undefined,
allowPlus: !max || max < 0 ? true : false,
digits: $this.attr('decimals') ? $this.attr('decimals') : globals.cifre_decimali,
digitsOptional: true, // Necessario per un problema di inputmask con i numeri negativi durante l'init
enforceDigitsOnBlur: true,

View File

@ -11,7 +11,7 @@ include_once __DIR__.'/../../core.php';
</div>
<div class="col-md-6">
{[ "type": "text", "label": "<?php echo tr('Targa'); ?>", "name": "targa", "required": 1, "value": "" ]}
{[ "type": "text", "label": "<?php echo tr('Targa'); ?>", "name": "targa", "required": 1, "maxlength": 10, "class": "alphanumeric-mask", "value": "" ]}
</div>
</div>

View File

@ -19,7 +19,7 @@ include_once __DIR__.'/../../core.php';
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "required": 1, "value": "$nome$" ]}
</div>
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Targa'); ?>", "name": "targa", "required": 1, "value": "$targa$" ]}
{[ "type": "text", "label": "<?php echo tr('Targa'); ?>", "name": "targa", "required": 1, "maxlength": 10, "class": "alphanumeric-mask", "value": "$targa$" ]}
</div>
</div>

View File

@ -8,7 +8,7 @@ include_once __DIR__.'/../../core.php';
<div class="row">
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Matricola'); ?>", "name": "matricola", "required": 1, "class": "text-center", "value": "" ]}
{[ "type": "text", "label": "<?php echo tr('Matricola'); ?>", "name": "matricola", "required": 1, "class": "text-center alphanumeric-mask", "maxlength": 25, "value": "" ]}
</div>
<div class="col-md-8">

View File

@ -25,7 +25,7 @@ include_once __DIR__.'/../../core.php';
<div class="col-md-9">
<div class="row">
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Matricola'); ?>", "name": "matricola", "required": 1, "class": "text-center", "value": "$matricola$" ]}
{[ "type": "text", "label": "<?php echo tr('Matricola'); ?>", "name": "matricola", "required": 1, "class": "text-center alphanumeric-mask", "maxlength": 25, "value": "$matricola$" ]}
</div>
<div class="col-md-8">

View File

@ -44,7 +44,7 @@ include_once __DIR__.'/../../core.php';
</div>
<div class="col-md-3">
{[ "type": "text", "label": "<?php echo tr('Porta SMTP'); ?>", "name": "port", "required": 1, "class": "text-center", "value": "$port$" ]}
{[ "type": "number", "label": "<?php echo tr('Porta SMTP'); ?>", "name": "port", "required": 1, "class": "text-center", "decimals":"0", "max-value":"65535", "value": "$port$" ]}
</div>
<div class="col-md-3">

View File

@ -8,7 +8,7 @@ include_once __DIR__.'/../../core.php';
<div class="row">
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Codice'); ?>", "name": "idtipointervento", "required": 1, "value": "" ]}
{[ "type": "text", "label": "<?php echo tr('Codice'); ?>", "name": "idtipointervento", "maxlength": 10, "class": "alphanumeric-mask", "required": 1, "value": "" ]}
</div>
<div class="col-md-8">