diff --git a/surveys/preview.py b/surveys/preview.py new file mode 100644 index 0000000..94d4549 --- /dev/null +++ b/surveys/preview.py @@ -0,0 +1,17 @@ +from django.http import HttpResponseRedirect +from formtools.preview import FormPreview + + +class IndividualFormPreview(FormPreview): + def done(self, request, cleaned_data): + return HttpResponseRedirect('/form/success') + + +class OrganizationFormPreview(FormPreview): + def done(self, request, cleaned_data): + return HttpResponseRedirect('/form/success') + + +class SocialNetworksFormPreview(FormPreview): + def done(self, request, cleaned_data): + return HttpResponseRedirect('/form/success') diff --git a/surveys/static/surveys/css/surveys.css b/surveys/static/surveys/css/surveys.css new file mode 100644 index 0000000..026293a --- /dev/null +++ b/surveys/static/surveys/css/surveys.css @@ -0,0 +1,3 @@ +fieldset > label { + line-height: 3rem; +} diff --git a/surveys/static/surveys/js/surveys.js b/surveys/static/surveys/js/surveys.js new file mode 100644 index 0000000..e9fa46d --- /dev/null +++ b/surveys/static/surveys/js/surveys.js @@ -0,0 +1 @@ +document.getElementsByTagName('label') diff --git a/surveys/templates/surveys/done.html b/surveys/templates/surveys/done.html new file mode 100644 index 0000000..c3a2a4b --- /dev/null +++ b/surveys/templates/surveys/done.html @@ -0,0 +1,8 @@ +{% extends 'surveys/base.html' %} +{% load static %} +{% load i18n %} +{% load maps_extras %} +{% block title %}{{ '2020 Ecosystem Survey'|titlify }}{% endblock %} +{% block content %} +
{{ form_data | pprint }}+{% endblock %} diff --git a/surveys/templates/surveys/individual.html b/surveys/templates/surveys/individual.html new file mode 100644 index 0000000..68d9d77 --- /dev/null +++ b/surveys/templates/surveys/individual.html @@ -0,0 +1,52 @@ +{% extends 'surveys/base.html' %} +{% load static %} +{% load i18n %} +{% load maps_extras %} +{% block title %}{{ '2020 Ecosystem Survey'|titlify }}{% endblock %} +{% block content %} +
2020 Survey of the International Cooperative Digital Ecosystem
+