Skip to content

Commit

Permalink
[#130] got it working for events moving onto jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcszymist committed Apr 15, 2019
1 parent 29b8e65 commit 584c1cd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IAIDSWebsite/orgAdminPanel/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Meta:
'location' : forms.TextInput(attrs={'placeholder': 'Location'}),
'startdate' : forms.DateInput(attrs={'class': 'datepicker'}),
'enddate' : forms.DateInput(attrs={'class': 'datepicker'}),
'starttime' : forms.TimeInput(),
'endtime' : forms.TimeInput(),
'starttime' : forms.TimeInput(attrs={'class': 'timepicker'}),
'endtime' : forms.TimeInput(attrs={'class': 'timepicker'}),
'description' : forms.Textarea(),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
<!-- <link rel="stylesheet" type="text/css" href="{% static 'events/css/filter.css' %}" /> -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css" />
<link rel="stylesheet" type="text/css" href="{% static 'source/css/output.css' %}" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css">

<script type="text/javascript" src="{% static 'events/js/datatables.min.js' %}">
</script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js">
</script>
<script src="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>

{% endblock %}

{% block middleColumn %}
Expand Down Expand Up @@ -425,6 +429,24 @@ <h1>New Event</h1>
$(document).on('closed.zf.reveal', '#editRowEvent[data-reveal]', function () {
$('#editRowEvent').foundation('_destroy');
});
$('.timepicker').timepicker({
timeFormat: 'h:mm p',
interval: 15,
minTime: '0',
maxTime: '11:45 pm',
defaultTime: '11',
startTime: '12:00 am',
dynamic: false,
dropdown: true,
scrollbar: true,
change: function(time) {
// the input field
var element = $(this);
// get access to this Timepicker instance
var timepicker = element.timepicker();
$(this).val(moment(time).format("HH:mm"));
}
});
</script>

<!-- user table reveals -->
Expand Down Expand Up @@ -514,6 +536,7 @@ <h1>New Administrator</h1>
}

});

</script>
{% endblock %}

Expand Down

0 comments on commit 584c1cd

Please sign in to comment.