mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-24 15:27:43 +01:00
Fix per plugin Pianificazione interventi da contratto
This commit is contained in:
parent
c365d94081
commit
af4b7f3238
@ -68,7 +68,7 @@ try {
|
|||||||
}else{
|
}else{
|
||||||
$result = API::error('unauthorized');
|
$result = API::error('unauthorized');
|
||||||
// Se è in corso un brute-force, aggiunge il timeout
|
// Se è in corso un brute-force, aggiunge il timeout
|
||||||
if (Auth::isBrute()) {
|
if (Auth::isBrute() && post('resource')=='login' ){
|
||||||
$result = Auth::getBruteTimeout();
|
$result = Auth::getBruteTimeout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,11 @@ if (count($rs2) > 0) {
|
|||||||
if (empty($readonly)) {
|
if (empty($readonly)) {
|
||||||
echo '
|
echo '
|
||||||
<td>
|
<td>
|
||||||
<button type="button" class="btn btn-warning btn-xs" data-title="'.tr('Modifica spesa').'" data-target="#bs-popup2" data-toggle="modal" data-href="'.$rootdir.'/modules/contratti/plugins/add_righe.php?id_module='.$id_module.'&id_record='.$id_record.'&idriga='.$r['id'].'"><i class="fa fa-edit"></i></button>
|
|
||||||
|
<button type="button" class="btn btn-warning btn-xs" data-title="'.tr('Modifica spesa').'" onclick="launch_modal(\'Nuovo promemoria\', \''.$rootdir.'/modules/contratti/plugins/add_righe.php?id_module='.$id_module.'&id_record='.$id_record.'&idriga='.$r['id'].'\', 1, \'#bs-popup2\');" >
|
||||||
|
<i class="fa fa-edit"></i></button>
|
||||||
|
|
||||||
|
|
||||||
<button type="button" class="btn btn-danger btn-xs" data-toggle="tooltip" onclick="if(confirm(\''.tr('Eliminare questa spesa?').'\')){ elimina_riga( \''.$r['id'].'\' ); }"><i class="fa fa-trash"></i></button>
|
<button type="button" class="btn btn-danger btn-xs" data-toggle="tooltip" onclick="if(confirm(\''.tr('Eliminare questa spesa?').'\')){ elimina_riga( \''.$r['id'].'\' ); }"><i class="fa fa-trash"></i></button>
|
||||||
</td>';
|
</td>';
|
||||||
}
|
}
|
||||||
@ -106,6 +110,9 @@ if (count($rs2) > 0) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function elimina_riga( id ){
|
function elimina_riga( id ){
|
||||||
$.post(globals.rootdir + '/modules/contratti/plugins/actions.php', { op: 'delriga', idriga: id }, function(data, result){
|
$.post(globals.rootdir + '/modules/contratti/plugins/actions.php', { op: 'delriga', idriga: id }, function(data, result){
|
||||||
if( result=='success' ){
|
if( result=='success' ){
|
||||||
|
@ -391,14 +391,26 @@ echo '
|
|||||||
|
|
||||||
$( "#add_promemoria" ).click(function() {
|
$( "#add_promemoria" ).click(function() {
|
||||||
|
|
||||||
|
if (confirm( '<?php echo tr("Aggiungere un nuovo promemoria?") ?>' )){
|
||||||
|
|
||||||
|
prev_html = $("#add_promemoria").html();
|
||||||
|
$("#add_promemoria").html("<i class='fa fa-spinner fa-pulse fa-fw'></i> <?php echo tr("Attendere...") ?>");
|
||||||
|
$("#add_promemoria").prop('disabled', true);
|
||||||
|
|
||||||
$.post( "<?php echo $rootdir ?>/editor.php?id_module=<?php echo Modules::get('Contratti')['id'] ?>&id_record=<?php echo $id_record ?>", { backto: "record-edit", op: "add-pianifica", data_richiesta: '<?php echo date('Y-m-d'); ?>' })
|
$.post( "<?php echo $rootdir ?>/editor.php?id_module=<?php echo Modules::get('Contratti')['id'] ?>&id_record=<?php echo $id_record ?>", { backto: "record-edit", op: "add-pianifica", data_richiesta: '<?php echo date('Y-m-d'); ?>' })
|
||||||
.done(function( data ) {
|
.done(function( data ) {
|
||||||
|
|
||||||
//$('#righe').load(globals.rootdir + '/modules/contratti/plugins/ajax_righe.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>&idcontratto_riga=<?php echo $idcontratto_riga; ?>');
|
//$('#righe').load(globals.rootdir + '/modules/contratti/plugins/ajax_righe.php?id_module=<?php echo $id_module; ?>&id_record=<?php echo $id_record; ?>&idcontratto_riga=<?php echo $idcontratto_riga; ?>');
|
||||||
launch_modal('Nuovo promemoria', '<?php echo $rootdir ?>/modules/contratti/plugins/addpianficazione.php?id_module=<?php echo Modules::get('Contratti')['id'] ?>&id_plugin=<?php echo Plugins::get('Pianificazione interventi')['id'] ?>&ref=interventi_contratti&id_record=<?php echo $id_record?>');
|
launch_modal('Nuovo promemoria', '<?php echo $rootdir ?>/modules/contratti/plugins/addpianficazione.php?id_module=<?php echo Modules::get('Contratti')['id'] ?>&id_plugin=<?php echo Plugins::get('Pianificazione interventi')['id'] ?>&ref=interventi_contratti&id_record=<?php echo $id_record?>', 1, '#bs-popup');
|
||||||
|
|
||||||
|
$("#add_promemoria").html(prev_html);
|
||||||
|
$("#add_promemoria").prop('disabled', false);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user