astakosgroup_form.html 3.8 KB
Newer Older
Sofia Papagiannaki's avatar
Sofia Papagiannaki committed
1
2
{% extends "im/account_base.html" %}

Olga Brani's avatar
Olga Brani committed
3
4
5
6
7
{% load filters %}
{% block headjs %}
	{{ block.super }}	 
	<script src="{{ IM_STATIC_URL }}js/quotas.js"></script>	
{% endblock %}	
Sofia Papagiannaki's avatar
Sofia Papagiannaki committed
8
{% block page.body %}
Olga Brani's avatar
Olga Brani committed
9
10
 
	
Olga Brani's avatar
Olga Brani committed
11
<form action="#top" method="post" class="withlabels quotas-form" id="group_create_form">{% csrf_token %}
Olga Brani's avatar
Olga Brani committed
12
	 
Olga Brani's avatar
Olga Brani committed
13
    <fieldset class="with-info" id="top">
Olga Brani's avatar
Olga Brani committed
14
15
16
17
    	<legend>
    		1. CREATE GROUP
			<span class="info"> 
		    	<em>more info</em>
Olga Brani's avatar
Olga Brani committed
18
		    	<span>Fill in the required fields to create a group. Group details will be visible to the users of the group.</span>
Olga Brani's avatar
Olga Brani committed
19
20
21
22
	    	</span>    		
    	</legend>
        
        {% include "im/form_render.html" %}
23

Olga Brani's avatar
Olga Brani committed
24
25
26
27
    </fieldset>     
    
    <fieldset id="icons">
    	<legend>
Olga Brani's avatar
Olga Brani committed
28
    		2. ADD RESOURCES
Olga Brani's avatar
Olga Brani committed
29
30
    		<span class="info"> 
		    	<em>more info</em>
Olga Brani's avatar
Olga Brani committed
31
		    	<span>You need to specify at least one resource</span>
Olga Brani's avatar
Olga Brani committed
32
33
34
35
36
37
38
39
40
41
	    	</span>    
    	</legend>

    {% with resource_catalog|lookup:'resources' as resources %}
    {% with resource_catalog|lookup:'groups' as groups %}    	
    	<ul class="clearfix">
            {% for g, rs in groups.items %}   
            {% with resource_presentation|lookup:g as group_info %} 		
    		<li>
    			<a href="#{{ g }}" id="{{'group_'|add:g}}"><img src="/static/im/images/create-{{ g }}.png" alt="vm"/></a>
Olga Brani's avatar
Olga Brani committed
42
    			<input type="hidden" name="proxy_{{ 'is_selected_'|add:g }}"  id="proxy_{{ 'id_is_selected_'|add:g }}">
Olga Brani's avatar
Olga Brani committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
    			<p class="msg">{{ group_info.help_text }}</p>
    		</li>
    		{% endwith %}
            {% endfor %}
    	</ul>
    	
    </fieldset>
   
    <div class="foo">
    
    </div>
    <div class="not-foo">
        {% for g, rs in groups.items %}
        
        <div class="group {{'group_'|add:g}}" id="{{ g }}">
			<a href="#icons" class="delete">X remove resource</a>	
		    {% for r in rs %}
		    {% with resource_presentation|lookup:r as resource_info %}
		    {% with resources|lookup:r as resource%}
Olga Brani's avatar
Merge    
Olga Brani committed
62
		    <fieldset class="quota">
Olga Brani's avatar
Olga Brani committed
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
		    	<legend>
		    		{% if resource_info.is_abbreviation %}
		    			{{ r|get_value_after_dot|upper }}
		    		{% else %}
		    			{{ r|get_value_after_dot|capfirst }}
		    		{% endif %}
		    		<span class="info"> 
				    	<em>more info</em>
				    	<span>{{ resource_info.help_text }}</span>
			    	</span>  
		    	</legend>
<!--	    	<div class="form-row">
		    		<p class="clearfix">
		    			<label for="num_storage">Total storage</label>
		    			<input type="text" name="num_storage">
		    			<span class="extra-img">&nbsp;</span>
		         		<span class="info"><em>more info</em><span>Help Text</span></span>
		    		</p>
		    	</div>-->
82
83
 				 
		    	
Olga Brani's avatar
Merge    
Olga Brani committed
84
85
		    	<div class="form-row">
		    		<p class="clearfix">
Olga Brani's avatar
Olga Brani committed
86
		    			<label for="{{'id_'|add:r|add:'_uplimit'}}_proxy" >
Olga Brani's avatar
Merge    
Olga Brani committed
87
88
89
90
91
92
93
94
95
96
97
							Max {% if resource_info.is_abbreviation %}{{ r|get_value_after_dot|upper }}{% else %}{{ r|get_value_after_dot }}{% endif %}{% if not resource.unit %}s {% endif  %} per user
						</label>
		    			<input 	type="text" 
		       						id="{{'id_'|add:r|add:'_uplimit'}}_proxy" 
		       						name="{{r|add:'_uplimit'}}_proxy" 
		       						placeholder="{{ resource_info.placeholder}} " 
		       						{% if resource.unit == 'bytes' %} 
									 	class="dehumanize"
									{% endif  %}
		       						/> 
		    			<span class="extra-img">&nbsp;</span>
98
99
		         		<span class="info"><em>more info</em><span>Leave this field blank if you don't want to specify this resource</span></span>
		         		<p class="error-msg">Invalid format</p>
Olga Brani's avatar
Merge    
Olga Brani committed
100
101
102
103
104
		    		</p>
		    		<p class="msg"></p>
		    	</div>
		    	 
 
105
 
Olga Brani's avatar
Olga Brani committed
106
107
108
109
110
111
112
		    </fieldset>
		    {% endwith %}
		    {% endwith %}
		    {% endfor %}
	    </div>
	    
    	{% endfor %}
Olga Brani's avatar
Olga Brani committed
113
	</div>
Olga Brani's avatar
Olga Brani committed
114
115
116
117
    {% endwith %}
    {% endwith %}
	 
    <div class="form-row submit">
118
 
Olga Brani's avatar
Merge    
Olga Brani committed
119
   		<input type="submit" value="CONTINUE" class="submit altcol" autocomplete="off">
120
 
Olga Brani's avatar
Olga Brani committed
121
122
123
124
125
126
127
128
	</div>     
</form>
	 
<script>
	
</script>	 
 
{% endblock %}