From 0f50a82d73ef06e9878118945f5a9d89a4809f21 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 1/3] Add template, form and view for Volunteer create. --- .../core/static/css/components/datepicker.css | 10 ++++ .../core/static/css/components/volunteer.css | 7 +++ pyconbalkan/core/static/js/volunteer.js | 7 +++ pyconbalkan/core/templates/base.html | 2 + .../templates/includes/event_sidebar.html | 8 ++- pyconbalkan/organizers/forms.py | 58 +++++++++++++++++++ .../templates/volunteers_create.html | 34 +++++++++++ pyconbalkan/organizers/views.py | 22 ++++++- pyconbalkan/urls.py | 3 +- 9 files changed, 146 insertions(+), 5 deletions(-) create mode 100644 pyconbalkan/core/static/css/components/datepicker.css create mode 100644 pyconbalkan/core/static/css/components/volunteer.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/css/components/volunteer.css b/pyconbalkan/core/static/css/components/volunteer.css new file mode 100644 index 00000000..338d7fd1 --- /dev/null +++ b/pyconbalkan/core/static/css/components/volunteer.css @@ -0,0 +1,7 @@ +#id_country { + height: 40px; +} + +#id_profile_picture{ + color: white; +} diff --git a/pyconbalkan/core/static/js/volunteer.js b/pyconbalkan/core/static/js/volunteer.js new file mode 100644 index 00000000..686082a4 --- /dev/null +++ b/pyconbalkan/core/static/js/volunteer.js @@ -0,0 +1,7 @@ +$( ".datepicker" ).datepicker({ + changeMonth: true, + changeYear: true, + yearRange: "1900:2018" +}); + +$("#id_description").addClass("form-control"); diff --git a/pyconbalkan/core/templates/base.html b/pyconbalkan/core/templates/base.html index a2009405..b357940e 100644 --- a/pyconbalkan/core/templates/base.html +++ b/pyconbalkan/core/templates/base.html @@ -22,6 +22,7 @@ + @@ -37,6 +38,7 @@ + diff --git a/pyconbalkan/core/templates/includes/event_sidebar.html b/pyconbalkan/core/templates/includes/event_sidebar.html index 62e67ca8..15575e35 100644 --- a/pyconbalkan/core/templates/includes/event_sidebar.html +++ b/pyconbalkan/core/templates/includes/event_sidebar.html @@ -20,11 +20,13 @@

#{{ conference.number }}

{{ conference.get_type_display }}

- {% if conference.tickets %}
- Join Us! + {% if conference.tickets %} + Join Us! + + {% endif %} + Volunteer!
- {% endif %}