Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 6770733f authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Updating the help text on the form



I updated all the necessary `help_text` arguments on the form. I
performed few changes in the template to have a better rendering such
as:

- add a margin between the form and the sandbox box
- remove the floating button for the submit button (prevent an overflow
  of the footer on top of the button)
- add a "no preset available" text in the drop down menu
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent a2af2f10
Pipeline #42942 failed with stage
in 1 minute and 10 seconds
......@@ -99,19 +99,22 @@ class HomeSignupForm(SignupForm):
class JobForm(forms.ModelForm):
version = forms.CharField(
label = 'Version',
label_suffix='')
label_suffix='',
help_text='Version of the application')
files = forms.FileField(
widget=forms.FileInput(attrs={'multiple': True}),
required=False,
label='Files to upload',
label_suffix='')
label_suffix='',
help_text='Select all the files you want to upload by clicking on "Choose file"')
queue_id = forms.ModelChoiceField(
queryset=JobQueue.objects.all().distinct(),
initial=1,
label='Queue',
label_suffix='',
help_text=mark_safe('You can refer to the <a href="https://allgo.gitlabpages.inria.fr/doc/deploy.html#queue-type">queue type documentation</a> for further explanation.'),
)
param = forms.CharField(label='Parameters', label_suffix='', required=False)
param = forms.CharField(label='Parameters', label_suffix='', required=False, help_text='Enter the parameters you need or click on the "presets" button to select any predefined one.')
webapp_parameters = forms.ModelChoiceField(
queryset=WebappParameter.objects.all(),
label="presets",
......
......@@ -68,7 +68,7 @@
{% endif %}
{# Panels #}
<ul class="nav nav-tabs">
<ul class="nav nav-tabs mt-3">
<li class="nav-item"><a class="nav-link active" data-toggle="tab" href="#create-job"><i class="fas fa-database"></i> Run a job</a></li>
<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#api"><i class="fas fa-terminal"></i> Use the API</a></li>
{% if webapp.notebook_gitrepo %}
......@@ -86,6 +86,7 @@
<div class="form-group">
{{ form.files.label_tag }}
<input type="file" class="form-control-file filestyle" name="{{ form.files.name }}" id="inputGroupFile01" data-buttonBefore="true" data-badge="true" multiple>
<small class="form-text text-muted">{{ form.files.help_text }}</small>
</div>
{{ form.param | label_with_classes:"d-block" }}
......@@ -96,11 +97,14 @@
<div class="dropdown-menu">
{% for choice in form.webapp_parameters.field.queryset %}
<a class="dropdown-item" href="#" data-param="{{ choice.value }}">{{ choice.name }}</a>
{% empty %}
<p class="dropdown-item">No presets available</p>
{% endfor %}
</div>
</div>
{{ form.param | attr:"placeholder:Type your parameters" | add_class:"form-control dropdown-value" }}
{{ form.param | attr:"placeholder:Type your parameters here" | add_class:"form-control dropdown-value" }}
</div>
<small class="form-text text-muted">{{ form.param.help_text }}</small>
</div>
<div class="row">
......@@ -111,7 +115,9 @@
<option value="{{ choice }}">{{ choice }}</option>
{% endfor %}
</select>
<small class="form-text text-muted">{{ form.version.help_text }}</small>
</div>
<div class="col form-group">
{{ form.queue_id.label_tag }}
......@@ -122,10 +128,11 @@
>{{ choice | fancy_job_queue }}</option>
{% endfor %}
</select>
<small class="form-text text-muted">{{ form.queue_id.help_text }}</small>
</div>
</div>
<input class="btn btn-primary float-right" type="submit" value="Run this job">
<input class="btn btn-primary" type="submit" value="Run this job">
</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