Added a hide columns with no actions checkbox. Added cookie to that. Minor cleanup
[flowspy] / templates / review.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% block title %}{% trans "Review application" %} #{{ application.pk }}{% endblock %}
4 {% block content %}
5 <style type="text/css">
6 .comments {
7         font-style: italic;
8         max-width: 40em;
9 }
10 .notice {
11         text-align: center;
12         font-style: italic;
13 }
14
15 #review {
16         max-width: 50em;
17         margin-left: auto;
18         margin-right: auto;
19 }
20 </style>
21 <script>
22         function set_network(net){
23                 $("#id_network").val(net);
24         }
25 </script>
26 <div align="center" id="review">
27 <h2>{% trans "Review application" %} #{{ application.pk }} {% trans "by" %} {{ application.applicant }}</h2>
28 <p>{% trans "Submitted" %} {{ application.filed|date }}</p>
29 {% if application.is_pending %}
30 <form method="POST" id="appform">
31 {% csrf_token %}
32 <fieldset>
33 <legend>{% trans "Instance information" %}</legend>
34 <table>
35 <tr><th>{{ appform.hostname.label_tag }}</th><td>{{ appform.hostname }}<span class="error">{{ appform.hostname.errors|join:", " }}</span></td></tr>
36 <tr><th>{{ appform.memory.label_tag }}</th><td>{{ appform.memory }}<span class="error">{{ appform.memory.errors|join:", " }}</span></td></tr>
37 <tr><th>{{ appform.vcpus.label_tag }}</th><td>{{ appform.vcpus }}<span class="error">{{ appform.vcpus.errors|join:", " }}</span></td></tr>
38 <tr><th>{{ appform.disk_size.label_tag }}</th><td>{{ appform.disk_size }}<span class="error">{{ appform.disk_size.errors|join:", " }}</span></td></tr>
39 <tr><th>{{ appform.organization.label_tag }}</th><td>{{ appform.organization }}<span class="error">{{ appform.organization.errors|join:", " }}</span></td></tr>
40 <tr><th>{{ appform.hosts_mail_server.label_tag }}</th><td>{{ appform.hosts_mail_server }}<span class="error">{{ appform.hosts_mail_server.errors|join:", " }}</span></td></tr>
41 <tr><th>{{ appform.operating_system.label_tag }}</th><td>{{ appform.operating_system }}<span class="error">{{ appform.operating_system.errors|join:", " }}</span></td></tr>
42 </table>
43 </fieldset>
44
45 {% if application.admin_contact_name %}
46 <fieldset>
47 <legend>{% trans "Administrative contact" %}</legend>
48 <table>
49 <tr><th>{% trans "Name" %}</th><td>{{ application.admin_contact_name }}</td></tr>
50 <tr><th>{% trans "Email" %}</th><td>{{ application.admin_contact_email }}</td></tr>
51 <tr><th>{% trans "Phone" %}</th><td>{{ application.admin_contact_phone }}</td></tr>
52 </table>
53 </fieldset>
54 {% endif %}
55
56 <fieldset>
57 <legend>{% trans "Comments" %}</legend>
58 <div class="comments">
59 {{ application.comments }}
60 </div>
61 </fieldset>
62
63 <fieldset>
64 <legend>{% trans "Placement" %}</legend>
65 {% if application.network %}
66 <div class="notice">
67 {% trans "The user has requested explicit network placement on" %} {{ application.network }} ({{ application.network.cluster.description }})
68 </div>
69 {% endif %}
70
71 <p>{% trans "Choose either a network, or a cluster from the quick list to use the cluster's default network." %}</p>
72 <p>{% trans "Network" %}: {{ appform.network }}</p>
73 {% if appform.network.errors %}
74 <p class="error">{{ appform.network.errors|join:", " }}</p>
75 {% endif %}
76 <p>{% for cl in fast_clusters %}<a href="#" onclick="set_network('{{ cl.get_default_network.pk }}');">{{ cl.description }} ({{ cl.slug }})</a> {% if not forloop.last %}| {% endif %}{% endfor %}</p>
77 </fieldset>
78
79 <fieldset>
80 <legend>{% trans "Decision" %}</legend>
81 <p>{% trans "Comments to the user" %}:</p>
82 {% if appform.admin_comments.errors %}
83 <p><span class="error">{{ appform.admin_comments.errors }}</span></p>
84 {% endif %}
85 <p>{{ appform.admin_comments }}</p>
86 <p><input type="submit" value="Accept" name="accept"/> <input type="submit" value="Reject" name="reject" /></p>
87 </legend>
88 </form>
89 {% else %}
90 <fieldset>
91 <legend>{% trans "Instance information" %}</legend>
92 <table>
93 <tr><th>{{ appform.hostname.label_tag }}</th><td>{{ application.hostname }}</td></tr>
94 <tr><th>{{ appform.memory.label_tag }}</th><td>{{ application.memory }}</td></tr>
95 <tr><th>{{ appform.vcpus.label_tag }}</th><td>{{ application.vcpus }}</td></tr>
96 <tr><th>{{ appform.disk_size.label_tag }}</th><td>{{ application.disk_size }}</td></tr>
97 <tr><th>{{ appform.organization.label_tag }}</th><td>{{ application.organization }}</td></tr>
98 <tr><th>{{ appform.hosts_mail_server.label_tag }}</th><td>{{ application.hosts_mail_server }}</td></tr>
99 <tr><th>{{ appform.operating_system.label_tag }}</th><td>{{ application.operating_system }}</td></tr>
100 </table>
101 </fieldset>
102
103 {% if application.admin_contact_name %}
104 <fieldset>
105 <legend>{% trans "Administrative contact" %}</legend>
106 <table>
107 <tr><th>{% trans "Name" %}</th><td>{{ application.admin_contact_name }}</td></tr>
108 <tr><th>{% trans "Email" %}</th><td>{{ application.admin_contact_email }}</td></tr>
109 <tr><th>{% trans "Phone" %}</th><td>{{ application.admin_contact_phone }}</td></tr>
110 </table>
111 </fieldset>
112 {% endif %}
113
114 <fieldset>
115 <legend>{% trans "Comments" %}</legend>
116 <div class="comments">
117 {{ application.comments }}
118 </div>
119 </fieldset>
120
121 <fieldset>
122 <legend>{% trans "Placement" %}</legend>
123 <p>{% trans "The instance has been placed on" %} {{ application.network }} ({{ application.cluster.description }})</p>
124 </fieldset>
125 {% endif %}
126
127 </div>
128 {% endblock %}