root / snf-astakos-app / astakos / im / templates / im / projects / projectapplication_form.html @ 669cfe19
History | View | Annotate | Download (4.4 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 |
|
12 |
|
13 |
{% with resource_catalog|populated_resource_catalog as resource_catalog %} |
14 |
{% if show_form %} |
15 |
<form action="?verify=1#top" method="post" class="withlabels quotas-form" id="group_create_form">{% csrf_token %} |
16 |
|
17 |
<fieldset class="with-info" id="top"> |
18 |
<legend>
|
19 |
1. CREATE GROUP |
20 |
<span class="info"> |
21 |
<em>more info</em> |
22 |
<span>Fill in the required fields to create a group. Group details will be visible to the users of the group.</span> |
23 |
</span>
|
24 |
</legend>
|
25 |
|
26 |
{% include "im/form_render.html" %} |
27 |
|
28 |
{% for g, resources in resource_catalog.get_groups_resources %} |
29 |
{% for rname in resources.keys %} |
30 |
{% with object|resource_grants|lookup:rname as value %} |
31 |
<input type="hidden" id="{{'id_'|add:rname|add:'_uplimit'}}" name="{{rname|add:'_uplimit'}}" autocomplete="off" {% if %}value="{{value}}"{% endif %}"> |
32 |
{% endwith %} |
33 |
{% endfor %} |
34 |
{% endfor %} |
35 |
</fieldset>
|
36 |
|
37 |
<fieldset id="icons"> |
38 |
<legend>
|
39 |
2. ADD RESOURCES |
40 |
<span class="info"> |
41 |
<em>more info</em> |
42 |
<span>You need to specify at least one resource</span> |
43 |
</span>
|
44 |
</legend>
|
45 |
<ul class="clearfix"> |
46 |
{% with object|resource_groups as groups %} |
47 |
{% for g, group_info in resource_catalog.groups.items %} |
48 |
{% if g %} |
49 |
<li>
|
50 |
<a href="#{{ g }}" id="{{'group_'|add:g}}" {% if in %}class="selected"{% endif %}><img src="/static/im/images/create-{{ g }}.png" alt="vm"/></a> |
51 |
<input type="hidden" name="proxy_{{ 'is_selected_'|add:g }}" id="proxy_{{ 'id_is_selected_'|add:g }}" {% if in %}value="1"{% else %}value="0"{% endif %}> |
52 |
<input type="hidden" name="{{ 'is_selected_'|add:g }}" id="{{ 'id_is_selected_'|add:g }}" {% if in %}value="1"{% else %}value="0"{% endif %}> |
53 |
<p class="msg">{{ group_info.help_text }}</p> |
54 |
</li>
|
55 |
{% endif %} |
56 |
{% endfor %} |
57 |
{% endwith %} |
58 |
</ul>
|
59 |
|
60 |
</fieldset>
|
61 |
|
62 |
<div class="visible"> |
63 |
|
64 |
</div>
|
65 |
<div class="not-visible"> |
66 |
{% for gname, resources in resource_catalog.get_groups_resources %} |
67 |
<div class="group {{'group_'|add:gname}}" id="{{ gname }}"> |
68 |
<a href="#icons" class="delete">X remove resource</a> |
69 |
{% for rname, rdata in resources.items %} |
70 |
<fieldset class="quota"> |
71 |
|
72 |
<legend>
|
73 |
{% if rdata.is_abbreviation %} |
74 |
{{ rdata.verbose_name|upper }} |
75 |
{% else %} |
76 |
{{ rdata.verbose_name|capfirst }} |
77 |
{% endif %} |
78 |
<span class="info"> |
79 |
<em>more info</em> |
80 |
<span>{{ rdata.help_text }}</span> |
81 |
</span>
|
82 |
</legend>
|
83 |
<div class="form-row"> |
84 |
<p class="clearfix"> |
85 |
<label for="{{'id_'|add:rname|add:'_uplimit'}}_proxy" > |
86 |
Amount to grant per user |
87 |
</label>
|
88 |
<input type="text" |
89 |
id="{{'id_'|add:rname|add:'_uplimit'}}_proxy" |
90 |
name="{{rname|add:'_uplimit'}}_proxy" |
91 |
placeholder="{{ rdata.placeholder}} " |
92 |
{% if == 'bytes' %} |
93 |
class="dehumanize" |
94 |
{% endif %} |
95 |
{% if %} |
96 |
{% with |add:'_uplimit' as %} |
97 |
value = "{{ request.POST|lookup:input_value }}" |
98 |
{% endwith %} |
99 |
{% else %} |
100 |
value = "{% get_grant_value rname form %}" |
101 |
{% endif %} |
102 |
/>
|
103 |
<span class="extra-img"> </span> |
104 |
<span class="info"><em>more info</em><span>{{ rdata.help_text_input_each }}</span></span> |
105 |
<p class="error-msg">Invalid format</p> |
106 |
</p>
|
107 |
<p class="msg"></p> |
108 |
</div>
|
109 |
</fieldset>
|
110 |
{% endfor %} |
111 |
</div>
|
112 |
|
113 |
{% endfor %} |
114 |
</div>
|
115 |
|
116 |
<input type="hidden" name="user" id="id_user" value="{{user.id}}"> |
117 |
<div class="form-row submit"> |
118 |
<input type="submit" value="CONTINUE" class="submit altcol" autocomplete="off"> |
119 |
</div>
|
120 |
</form>
|
121 |
{% else %} |
122 |
{% include "im/projects/projectapplication_form_summary.html" %} |
123 |
{% endif %} |
124 |
|
125 |
<script>
|
126 |
|
127 |
</script>
|
128 |
|
129 |
{% endwith %} |
130 |
{% endblock %} |