diff --git a/application/views/system/infocenter/absageModal.php b/application/views/system/infocenter/absageModal.php new file mode 100644 index 000000000..00298945e --- /dev/null +++ b/application/views/system/infocenter/absageModal.php @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/application/views/system/infocenter/infocenter.php b/application/views/system/infocenter/infocenter.php index 43e326bb5..38e644846 100644 --- a/application/views/system/infocenter/infocenter.php +++ b/application/views/system/infocenter/infocenter.php @@ -41,6 +41,7 @@
load->view('system/infocenter/infocenterData.php'); ?> + load->view('system/infocenter/absageModal.php'); ?>
diff --git a/public/js/infocenter/infocenterPersonDataset.js b/public/js/infocenter/infocenterPersonDataset.js index e5f91a7ee..efdd7dc99 100644 --- a/public/js/infocenter/infocenterPersonDataset.js +++ b/public/js/infocenter/infocenterPersonDataset.js @@ -91,6 +91,19 @@ var InfocenterPersonDataset = { }); $('button.auswahlAbsageBtn').click(function() + { + var idsel = $("#filterTableDataset input:checked[name=PersonId\\[\\]]"); + + if(idsel.length <= 0) + return FHC_DialogLib.alertInfo("Bitte wählen Sie die Personen aus."); + + if($('.absgstatusgrund').val() === 'null' || $('.auswahlAbsageStg').val() === 'null') + return FHC_DialogLib.alertInfo("Bitte den Absagegrund und Studiengang auswählen."); + + $(".absageModalForAll").modal("show"); + }); + + $('#saveAbsageForAll').click(function() { InfocenterPersonDataset.saveAbsageForAll(); }); @@ -239,15 +252,9 @@ var InfocenterPersonDataset = { { var idsel = $("#filterTableDataset input:checked[name=PersonId\\[\\]]"); - if(idsel.length <= 0) - return FHC_DialogLib.alertInfo("Bitte wählen Sie die Personen aus."); - var statusgrund = $('.absgstatusgrund').val(); var studiengang = $('.auswahlAbsageStg').val(); - if(statusgrund === 'null' || studiengang === 'null') - return FHC_DialogLib.alertInfo("Bitte den Absagegrund und Studiengang auswählen."); - var personen = []; for (var i = 0; i < idsel.length; i++) @@ -268,8 +275,9 @@ var InfocenterPersonDataset = { FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); if (FHC_AjaxClient.hasData(data)) - FHC_FilterWidget.reloadDataset(); + FHC_DialogLib.alertSuccess("Erfolgreich gespeichert.") + $(".absageModalForAll").modal("hide"); }, errorCallback: function(jqXHR, textStatus, errorThrown) { FHC_DialogLib.alertError(textStatus);