diff --git a/incidents/static/custom_js/new.js b/incidents/static/custom_js/new.js new file mode 100644 index 00000000..9b944a4f --- /dev/null +++ b/incidents/static/custom_js/new.js @@ -0,0 +1,7 @@ +$(document).ready(function() { + if ($("#id_date").val() == "") { + var date = new Date(); + date = new Date(date.getTime() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, 16) + $("#id_date").val(date); + } +}); diff --git a/incidents/templates/events/new.html b/incidents/templates/events/new.html index 054ab721..cb1409c7 100755 --- a/incidents/templates/events/new.html +++ b/incidents/templates/events/new.html @@ -14,6 +14,7 @@ {% block custom_js %} + {% rich_edit_static %}