mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Fixed flickering popup massage preventing approving AFTER withdrawing a rejection
This happened because of a conflict between HTML forms native submit behaviour (automatically refreshing page) and our javascripts submit onclick functions. Now fixed by setting event.preventDefault() within the js functions. Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -43,6 +43,9 @@ $(function(){
|
||||
// Approve Anrechnungen
|
||||
$("#approveAnrechnungDetail-approve-anrechnung-confirm").click(function(){
|
||||
|
||||
// Avoid form redirecting automatically
|
||||
event.preventDefault();
|
||||
|
||||
// Get form data
|
||||
let form_data = $('form').serializeArray();
|
||||
|
||||
@@ -160,6 +163,9 @@ $(function(){
|
||||
// Request Recommendation for Anrechnungen
|
||||
$("#approveAnrechnungDetail-request-recommendation").click(function(){
|
||||
|
||||
// Avoid form redirecting automatically
|
||||
event.preventDefault();
|
||||
|
||||
// Get form data
|
||||
let form_data = $('form').serializeArray();
|
||||
|
||||
@@ -202,6 +208,9 @@ $(function(){
|
||||
// Request Recommendation for Anrechnungen
|
||||
$("#approveAnrechnungDetail-withdraw-anrechnung-approvement").click(function(){
|
||||
|
||||
// Avoid form redirecting automatically
|
||||
event.preventDefault();
|
||||
|
||||
if(!confirm(FHC_PhrasesLib.t("anrechnung", "genehmigungAblehnungWirklichZuruecknehmen")))
|
||||
{
|
||||
return;
|
||||
@@ -221,14 +230,17 @@ $(function(){
|
||||
{
|
||||
successCallback: function (data, textStatus, jqXHR)
|
||||
{
|
||||
console.log(data);
|
||||
if (data.error && data.retval != null)
|
||||
{
|
||||
console.log('inside error');
|
||||
// Print error message
|
||||
FHC_DialogLib.alertWarning(data.retval);
|
||||
}
|
||||
|
||||
if (!data.error && data.retval != null)
|
||||
{
|
||||
console.log('inside success');
|
||||
approveAnrechnungDetail.formatGenehmigungIsWithdrawed(
|
||||
data.retval.status_bezeichnung
|
||||
);
|
||||
|
||||
@@ -223,6 +223,9 @@ $(function(){
|
||||
// Approve Anrechnungen
|
||||
$("#approveAnrechnungUebersicht-approve-anrechnungen-confirm").click(function(){
|
||||
|
||||
// Avoid form redirecting automatically
|
||||
event.preventDefault();
|
||||
|
||||
// Get selected rows data
|
||||
let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData')
|
||||
.map(function(data){
|
||||
@@ -362,6 +365,10 @@ $(function(){
|
||||
|
||||
// Request Recommendation for Anrechnungen
|
||||
$("#approveAnrechnungUebersicht-request-recommendation").click(function(){
|
||||
|
||||
// Avoid form redirecting automatically
|
||||
event.preventDefault();
|
||||
|
||||
// Get selected rows data
|
||||
let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData');
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@ $(function(){
|
||||
// Recommend Anrechnung
|
||||
$("#reviewAnrechnungDetail-recommend-anrechnung-confirm").click(function(){
|
||||
|
||||
// Avoid form redirecting automatically
|
||||
event.preventDefault();
|
||||
|
||||
// Get form data
|
||||
let form_data = $('form').serializeArray();
|
||||
|
||||
|
||||
@@ -221,6 +221,9 @@ $(function(){
|
||||
// Recommend Anrechnungen
|
||||
$("#reviewAnrechnungUebersicht-recommend-anrechnungen-confirm").click(function(){
|
||||
|
||||
// Avoid form redirecting automatically
|
||||
event.preventDefault();
|
||||
|
||||
// Get selected rows data
|
||||
let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData')
|
||||
.map(function(data){
|
||||
|
||||
Reference in New Issue
Block a user