Add javascript for insert name to reports
Former-commit-id: 75e51a652c0e713379093196ad04a10505c38447
This commit is contained in:
parent
f5f66fc144
commit
8f2dce439b
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue