fixes for updated api
[qcg-portal.git] / qcg / templates / qcg / job_new.html
index 7929749..6ed34c4 100644 (file)
@@ -29,7 +29,7 @@
                     }
                 }
             });
-            $('#id_modules, #id_host').selectize({
+            $('#id_modules, #id_hosts').selectize({
                 plugins: ['remove_button']
             });
 
 {% block container %}
     <h1 class="page-header">{% block title %}Zleć zadanie{% endblock %}</h1>
 
+    {% if errors %}
+        <div class="alert alert-danger">
+            <strong>Uwaga!</strong> Formularz zawiera błędy.
+            {{ form.non_field_errors }}
+            {{ env_formset.non_field_errors }}
+        </div>
+    {% endif %}
+
     <form action="." method="post" class="form-horizontal">
         {% csrf_token %}
 
                 {% bootstrap_field form.script layout="horizontal" form_group_class="form-group collapse" %}
                 {% bootstrap_field form.arguments layout="horizontal" %}
                 {% bootstrap_field form.note layout="horizontal" %}
-                {% bootstrap_field form.grant layout="horizontal" %}
+                {% bootstrap_field form.grant layout="horizontal" form_group_class="form-group collapse" %}
             </fieldset>
 
             <fieldset id="resources" class="tab-pane" role="tabpanel">
-                {% bootstrap_field form.host layout="horizontal" %}
+                {% bootstrap_field form.hosts layout="horizontal" %}
                 {% bootstrap_field form.queue layout="horizontal" %}
                 {% bootstrap_field form.properties layout="horizontal" form_group_class="form-group collapse" %}
                 {% bootstrap_field form.modules layout="horizontal" form_group_class="form-group collapse" %}
                                 <label class="btn btn-default">
                                     <input type="radio" autocomplete="off" name="{{ option.name }}" value="{{ option.choice_value }}"
                                             {% if option.is_checked %}checked{% endif %}
-                                            data-target=".notify-type-{{ option.choice_value }}"> {{ option.choice_label }}
+                                            data-target=".notify-type-{{ forloop.counter0 }}"> {{ option.choice_label }}
                                 </label>
                             {% endfor %}
                         </div>
                                     <label class="btn btn-default">
                                         <input type="radio" autocomplete="off" name="{{ option.name }}" value="{{ option.choice_value }}"
                                                 {% if option.is_checked %}checked{% endif %}
-                                                data-target=".watch-output-type-{{ option.choice_value }}"> {{ option.choice_label }}
+                                                data-target=".watch-output-type-{{ forloop.counter0 }}"> {{ option.choice_label }}
                                     </label>
                                 {% endfor %}
                             </div>
                                 <label class="btn btn-default">
                                     <input type="radio" autocomplete="off" name="{{ option.name }}" value="{{ option.choice_value }}"
                                             {% if option.is_checked %}checked{% endif %}
-                                            data-target=".preprocess-type-{{ option.choice_value }}"> {{ option.choice_label }}
+                                            data-target=".preprocess-type-{{ forloop.counter0 }}"> {{ option.choice_label }}
                                 </label>
                             {% endfor %}
                         </div>
                                 <label class="btn btn-default">
                                     <input type="radio" autocomplete="off" name="{{ option.name }}" value="{{ option.choice_value }}"
                                             {% if option.is_checked %}checked{% endif %}
-                                            data-target=".postprocess-type-{{ option.choice_value }}"> {{ option.choice_label }}
+                                            data-target=".postprocess-type-{{ forloop.counter0 }}"> {{ option.choice_label }}
                                 </label>
                             {% endfor %}
                         </div>