Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 2 additions & 57 deletions FusionIIIT/templates/phcModule/appointment.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,61 +107,6 @@
<br>
<br>
</div>
</div>

<div class="field">
<label><br></label>

<div>
<input type="submit" id="appo" name="Submit" value="Submit" class="ui small right floated primary button" />
</div>

</div>
</form>
<script type="text/javascript" src="{% static 'globals/js/jquery.min.js' %}"></script>
<script type="text/javascript">
function trimfield(str) {
return str.replace(/^\s+|\s+$/g, '');
}
$('#appo').on('click', function (e) {
e.preventDefault();

var tod = new Date(new Date().setHours(0, 0, 0, 0));
var today = new Date(new Date());
var now = today.getHours();

if (trimfield(document.getElementById("description").value) == '') {
$('#desc').html('*Please fill out the Description!');
document.getElementById("description").focus();
} else {
$.ajax({
type: 'post',
url: '/healthcenter/student/',
data: {
csrfmiddlewaretoken: '{{ csrf_token }}',
doctor: $("#doc").val(),
date: $("#date").val(),
description: $("#description").val(),
appointment: $("#appo").val(),
},
success: function (data) {
var dte = new Date(data.dt);
dte.setHours(0, 0, 0, 0);
alert("Appointment requested.Check history for the status of appointment. ")
document.getElementById("doc").value = ""
document.getElementById("date").value = ""
document.getElementById("description").value = " "
$('#desc').html('');
window.location.reload();
$('#app_dte').html('');
}
});
}
});
</script>
<br>
<br>
</div>
<br>
<div class="extra segment"></div>
</div>
Expand All @@ -170,8 +115,8 @@
{% comment %}the ambulance appointment tab starts here {% endcomment %}
<div class="ui tab" data-tab="ambulancerequest">
<div class="ui vertical segment">
<form m class="ui form" method="POST" style="padding: 8px; padding-left: 24px; padding-right: 24px;">{% csrf_token
%}
<form m class="ui form" method="POST" style="padding: 8px; padding-left: 24px; padding-right: 24px;">
{% csrf_token %}
<div class="two fields">
<div class="field">
<label>From</label>
Expand Down
Loading