From 155ea7a52dc89145855bda690b8793ee90fa4b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Hunka?= Date: Sun, 29 Jul 2018 21:10:30 +0200 Subject: [PATCH] Add template, form and view for Volunteer create. --- .../core/static/css/components/datepicker.css | 10 ++++++ pyconbalkan/core/static/js/volunteer.js | 5 +++ pyconbalkan/core/templates/base.html | 1 + .../templates/includes/event_sidebar.html | 1 + pyconbalkan/organizers/forms.py | 22 +++++++++++++ .../templates/volunteers_create.html | 32 +++++++++++++++++++ pyconbalkan/organizers/views.py | 20 +++++++++++- pyconbalkan/urls.py | 3 +- 8 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 pyconbalkan/core/static/css/components/datepicker.css create mode 100644 pyconbalkan/core/static/js/volunteer.js create mode 100644 pyconbalkan/organizers/forms.py create mode 100644 pyconbalkan/organizers/templates/volunteers_create.html diff --git a/pyconbalkan/core/static/css/components/datepicker.css b/pyconbalkan/core/static/css/components/datepicker.css new file mode 100644 index 00000000..330eb2a9 --- /dev/null +++ b/pyconbalkan/core/static/css/components/datepicker.css @@ -0,0 +1,10 @@ +.ui-datepicker { + background-color: #32383A; + border: 1px solid #66AFE9; + border-radius: 4px; + box-shadow: 0 0 8px rgba(102,175,233,.6); + display: none; + margin-top: 4px; + padding: 10px; + width: 240px; +} \ No newline at end of file diff --git a/pyconbalkan/core/static/js/volunteer.js b/pyconbalkan/core/static/js/volunteer.js new file mode 100644 index 00000000..e5b29d93 --- /dev/null +++ b/pyconbalkan/core/static/js/volunteer.js @@ -0,0 +1,5 @@ +$( ".datepicker" ).datepicker({ + changeMonth: true, + changeYear: true, + yearRange: "1900:2018" +}); \ No newline at end of file diff --git a/pyconbalkan/core/templates/base.html b/pyconbalkan/core/templates/base.html index 6bfc6af6..362f39fd 100644 --- a/pyconbalkan/core/templates/base.html +++ b/pyconbalkan/core/templates/base.html @@ -24,6 +24,7 @@ + diff --git a/pyconbalkan/core/templates/includes/event_sidebar.html b/pyconbalkan/core/templates/includes/event_sidebar.html index 5ba0b566..df626ca4 100644 --- a/pyconbalkan/core/templates/includes/event_sidebar.html +++ b/pyconbalkan/core/templates/includes/event_sidebar.html @@ -21,6 +21,7 @@

#1

Join Us! + Volunteer!