Skip to content

Commit

Permalink
inspection-reset
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlosb committed Apr 15, 2024
1 parent 7d6c951 commit 0187a44
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/controllers/Inspection.php
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ public function resetinspection()
}


}

}

public function vindecoder($vinr) {
Expand Down
20 changes: 17 additions & 3 deletions application/views/inspectionview.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<?php if ($inspection->en_filename_inspection != NULL) {?>
<p class="inspfile"><a href="<?= base_url()?>assets/pdfs/<?= $inspection->en_filename_inspection ?>" target="_blank"><i class="fal fa-file-pdf"></i> <?= $this->lang->line('inspection_report'); ?> (<?= $this->lang->line('englishlang'); ?>)</a></p>
<?php } ?>
<button type="button" id="resetinsp" class="btn btn-outline-danger btn-sm"><i class="fas fa-minus"></i> <?= $this->lang->line('reset_inspection'); ?></button>
<button type="button" id="resetinsp" class="btn btn-outline-danger btn-sm"><i class="fas fa-redo-alt"></i> <?= $this->lang->line('reset_inspection'); ?></button>
</div>
<div class="col-sm-6 text-center text-sm-right p-1 ">
<?php if ( ($inspection->s1score_inspection >= 92) && ($inspection->s2score_inspection >= 53) && ($inspection->s1score_inspection >= 12))
Expand Down Expand Up @@ -306,6 +306,8 @@
});
});
$( "#resetinsp" ).click(function() {
bootbox.confirm("<?= $this->lang->line('confirm_erase'); ?>", function(result) {
if (result) {
$("#spinner").addClass("d-flex").show();
$.ajax({
type: "POST",
Expand All @@ -327,10 +329,22 @@

}
//});
}


}
});
}
});

bootbox.setDefaults({
/**
* @optional String
* @default: en
* which locale settings to use to translate the three
* standard button labels: OK, CONFIRM, CANCEL
*/
locale: "<?= $ulcl ?>"
});

});
</script>

0 comments on commit 0187a44

Please sign in to comment.