Add javascript for insert name to reports

Former-commit-id: 75e51a652c0e713379093196ad04a10505c38447
This commit is contained in:
marcos.alconada 2019-05-16 12:13:58 +02:00
parent f5f66fc144
commit 8f2dce439b
1 changed files with 8 additions and 0 deletions

View File

@ -3502,6 +3502,7 @@ $(document).ready (function () {
$("#submit-create_item").click(function () {
var type = $('#type').val();
var name = $('#text-name').val();
switch (type){
case 'alert_report_module':
case 'alert_report_agent':
@ -3532,6 +3533,13 @@ $(document).ready (function () {
default:
break;
}
if($('#text-name').val() == ''){
alert( <?php echo "'".__('Please insert a name')."'"; ?> );
return false;
}
});
$("#submit-edit_item").click(function () {