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

- 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 <>
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',
help_text='Version of the application')
files = forms.FileField(
widget=forms.FileInput(attrs={'multiple': True}),
label='Files to upload',
help_text='Select all the files you want to upload by clicking on "Choose file"')
queue_id = forms.ModelChoiceField(
help_text=mark_safe('You can refer to the <a href="">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(
......@@ -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="{{ }}" id="inputGroupFile01" data-buttonBefore="true" data-badge="true" multiple>
<small class="form-text text-muted">{{ form.files.help_text }}</small>
{{ 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 }}">{{ }}</a>
{% empty %}
<p class="dropdown-item">No presets available</p>
{% endfor %}
{{ 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" }}
<small class="form-text text-muted">{{ form.param.help_text }}</small>
<div class="row">
......@@ -111,7 +115,9 @@
<option value="{{ choice }}">{{ choice }}</option>
{% endfor %}
<small class="form-text text-muted">{{ form.version.help_text }}</small>
<div class="col form-group">
{{ form.queue_id.label_tag }}
......@@ -122,10 +128,11 @@
>{{ choice | fancy_job_queue }}</option>
{% endfor %}
<small class="form-text text-muted">{{ form.queue_id.help_text }}</small>
<input class="btn btn-primary float-right" type="submit" value="Run this job">
<input class="btn btn-primary" type="submit" value="Run this job">
Supports Markdown
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