Alert boxes now functional for lack of both Currently Ongoing and End date and time.
This commit is contained in:
parent
1edb94620a
commit
f3c866481c
14
addevent.php
14
addevent.php
@ -17,9 +17,17 @@ if( $_SESSION['access'] != 1 ) {
|
||||
<script src="includes/js/dtp/jquery.datetimepicker.js"></script>
|
||||
<title>Add BMS Event</title>
|
||||
<script>
|
||||
$(function() {
|
||||
$(document).ready(function() {
|
||||
$('#start_date_time').datetimepicker();
|
||||
$('#end_date_time').datetimepicker();
|
||||
$('#select_form').submit(function(event) {
|
||||
|
||||
if (!$("#is_ongoing").prop("checked") && $("#end_date_time").val() === "") {
|
||||
alert('You must enter a value for Currently Ongoing or End Date and Time');
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
@ -106,7 +114,7 @@ if( $_SESSION['access'] != 1 ) {
|
||||
</div>
|
||||
<?php include "includes/classes/select.class.php";?>
|
||||
<br />
|
||||
<form id="select_form" required method="post" action="includes/insert_event1.php">
|
||||
<form id="select_form" required method="post" action="includes/insert_event.php">
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>
|
||||
@ -161,7 +169,7 @@ if( $_SESSION['access'] != 1 ) {
|
||||
Issue Description:
|
||||
</td>
|
||||
<td>
|
||||
<textarea name="description" id="description" cols="40" rows="5" required > </textarea>
|
||||
<textarea name="description" id="description" cols="40" rows="5" required></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -18,18 +18,18 @@ if( $_SESSION['access'] != 1 ) {
|
||||
<script src="includes/js/dtp/jquery.datetimepicker.js"></script>
|
||||
<title>Edit BMS Event</title>
|
||||
<script>
|
||||
$(function() {
|
||||
$(document).ready(function() {
|
||||
$('#start_date_time').datetimepicker();
|
||||
$('#end_date_time').datetimepicker();
|
||||
});
|
||||
$('#select_form').submit(function(event) {
|
||||
alert('test');
|
||||
if ($.trim($("#is_ongoing").val()) === "" && $.trim($("#end_date_time").val()) === "") {
|
||||
|
||||
if (!$("#is_ongoing").prop("checked") && $("#end_date_time").val() === "") {
|
||||
alert('You must enter a value for Currently Ongoing or End Date and Time');
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@ -71,7 +71,7 @@ if( $_SESSION['access'] != 1 ) {
|
||||
}
|
||||
include "includes/classes/select2.class.php"; ?>
|
||||
<br />
|
||||
<form id="select_form" required method="post" action="includes/update_event1.php">
|
||||
<form id="select_form" required method="post" action="includes/update_event.php">
|
||||
<table align=center>
|
||||
<tr>
|
||||
<td>
|
||||
|
Loading…
Reference in New Issue
Block a user