{% block extra_css %}
<link href="{% static 'qcg/selectize/selectize.bootstrap3.css' %}" rel="stylesheet">
- <link href="{% static 'qcg/datetimepicker/bootstrap-datetimepicker.min.css' %}" rel="stylesheet">
{% endblock %}
{% block extra_js %}
<script src="{% static 'qcg/selectize/selectize.min.js' %}"></script>
<script src="{% static 'qcg/formset/jquery.formset.js' %}"></script>
- <script src="{% static 'qcg/moment/moment.min.js' %}"></script>
- <script src="{% static 'qcg/moment/pl.js' %}"></script>
- <script src="{% static 'qcg/datetimepicker/bootstrap-datetimepicker.min.js' %}"></script>
<script>
$(function() {
- $('#id_application, #id_host').selectize();
+ $('#id_application').selectize();
$('#id_arguments,#id_properties,#id_native').selectize({
plugins: ['remove_button'],
create: true,
}
}
});
- $('#id_modules').selectize({
+ $('#id_modules, #id_hosts').selectize({
plugins: ['remove_button']
});
deleteCssClass: 'delete-btn btn btn-xs btn-danger'
});
- $('#id_not_before,#id_not_after').datetimepicker({
- locale: 'pl',
- minDate: moment()
- });
-
$('input[name="notify_type"],input[name="watch_output_type"],input[name="preprocess_type"],input[name="postprocess_type"]').on('change', function () {
$(this).tab('show');
}).each(function() {
{% 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>