Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 8edc9555 authored by Mikaël Salson's avatar Mikaël Salson Committed by Ryan Herbert
Browse files

views/{sample_set,file}/form.html: Bikeshedding on 'add' buttons placement

It should be better to have the add buttons before the form rather than after.
When they are after they move each time a row is added. Therefore if one knows
that s⋅he needs 10 samples, s⋅he couldn't click 10 times quickly on the link,
s⋅he had to click, wait for the new row to appear, adjust the mouse position,
click, and so on…
parent 99b9e7b5
......@@ -2335,6 +2335,10 @@ form {
}
}
.buttons_add_elements {
margin: 1em 0;
}
/* atwho css */
.atwho-view {
......
......@@ -55,6 +55,14 @@
type="text">
</div>
</div>
<div class="clear"></div>
<div class="buttons_add_elements">
<span class="button"
onclick="add_file('fieldset_container', this.dataset.index++, {{=group_ids}})"
id="file_button"
data-index="{{=len(files)}}">add file</span>
<div class="clear"></div>
</div>
<div id="fieldset_container">
{{ for i, file in enumerate(files): }}
<div class="clear"></div>
......@@ -62,11 +70,6 @@
{{ pass }}
</div>
<div class="clear"></div>
<span class="button"
onclick="add_file('fieldset_container', this.dataset.index++, {{=group_ids}})"
id="file_button"
data-index="{{=len(files)}}">add file</span>
<div class="clear"></div>
<input type="submit" value="Soumettre" class="btn">
</form>
......
......@@ -5,6 +5,21 @@
<label for="group_select" id="patient_group__label">Owner Group: </label>
{{= SELECT(*[OPTION(g['name'], _value=g['id']) for g in groups], _id="group_select", _name="group", _value=master_group, value=master_group) }}
</div>
<div class="buttons_add_elements">
<span class="button"
onclick="document.getElementById('fieldset_container').appendChild(new PatientFormBuilder().build(this.dataset.index++));"
id="patient_button"
data-index="{{=len(sets[defs.SET_TYPE_PATIENT])}}">add patient</span>
<span class="button"
onclick="document.getElementById('fieldset_container').appendChild(new RunFormBuilder().build(this.dataset.index++));"
id="run_button"
data-index="{{=len(sets[defs.SET_TYPE_RUN])}}">add run</span>
<span class="button"
onclick="document.getElementById('fieldset_container').appendChild(new GenericFormBuilder().build(this.dataset.index++));"
id="generic_button"
data-index="{{=len(sets[defs.SET_TYPE_GENERIC])}}">add set</span>
<div class="clear"></div>
</div>
<div id="fieldset_container">
{{ for set_type in sets: }}
{{ for i, set in enumerate(sets[set_type]): }}
......@@ -19,19 +34,6 @@
{{ pass }}
</div>
<div class="clear"></div>
<span class="button"
onclick="document.getElementById('fieldset_container').appendChild(new PatientFormBuilder().build(this.dataset.index++));"
id="patient_button"
data-index="{{=len(sets[defs.SET_TYPE_PATIENT])}}">add patient</span>
<span class="button"
onclick="document.getElementById('fieldset_container').appendChild(new RunFormBuilder().build(this.dataset.index++));"
id="run_button"
data-index="{{=len(sets[defs.SET_TYPE_RUN])}}">add run</span>
<span class="button"
onclick="document.getElementById('fieldset_container').appendChild(new GenericFormBuilder().build(this.dataset.index++));"
id="generic_button"
data-index="{{=len(sets[defs.SET_TYPE_GENERIC])}}">add set</span>
<div class="clear"></div>
<input type="submit" value="save" class="btn"></td>
</form>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment