Visual bug fix

This commit is contained in:
Markines16 2021-06-05 14:51:54 +02:00 committed by GitHub
parent 3b71865eaa
commit 642e8036d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 9 deletions

View File

@ -9,6 +9,7 @@ class NewSessionForm {
$filmslist = $films->allFilmData();
$form='
<div id="operation_msg" class="operation_msg"> </div>
<form id="new_session_form" name="new_session_form" action="eventos.php.php" method="POST">
<div id="global_group" class="form_group"></div>
<fieldset>

View File

@ -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();
});
}
});

View File

@ -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(
'<div class="alert alert-success" id="success">' + data.message + "</div>"
);
$("#operation_msg").addClass("has_no_error");
$("#operation_msg").append(
'<div class="alert alert-success" id="success">' + data.message + "</div>"
);
document.getElementById(formname).style.display = "none";
}
}
e.preventDefault();
});
$('.film_button').bind('click', function(e) {
var id = $(this).attr('id');