Skip to content
Snippets Groups Projects
Commit a3361ff1 authored by Fanna Lautenbach's avatar Fanna Lautenbach
Browse files

add group to work specification form; add display none to hide it

parent 9ad8adfb
Branches
No related tags found
1 merge request!70Add form, url, template and view; no functionality yet
Pipeline #42685 passed
......@@ -30,14 +30,14 @@ class WorkSpecificationForm(ModelForm):
class Meta:
model = WorkSpecification
fields = ['filters', 'selected_workflow', 'selected_workflow_tag', 'processing_site',
'predecessor_specification', 'batch_size',
'is_auto_submit']
'predecessor_specification', 'batch_size', 'group', 'is_auto_submit']
labels = {
'selected_workflow': 'Selected workflow',
'selected_workflow_tag': 'Workflow tag',
'processing_site': 'Processing Site (ATDB)',
'predecessor_specification': 'Predecessor',
'batch_size': 'Files per task',
'group': 'Group',
'is_auto_submit': 'Auto submit'
}
help_texts = {'selected_workflow': "The pipeline to run on the processing site.",
......@@ -45,6 +45,7 @@ class WorkSpecificationForm(ModelForm):
'processing_site': "The ATDB processing site to run a specific workflow in.",
'predecessor_specification': "The related predecessor of the current work specification.",
'batch_size': "The number of files every task generated by this work specification should have. Example: 10 files in total can be split into 5 tasks of 2 files.",
'group': "Include the work specification to a group. Note that it will inherit the group's processing site and workflow specifications.",
'is_auto_submit': "By checking this box, the work specification will be directly sent to the processing site and thus does not need inspection."
}
......
......@@ -14,6 +14,7 @@
href="{% url 'specification-create' %}">
<span class="icon icon--plus"></span></a>
<a class="button button--secondary button--icon-button margin-left"
style="display: none"
title="Create a new group"
href="{% url 'group-create' %}">
<span class="icon icon--layer-plus"></span></a>
......
......@@ -24,6 +24,18 @@
<!-- Standard input fields -->
<div class="custom--div-margin">
<h3 class="text text--primary text--title">Selection</h3>
<div class="flex-wrapper flex-wrapper--row" id="div_id_group" style="display: none">
<div class="flex-wrapper flex-wrapper--row custom__input--fixed-min-width">
<label class="input__label"
for="id_group">{{ form.group.label }}</label>
<a class="tooltip-dias tooltip-dias-right custom--tooltip"
data-tooltip="{{ form.group.help_text }}">m</a>
</div>
<div class="input-select-wrapper icon--inline icon-after icon-after--angle-down margin-left margin-bottom">
{% render_field form.group class="input input--select custom__input--fixed-width" %}
</div>
</div>
<div class="flex-wrapper flex-wrapper--row" id="div_id_processing_site">
<div class="flex-wrapper flex-wrapper--row custom__input--fixed-min-width">
<label class="input__label">{{ form.processing_site.label }}*</label>
......@@ -89,7 +101,6 @@
</div>
</div>
<div class="flex-wrapper flex-wrapper--row" id="div_id_predecessor">
<div class="flex-wrapper flex-wrapper--row custom__input--fixed-min-width">
<label class="input__label"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment