root / snf-astakos-app / astakos / im / templates / im / projects / projectapplication_form.html @ ff8333db
History | View | Annotate | Download (7.2 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 |
/ <span class="subtitle"> |
14 |
{% if show_form %} |
15 |
FORM |
16 |
{% else %} |
17 |
{% if update_form %}CONFIRM{% else %}CONFIRM{% endif %} |
18 |
{% endif %} |
19 |
</span>
|
20 |
|
21 |
</h2>
|
22 |
|
23 |
{% if not show_form %} |
24 |
<p>These are the specifications of the Project you want to create. If you hit the "Submit" button
|
25 |
this form will be officially sent to GRNET for review. Please make sure the following reflect |
26 |
exactly your request. After submitting, there is no way to modify your Project request. </p>
|
27 |
{% endif %} |
28 |
|
29 |
{% if show_form %} |
30 |
<form action="?verify=1" method="post" class="withlabels quotas-form" id="group_create_form">{% csrf_token %} |
31 |
|
32 |
<fieldset class="with-info" id="top"> |
33 |
<legend>
|
34 |
1. PROJECT DETAILS |
35 |
<span class="info"> |
36 |
<em>more info</em> |
37 |
<span> To create a new Project, first enter the following
|
38 |
required fields. The information you enter, except |
39 |
<i>Comments for review</i>, will be visible to all ~okeanos |
40 |
users. </span>
|
41 |
</span>
|
42 |
</legend>
|
43 |
{% for key, err in form.errors.items %} |
44 |
{% if key == "__all__" %} |
45 |
<div class="form-error">{{ err }}</div> |
46 |
{% endif %} |
47 |
{% endfor %} |
48 |
|
49 |
{% for field in form %} |
50 |
{% if field.name in details_fields %} |
51 |
<div class="form-row {% if field.errors|length %}with-errors |
52 |
{% endif %}
|
53 |
{% if field.is_hidden %}with-hidden{% endif %}"> |
54 |
{{ field.errors }} |
55 |
<p class="clearfix {% if field.blank %}required{% endif %}"> |
56 |
{{ field.label_tag }} |
57 |
{{ field|safe }} |
58 |
<span class="extra-img"> </span> |
59 |
{% if field.help_text %} |
60 |
<span class="info"> |
61 |
<em>more info</em> |
62 |
<span>{{ field.help_text|safe }}</span> |
63 |
</span>
|
64 |
{% endif %} |
65 |
</p>
|
66 |
</div>
|
67 |
{% endif %} |
68 |
{% endfor %} |
69 |
|
70 |
|
71 |
|
72 |
|
73 |
{% for g, resources in resource_catalog %} |
74 |
{% for r in resources %} |
75 |
{% with r.str_repr as rname %} |
76 |
{% with object|resource_grants|lookup:rname as value %} |
77 |
<input type="hidden" id="{{'id_'|add:rname|add:'_uplimit'}}" name="{{rname|add:'_uplimit'}}" {% if %}value="{{value}}"{% endif %} /> |
78 |
{% endwith %} |
79 |
{% endwith %} |
80 |
{% endfor %} |
81 |
{% endfor %} |
82 |
</fieldset>
|
83 |
<fieldset class="with-info"> |
84 |
<legend>
|
85 |
2. MEMBERSHIP OPTIONS |
86 |
<span class="info"> |
87 |
<em>more info</em> |
88 |
<span> Membership options </span> |
89 |
</span>
|
90 |
</legend>
|
91 |
{% for field in form %} |
92 |
|
93 |
{% if field.name in membership_fields %} |
94 |
<div class="form-row {% if field.errors|length %}with-errors{% endif %} {% if field.is_hidden %}with-hidden{% endif %}"> |
95 |
{{ field.errors }} |
96 |
<p class="clearfix {% if field.blank %}required{% endif %}"> |
97 |
{{ field.label_tag }} |
98 |
{{ field|safe }} |
99 |
<span class="extra-img"> </span> |
100 |
{% if field.help_text %} |
101 |
<span class="info"> |
102 |
<em>more info</em> |
103 |
<span>{{ field.help_text|safe }}</span> |
104 |
</span>
|
105 |
{% endif %} |
106 |
</p>
|
107 |
</div>
|
108 |
{% endif %} |
109 |
{% endfor %} |
110 |
|
111 |
|
112 |
</fieldset>
|
113 |
|
114 |
<fieldset id="icons"> |
115 |
<legend>
|
116 |
3. RESOURCES |
117 |
<span class="info"> |
118 |
<em>more info</em> |
119 |
<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> |
120 |
</span>
|
121 |
</legend>
|
122 |
<ul class="clearfix"> |
123 |
{% with object|resource_groups as groups %} |
124 |
{% for g, group_info in resource_groups.items %} |
125 |
{% if g %} |
126 |
<li>
|
127 |
<a href="#{{ g }}" id="{{'group_'|add:g}}" {% if in %}class="selected"{% endif %}><img src="/static/im/images/create-{{ g }}.png" alt="vm"/></a> |
128 |
<input type="hidden" name="proxy_{{ 'is_selected_'|add:g }}" id="proxy_{{ 'id_is_selected_'|add:g }}" {% if in %}value="1"{% else %}value="0"{% endif %}> |
129 |
<input type="hidden" name="{{ 'is_selected_'|add:g }}" id="{{ 'id_is_selected_'|add:g }}" {% if in %}value="1"{% else %}value="0"{% endif %}> |
130 |
<p class="msg">{{ group_info.help_text }}</p> |
131 |
</li>
|
132 |
{% endif %} |
133 |
{% endfor %} |
134 |
{% endwith %} |
135 |
</ul>
|
136 |
|
137 |
</fieldset>
|
138 |
<div class="visible"> </div> |
139 |
<div class="not-visible"> |
140 |
{% for gname, resources in resource_catalog %} |
141 |
<div class="group {{'group_'|add:gname}}" id="{{ gname }}"> |
142 |
<a href="#icons" class="delete">X remove resource</a> |
143 |
{% for rdata in resources %} |
144 |
{% with rdata.str_repr as rname %} |
145 |
<fieldset class="quota"> |
146 |
|
147 |
<legend>
|
148 |
{% if rdata.is_abbreviation %} |
149 |
{{ rdata.verbose_name|upper }} |
150 |
{% else %} |
151 |
{{ rdata.verbose_name|capfirst }} |
152 |
{% endif %} |
153 |
<span class="info"> |
154 |
<em>more info</em> |
155 |
<span>{{ rdata.help_text }}</span> |
156 |
</span>
|
157 |
</legend>
|
158 |
<div class="form-row"> |
159 |
<p class="clearfix"> |
160 |
<label for="{{'id_'|add:rname|add:'_uplimit'}}_proxy" > |
161 |
Total {% if rdata.is_abbreviation %}{{ rdata.verbose_name|upper }}{% else %}{{ rdata.verbose_name }}{% endif %}{% if not rdata.unit %}s {% endif %} per user |
162 |
</label>
|
163 |
<input type="text" |
164 |
id="{{'id_'|add:rname|add:'_uplimit'}}_proxy" |
165 |
name="{{rname|add:'_uplimit'}}_proxy" |
166 |
placeholder="{{ rdata.placeholder}} " |
167 |
{% if == 'bytes' %} |
168 |
class="dehumanize" |
169 |
{% endif %} |
170 |
{% if %} |
171 |
{% with |add:'_uplimit' as %} |
172 |
value = "{{ request.POST|lookup:input_value }}" |
173 |
{% endwith %} |
174 |
{% else %} |
175 |
value = "{% get_grant_value rname form %}" |
176 |
{% endif %} |
177 |
autocomplete="off" |
178 |
>
|
179 |
<span class="extra-img"> </span> |
180 |
<span class="info"><em>more info</em><span>{{ rdata.help_text_input_each }}</span></span> |
181 |
</p>
|
182 |
<p class="error-msg">Invalid format</p> |
183 |
<p class="msg"></p> |
184 |
</div>
|
185 |
</fieldset>
|
186 |
{% endwith %} |
187 |
{% endfor %} |
188 |
</div>
|
189 |
|
190 |
{% endfor %} |
191 |
</div>
|
192 |
|
193 |
<input type="hidden" name="user" id="id_user" value="{{user.id}}"> |
194 |
<div class="form-row submit"> |
195 |
<input type="submit" value="CONTINUE" class="submit altcol" > |
196 |
</div>
|
197 |
</form>
|
198 |
{% else %} |
199 |
{% include "im/projects/projectapplication_form_summary.html" %} |
200 |
{% endif %} |
201 |
|
202 |
<script>
|
203 |
|
204 |
</script>
|
205 |
|
206 |
{% endblock %} |