Revision 63c07fdd
b/snf-astakos-app/astakos/im/templates/im/projects/projectapplication_form.html | ||
---|---|---|
9 | 9 |
|
10 | 10 |
{% block page.body %} |
11 | 11 |
<h2> |
12 |
{% if update_form %}REQUEST PROJECT MODIFICATION{% else %}REQUEST PROJECT{% endif %} |
|
13 |
|
|
12 |
{% if update_form %}REQUEST PROJECT MODIFICATION{% else %}REQUEST PROJECT{% endif %} |
|
14 | 13 |
</h2> |
15 | 14 |
|
16 |
{% if not show_form %} |
|
17 |
<p>These are the specifications of the Project you want to create. If you hit the "Submit" button |
|
18 |
this form will be officially sent to {{ BRANDING_COMPANY_NAME }} for review. Please make sure the following reflect |
|
19 |
exactly your request.</p> |
|
20 |
{% endif %} |
|
21 |
|
|
22 |
{% if show_form %} |
|
23 | 15 |
<form action="?verify=1" method="post" class="withlabels quotas-form" id="group_create_form">{% csrf_token %} |
24 | 16 |
|
25 | 17 |
<fieldset class="with-info" id="top"> |
... | ... | |
191 | 183 |
<input type="submit" value="CONTINUE" class="submit altcol" > |
192 | 184 |
</div> |
193 | 185 |
</form> |
194 |
{% else %} |
|
195 |
{% include "im/projects/projectapplication_form_summary.html" %} |
|
196 |
{% endif %} |
|
197 |
|
|
198 |
<script> |
|
199 |
|
|
200 |
</script> |
|
201 |
|
|
202 | 186 |
{% endblock %} |
b/snf-astakos-app/astakos/im/templates/im/projects/projectapplication_form_summary.html | ||
---|---|---|
1 |
{% load filters %} |
|
1 |
{% extends "im/account_base.html" %} |
|
2 |
|
|
3 |
{% load filters astakos_tags %} |
|
2 | 4 |
{% block headjs %} |
3 | 5 |
{{ block.super }} |
4 | 6 |
<script src="{{ IM_STATIC_URL }}js/quotas.js"></script> |
5 | 7 |
{% endblock %} |
6 | 8 |
{% block page.body %} |
7 | 9 |
|
10 |
<h2> |
|
11 |
{% if update_form %}REQUEST PROJECT MODIFICATION{% else %}REQUEST PROJECT{% endif %} |
|
12 |
</h2> |
|
13 |
|
|
14 |
<p>These are the specifications of the Project you want to create. If you hit the "Submit" button |
|
15 |
this form will be officially sent to {{ BRANDING_COMPANY_NAME }} for review. Please make sure the following reflect |
|
16 |
exactly your request.</p> |
|
17 |
|
|
8 | 18 |
<div class="projects summary"> |
9 | 19 |
<form action="?edit=0&verify=0" method="post" class="quotas-form">{% csrf_token %} |
10 | 20 |
{% for k,v in request.POST.items %} |
... | ... | |
85 | 95 |
|
86 | 96 |
|
87 | 97 |
</div> |
88 |
|
|
89 |
<script> |
|
90 |
|
|
91 |
</script> |
|
92 |
|
|
93 | 98 |
{% endblock %} |
b/snf-astakos-app/astakos/im/views/projects.py | ||
---|---|---|
117 | 117 |
response = _create_object( |
118 | 118 |
request, |
119 | 119 |
template_name='im/projects/projectapplication_form.html', |
120 |
summary_template_name='im/projects/projectapplication_form_summary.html', |
|
120 | 121 |
extra_context=extra_context, |
121 | 122 |
post_save_redirect=reverse('project_list'), |
122 | 123 |
form_class=ProjectApplicationForm, |
... | ... | |
236 | 237 |
request, |
237 | 238 |
object_id=application_id, |
238 | 239 |
template_name='im/projects/projectapplication_form.html', |
240 |
summary_template_name='im/projects/projectapplication_form_summary.html', |
|
239 | 241 |
extra_context=extra_context, |
240 | 242 |
post_save_redirect=reverse('project_list'), |
241 | 243 |
form_class=ProjectApplicationForm, |
b/snf-astakos-app/astakos/im/views/util.py | ||
---|---|---|
88 | 88 |
def _create_object(request, model=None, template_name=None, |
89 | 89 |
template_loader=template_loader, extra_context=None, post_save_redirect=None, |
90 | 90 |
login_required=False, context_processors=None, form_class=None, |
91 |
msg=None): |
|
91 |
msg=None, summary_template_name=None):
|
|
92 | 92 |
""" |
93 | 93 |
Based of django.views.generic.create_update.create_object which displays a |
94 | 94 |
summary page before creating the object. |
... | ... | |
110 | 110 |
if verify == '1': |
111 | 111 |
extra_context['show_form'] = False |
112 | 112 |
extra_context['form_data'] = form.cleaned_data |
113 |
template_name = summary_template_name |
|
113 | 114 |
elif edit == '1': |
114 | 115 |
extra_context['show_form'] = True |
115 | 116 |
else: |
... | ... | |
143 | 144 |
slug_field='slug', template_name=None, template_loader=template_loader, |
144 | 145 |
extra_context=None, post_save_redirect=None, login_required=False, |
145 | 146 |
context_processors=None, template_object_name='object', |
146 |
form_class=None, msg=None): |
|
147 |
form_class=None, msg=None, summary_template_name=None):
|
|
147 | 148 |
""" |
148 | 149 |
Based of django.views.generic.create_update.update_object which displays a |
149 | 150 |
summary page before updating the object. |
... | ... | |
166 | 167 |
if verify == '1': |
167 | 168 |
extra_context['show_form'] = False |
168 | 169 |
extra_context['form_data'] = form.cleaned_data |
170 |
template_name = summary_template_name |
|
169 | 171 |
elif edit == '1': |
170 | 172 |
extra_context['show_form'] = True |
171 | 173 |
else: |
Also available in: Unified diff