From 642e8036d870f3e170bf5496150b530958469042 Mon Sep 17 00:00:00 2001 From: Markines16 <80280295+Markines16@users.noreply.github.com> Date: Sat, 5 Jun 2021 14:51:54 +0200 Subject: [PATCH] Visual bug fix --- panel_manager/includes/NewSessionForm.php | 1 + panel_manager/sessioncalendar.js | 16 ++++++++++++---- panel_manager/sessionforms.js | 14 +++++++++----- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/panel_manager/includes/NewSessionForm.php b/panel_manager/includes/NewSessionForm.php index 3fc7f7c..9cc0566 100644 --- a/panel_manager/includes/NewSessionForm.php +++ b/panel_manager/includes/NewSessionForm.php @@ -9,6 +9,7 @@ class NewSessionForm { $filmslist = $films->allFilmData(); $form=' +
diff --git a/panel_manager/sessioncalendar.js b/panel_manager/sessioncalendar.js index 6fd89f2..735dc0b 100644 --- a/panel_manager/sessioncalendar.js +++ b/panel_manager/sessioncalendar.js @@ -33,6 +33,9 @@ $(document).ready(function(){ x = document.getElementById("film_list"); x.style.display = "block"; + + + document.getElementById("hall").value = document.getElementById("hall_selector").value; document.getElementById("startDate").value = $.fullCalendar.formatDate( start, "Y-MM-DD" ); document.getElementById("endDate").value = $.fullCalendar.formatDate( end, "Y-MM-DD" ); @@ -151,14 +154,19 @@ $(document).ready(function(){ } function formout(){ - + $(modal).fadeOut(100,function(){ var success = document.getElementById("success"); if(success){ calendar.fullCalendar('refetchEvents'); + success.style.display = "none"; + + document.getElementById("new_session_form").style.display = "block"; + document.getElementById("price").value = ""; + document.getElementById("format").value = ""; + document.getElementById("film_id").value = ""; + document.getElementById("startHour").value =""; } - - $(modal).fadeOut(); - + }); } }); diff --git a/panel_manager/sessionforms.js b/panel_manager/sessionforms.js index 7780818..4abd038 100644 --- a/panel_manager/sessionforms.js +++ b/panel_manager/sessionforms.js @@ -24,7 +24,7 @@ $(document).ready(function () { encode: true, }).done(function (data) { console.log(data); - checkErrors(data,"form#new_session_form"); + checkErrors(data,"new_session_form"); }) .fail(function (jqXHR, textStatus) { $("form#new_session_form").html( @@ -89,15 +89,19 @@ $(document).ready(function () { ); } } else { - $(formname).html( - '
' + data.message + "
" - ); + + $("#operation_msg").addClass("has_no_error"); + $("#operation_msg").append( + '
' + data.message + "
" + ); + document.getElementById(formname).style.display = "none"; + } } e.preventDefault(); }); - + $('.film_button').bind('click', function(e) { var id = $(this).attr('id');