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