)
application = forms.ChoiceField(choices=APPLICATION_CHOICES, label=u"Aplikacja", required=False) # TODO choices
+ master_file = forms.CharField(label=u"Plik główny", max_length=500, required=False) # TODO grid ftp
executable = forms.CharField(label=u"Plik wykonywalny", max_length=500, required=False) # TODO grid ftp
script = forms.CharField(label=u"Skrypt", widget=forms.Textarea(attrs={'rows': 2, 'cols': 40}), required=False) # TODO saving to grid ftp
arguments = forms.MultipleChoiceField(label=u"Argumenty", required=False)
<script>
$(function() {
- $('#id_executable,#id_input,#id_stage_in,#id_preprocess_script,#id_postprocess_script').before(function() {
+ $('#id_master_file,#id_executable,#id_input,#id_stage_in,#id_preprocess_script,#id_postprocess_script').before(function() {
var target = this;
return $('<button/>', {
'type': 'button',
}
}
});
- $('#id_modules,#id_hosts,#id_executable,#id_input,#id_stage_in,#id_preprocess_script,#id_postprocess_script').selectize({
+ $('#id_modules,#id_hosts,#id_master_file,#id_executable,#id_input,#id_stage_in,#id_preprocess_script,#id_postprocess_script').selectize({
plugins: ['remove_button']
});
<div class="tab-content">
<fieldset id="basic" class="tab-pane active" role="tabpanel">
{% bootstrap_field form.application layout="horizontal" %}
- <div class="row" style="margin-top: -15px; margin-bottom: 15px">
- <div class="col-sm-offset-3 col-md-offset-4 col-sm-9 col-md-6">
- {# TODO grid ftp #}
- <a id="add-main-file" href="#">wybierz plik główny »</a>
- </div>
- </div>
-
+ {% bootstrap_field form.master_file layout="horizontal" %}
{% bootstrap_field form.executable layout="horizontal" form_group_class="form-group collapse" %}
{% bootstrap_field form.script layout="horizontal" form_group_class="form-group collapse" %}
{% bootstrap_field form.arguments layout="horizontal" %}