root / snf-astakos-app / astakos / im / templates / im / projects / projectapplication_form.html @ 63c07fdd
History | View | Annotate | Download (6.6 kB)
1 |
{% extends "im/account_base.html" %} |
---|---|
2 |
|
3 |
{% load filters %} |
4 |
{% load astakos_tags %} |
5 |
{% block headjs %} |
6 |
{{ block.super }} |
7 |
<script src="{{ IM_STATIC_URL }}js/quotas.js"></script> |
8 |
{% endblock %} |
9 |
|
10 |
{% block page.body %} |
11 |
<h2>
|
12 |
{% if update_form %}REQUEST PROJECT MODIFICATION{% else %}REQUEST PROJECT{% endif %} |
13 |
</h2>
|
14 |
|
15 |
<form action="?verify=1" method="post" class="withlabels quotas-form" id="group_create_form">{% csrf_token %} |
16 |
|
17 |
<fieldset class="with-info" id="top"> |
18 |
<legend>
|
19 |
1. PROJECT DETAILS |
20 |
<span class="info"> |
21 |
<em>more info</em> |
22 |
<span> To create a new Project, first enter the following
|
23 |
required fields. The information you enter, except |
24 |
<i>Comments for review</i>, will be visible to all {{ BRANDING_SERVICE_NAME }} |
25 |
users. </span>
|
26 |
</span>
|
27 |
</legend>
|
28 |
{% for key, err in form.errors.items %} |
29 |
{% if key == "__all__" %} |
30 |
<div class="form-error">{{ err }}</div> |
31 |
{% endif %} |
32 |
{% endfor %} |
33 |
|
34 |
{% for field in form %} |
35 |
{% if field.name in details_fields %} |
36 |
<div class="form-row {% if field.errors|length %}with-errors |
37 |
{% endif %}
|
38 |
{% if field.is_hidden %}with-hidden{% endif %}"> |
39 |
{{ field.errors }} |
40 |
<p class="clearfix {% if field.blank %}required{% endif %}"> |
41 |
{{ field.label_tag }} |
42 |
{{ field|safe }} |
43 |
<span class="extra-img"> </span> |
44 |
{% if field.help_text %} |
45 |
<span class="info"> |
46 |
<em>more info</em> |
47 |
<span>{{ field.help_text|safe }}</span> |
48 |
</span>
|
49 |
{% endif %} |
50 |
</p>
|
51 |
</div>
|
52 |
{% endif %} |
53 |
{% endfor %} |
54 |
|
55 |
|
56 |
|
57 |
|
58 |
{% for g, resources in resource_catalog %} |
59 |
{% for r in resources %} |
60 |
{% with r.str_repr as rname %} |
61 |
{% with object|resource_grants|lookup:rname as value %} |
62 |
<input type="hidden" id="{{'id_'|add:rname|add:'_uplimit'}}" name="{{rname|add:'_uplimit'}}" {% if %}value="{{value}}"{% endif %} /> |
63 |
{% endwith %} |
64 |
{% endwith %} |
65 |
{% endfor %} |
66 |
{% endfor %} |
67 |
</fieldset>
|
68 |
<fieldset class="with-info"> |
69 |
<legend>
|
70 |
2. MEMBERSHIP OPTIONS |
71 |
<span class="info"> |
72 |
<em>more info</em> |
73 |
<span> Membership options </span> |
74 |
</span>
|
75 |
</legend>
|
76 |
{% for field in form %} |
77 |
|
78 |
{% if field.name in membership_fields %} |
79 |
<div class="form-row {% if field.errors|length %}with-errors{% endif %} {% if field.is_hidden %}with-hidden{% endif %}"> |
80 |
{{ field.errors }} |
81 |
<p class="clearfix {% if field.blank %}required{% endif %}"> |
82 |
{{ field.label_tag }} |
83 |
{{ field|safe }} |
84 |
<span class="extra-img"> </span> |
85 |
{% if field.help_text %} |
86 |
<span class="info"> |
87 |
<em>more info</em> |
88 |
<span>{{ field.help_text|safe }}</span> |
89 |
</span>
|
90 |
{% endif %} |
91 |
</p>
|
92 |
</div>
|
93 |
{% endif %} |
94 |
{% endfor %} |
95 |
|
96 |
|
97 |
</fieldset>
|
98 |
|
99 |
<fieldset id="icons"> |
100 |
<legend>
|
101 |
3. RESOURCES |
102 |
<span class="info"> |
103 |
<em>more info</em> |
104 |
<span>Here you add resources to your Project. Each resource you specify here, will be granted to *EACH* user of this Project. So the total resources will be: <Total number of members> * <amount_of_resource> for each resource. </span> |
105 |
</span>
|
106 |
</legend>
|
107 |
<ul class="clearfix"> |
108 |
{% with object|resource_groups as groups %} |
109 |
{% for g, group_info in resource_groups.items %} |
110 |
{% if g %} |
111 |
<li>
|
112 |
<a href="#{{ g }}" |
113 |
id="{{'group_'|add:g}}" |
114 |
{% if in %}class="selected"{% endif %}> |
115 |
<img src="{{ IM_STATIC_URL }}images/create-{{ g }}.png" alt="vm"/></a> |
116 |
<input type="hidden" name="proxy_{{ 'is_selected_'|add:g }}" |
117 |
id="proxy_{{ 'id_is_selected_'|add:g }}" {% if in %}value="1"{% else %}value="0"{% endif %}> |
118 |
<input type="hidden" name="{{ 'is_selected_'|add:g }}" id="{{ 'id_is_selected_'|add:g }}" {% if in %}value="1"{% else %}value="0"{% endif %}> |
119 |
<p class="msg">{{ group_info.help_text }}</p> |
120 |
</li>
|
121 |
{% endif %} |
122 |
{% endfor %} |
123 |
{% endwith %} |
124 |
</ul>
|
125 |
|
126 |
</fieldset>
|
127 |
<div class="visible"> </div> |
128 |
<div class="not-visible"> |
129 |
{% for gname, resources in resource_catalog %} |
130 |
<div class="group {{'group_'|add:gname}}" id="{{ gname }}"> |
131 |
<a href="#icons" class="delete">X remove resource</a> |
132 |
{% for rdata in resources %} |
133 |
{% with rdata.str_repr as rname %} |
134 |
<fieldset class="quota"> |
135 |
|
136 |
<legend>
|
137 |
{% if rdata.is_abbreviation %} |
138 |
{{ rdata.verbose_name|upper }} |
139 |
{% else %} |
140 |
{{ rdata.verbose_name|capfirst }} |
141 |
{% endif %} |
142 |
<span class="info"> |
143 |
<em>more info</em> |
144 |
<span>{{ rdata.help_text }}</span> |
145 |
</span>
|
146 |
</legend>
|
147 |
<div class="form-row"> |
148 |
<p class="clearfix"> |
149 |
<label for="{{'id_'|add:rname|add:'_uplimit'}}_proxy" > |
150 |
Total {{rdata.pluralized_display_name}} per user |
151 |
</label>
|
152 |
<input type="text" |
153 |
id="{{'id_'|add:rname|add:'_uplimit'}}_proxy" |
154 |
name="{{rname|add:'_uplimit'}}_proxy" |
155 |
placeholder="{{ rdata.placeholder}} " |
156 |
{% if == 'bytes' %} |
157 |
class="dehumanize" |
158 |
{% endif %} |
159 |
{% if %} |
160 |
{% with |add:'_uplimit' as %} |
161 |
value = "{{ request.POST|lookup:input_value }}" |
162 |
{% endwith %} |
163 |
{% else %} |
164 |
value = "{% get_grant_value rname form %}" |
165 |
{% endif %} |
166 |
autocomplete="off"> |
167 |
<span class="extra-img"> </span> |
168 |
<span class="info"><em>more info</em><span>{{ rdata.help_text_input_each }}</span></span> |
169 |
</p>
|
170 |
<p class="error-msg">Invalid format</p> |
171 |
<p class="msg"></p> |
172 |
</div>
|
173 |
</fieldset>
|
174 |
{% endwith %} |
175 |
{% endfor %} |
176 |
</div>
|
177 |
|
178 |
{% endfor %} |
179 |
</div>
|
180 |
|
181 |
<input type="hidden" name="user" id="id_user" value="{{user.id}}"> |
182 |
<div class="form-row submit"> |
183 |
<input type="submit" value="CONTINUE" class="submit altcol" > |
184 |
</div>
|
185 |
</form>
|
186 |
{% endblock %} |