X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=qcg%2Ftemplates%2Fqcg%2Fjob_submit.html;h=87b8a2c4d827ff9f1fd14a36ca7df04bb6186663;hb=5d89371016f27ca592862971f0e4c56a32c497bd;hp=77f6fc7cc004d88584c77f5a17c6a2ad4a41811c;hpb=8e788ac9ca0ebb6ff38d13bb6fd4bea8348c097f;p=qcg-portal.git diff --git a/qcg/templates/qcg/job_submit.html b/qcg/templates/qcg/job_submit.html index 77f6fc7..87b8a2c 100644 --- a/qcg/templates/qcg/job_submit.html +++ b/qcg/templates/qcg/job_submit.html @@ -129,22 +129,43 @@ $('#gridftp').one('show.bs.modal', function() { filex.initialLoad(); }); + + $('#template').on('show.bs.modal', function() { + this.reset(); + }).on('shown.bs.modal', function() { + $(this).find('input[type="text"]')[0].focus(); + }).on('submit', function(e) { + e.preventDefault(); + + // copy this form's fields to description form and send it + $('#description').append($(this).find('input').clone().attr('type', 'hidden')).submit(); + }); }); {% endblock %} {% block container %} -

{% block title %}Zleć zadanie{% endblock %}

+
+ {% if template %} + + + {% else %} + + {% endif %} +
+ +

{% block title %}Zleć zadanie{% endblock %} {{ template.name }}

{% if errors %}
Uwaga! Formularz zawiera błędy. {{ form.non_field_errors }} {{ env_formset.non_field_errors }} + {{ template_form.non_field_errors }}
{% endif %} -
+ {% csrf_token %} @@ -184,7 +205,6 @@
{% bootstrap_field form.input layout="horizontal" %} {% bootstrap_field form.stage_in layout="horizontal" %} -{# {% bootstrap_field form.stage_out layout="horizontal" form_group_class="form-group collapse" %}#}
@@ -330,12 +350,12 @@ -