mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Bugfix
Fix di alcuni bug in vari moduli.
This commit is contained in:
@@ -64,10 +64,12 @@ class HTMLWrapper implements WrapperInterface
|
||||
unset($values['show-help']);
|
||||
}
|
||||
|
||||
$values['data-parsley-errors-container'] = '#'.$values['id'].'-errors';
|
||||
$rand = rand(0, 99);
|
||||
|
||||
$values['data-parsley-errors-container'] = '#'.$values['id'].$rand.'-errors';
|
||||
|
||||
$result .= '
|
||||
<div id="'.$values['id'].'-errors"></div>';
|
||||
<div id="'.$values['id'].$rand.'-errors"></div>';
|
||||
|
||||
if (!empty($values['label'])) {
|
||||
$result .= '
|
||||
|
@@ -79,7 +79,7 @@ class Permissions
|
||||
}
|
||||
|
||||
if (!$result) {
|
||||
die(_('Accesso negato!'));
|
||||
die(_('Accesso negato'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
if (!get_var('Attiva aggiornamenti')) {
|
||||
die(_('Accesso negato!'));
|
||||
die(_('Accesso negato'));
|
||||
}
|
||||
|
||||
$tmp = $_FILES['blob']['tmp_name'];
|
||||
|
@@ -260,7 +260,7 @@ else {
|
||||
// Calcolo mese iniziale e finale del contratto
|
||||
$rs2 = $dbo->fetchArray('SELECT data_accettazione, data_conclusione, TIMESTAMPDIFF(MONTH, data_accettazione, data_conclusione) AS mesi FROM co_contratti WHERE id='.prepare($id_record));
|
||||
|
||||
if ($rs2[0]['data_accettazione'] != '0000-00-00 00:00:00' && $rs2[0]['data_conclusione'] != '0000-00-00 00:00:00') {
|
||||
if (!empty($rs2[0]['data_accettazione']) && !empty($rs2[0]['data_conclusione'])) {
|
||||
$n_mesi = $rs2[0]['mesi'] + 1;
|
||||
$mese_start = date('m', strtotime($rs2[0]['data_accettazione']));
|
||||
|
||||
|
@@ -14,7 +14,7 @@ include_once __DIR__.'/../../core.php';
|
||||
|
||||
<div class="col-md-12">
|
||||
<a href="#" class="pull-right" id="default">[Default]</a>
|
||||
{[ "type": "textarea", "label": "<?php echo _('Contenuto'); ?>", "name": "contenuto", "required": 1, "class": "autosize", "value": "", "extra": "rows='10'" ]}
|
||||
{[ "type": "textarea", "label": "<?php echo _('Contenuto'); ?>", "name": "contenuto", "id": "contenuto_add", "required": 1, "class": "autosize", "value": "", "extra": "rows='10'" ]}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@ include_once __DIR__.'/../../core.php';
|
||||
|
||||
var ini = '[Nome]\ntipo = span\nvalore = "Componente di esempio"\n\n[Marca]\ntipo = input\nvalore =\n\n[Tipo]\ntipo = select\nvalore =\nopzioni = "Tipo 1", "Tipo 2"\n\n[Data di installazione]\ntipo = date\nvalore =\n\n[Note]\ntipo = textarea\nvalore =\n';
|
||||
|
||||
$( "#contenuto" ).val(ini);
|
||||
$("#contenuto_add").val(ini);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@@ -88,30 +88,9 @@ if (!empty($rs2)) {
|
||||
$costo_km_consuntivo = $r['prezzo_km_consuntivo'];
|
||||
$costo_ore_consuntivo = $r['prezzo_ore_consuntivo'];
|
||||
|
||||
$orario_inizio = '0000-00-00 00:00:00';
|
||||
$orario_fine = '0000-00-00 00:00:00';
|
||||
|
||||
$pausa_inizio = '0000-00-00 00:00:00';
|
||||
$pausa_fine = '0000-00-00 00:00:00';
|
||||
|
||||
if (!empty($r['orario_inizio'])) {
|
||||
$orario_inizio = Translator::timestampToLocale($r['orario_inizio']);
|
||||
}
|
||||
|
||||
if (!empty($r['orario_fine'])) {
|
||||
$orario_fine = Translator::timestampToLocale($r['orario_fine']);
|
||||
}
|
||||
|
||||
if (!empty($r['pausa_inizio'])) {
|
||||
$pausa_inizio = Translator::timestampToLocale($r['pausa_inizio']);
|
||||
}
|
||||
|
||||
if (!empty($r['pausa_fine'])) {
|
||||
$pausa_fine = Translator::timestampToLocale($r['pausa_fine']);
|
||||
}
|
||||
|
||||
$orario_inizio = !empty($r['orario_inizio']) ? Translator::timestampToLocale($r['orario_inizio']) : $r['orario_inizio'];
|
||||
$orario_fine = !empty($r['orario_fine']) ? Translator::timestampToLocale($r['orario_fine']) : $r['orario_fine'];
|
||||
$orario = $orario_inizio.' - '.$orario_fine;
|
||||
$pausa = $pausa_inizio.' - '.$pausa_fine;
|
||||
|
||||
$km = $r['km'];
|
||||
$ore = $r['ore'];
|
||||
|
@@ -142,7 +142,7 @@ if (!empty($rs2)) {
|
||||
$nome_componente = $rs2[$j]['nome'];
|
||||
$filename = $rs2[$j]['filename'];
|
||||
|
||||
if ($rs2[$j]['data_sostituzione'] == '0000-00-00 00:00:00') {
|
||||
if (empty($rs2[$j]['data_sostituzione'])) {
|
||||
$statocomponente = str_replace('_DATE_', Translator::dateToLocale($rs2[$j]['data']), _('INSTALLATO in data _DATE_'));
|
||||
} else {
|
||||
$statocomponente = str_replace('_DATE_', Translator::dateToLocale($rs2[$j]['data_sostituzione']), _('SOSTITUITO in data _DATE_'));
|
||||
@@ -257,7 +257,7 @@ if (!empty($rs2)) {
|
||||
// Sostituisci componente con un altro dello stesso tipo, posso sostituire solo i componenti installati
|
||||
echo '
|
||||
<div class="col-md-12">';
|
||||
if ($rs2[$j]['data_sostituzione'] == '0000-00-00 00:00:00') {
|
||||
if (empty($rs2[$j]['data_sostituzione'])) {
|
||||
echo "
|
||||
<a href=\"javascript:;\" class=\"text-warning\" onclick=\"if( confirm('"._('Vuoi sostituire questo componente con un altro dello stesso tipo?')."') ){ location.href='".$rootdir.'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=sostituiscicomponente&backto=record-edit&filename='.$filename.'&id='.$rs2[$j]['id']."'; }\"><i class='fa fa-refresh'></i> "._('Sostituisci questo componente').'</a><br><br>';
|
||||
} else {
|
||||
|
@@ -63,7 +63,7 @@ if ($options != '' && $options != 'menu' && $options != 'custom') {
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<p><strong>'._('Query risultante').':</strong></p>
|
||||
<p>'.$module_query.'</p>
|
||||
<p>'.htmlentities($module_query).'</p>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
|
@@ -39,16 +39,12 @@ foreach ($replace as $prefix => $values) {
|
||||
$keys = array_keys($values);
|
||||
}
|
||||
|
||||
if (empty($values)) {
|
||||
// Azienda predefinita non impostata
|
||||
if ($prefix == 'f_') {
|
||||
if (empty($values) && $prefix == 'f_') {
|
||||
$values = [];
|
||||
foreach ($keys as $key) {
|
||||
$values[$key] = '';
|
||||
}
|
||||
} else {
|
||||
die(_('Accesso negato'));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($rename as $key => $value) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* Creazione dei campi per l'API (created_at e updated_at)
|
||||
*/
|
||||
|
||||
// I record precedenti vengono impostati a 0000-00-00 00:00:00
|
||||
// I record precedenti vengono impostati a NULL
|
||||
$tables = [
|
||||
'an_anagrafiche',
|
||||
'an_anagrafiche_agenti',
|
||||
|
Reference in New Issue
Block a user