Commit aca7511e authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Updating the help_text for the SSH form



I updated the SSH form in order to create the `help_text` argument in
the form class and call it directly in the template.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent 6770733f
Pipeline #42972 failed with stage
in 1 minute and 3 seconds
......@@ -44,7 +44,8 @@ class SSHForm(forms.ModelForm):
sshkey = forms.CharField(
label="SSH Key",
label_suffix='',
widget=forms.Textarea)
widget=forms.Textarea,
help_text=mark_safe('Before you can add an SSH key you need to <a href="https://gitlab.inria.fr/help/ssh/README#generating-a-new-ssh-key-pair">generate one</a> or use an <a href="https://gitlab.inria.fr/help/ssh/README#locating-an-existing-ssh-key-pair">existing key.</a>'),)
class Meta:
model = AllgoUser
......
......@@ -16,12 +16,7 @@
<div class="form-group">
{{ form.sshkey.label_tag }}
<small class="form-text text-muted">
Before you can add an SSH key you need to
<a href="https://gitlab.inria.fr/help/ssh/README#generating-a-new-ssh-key-pair">generate one</a>
or use an
<a href="https://gitlab.inria.fr/help/ssh/README#locating-an-existing-ssh-key-pair">existing key.</a>
</small>
<small class="form-text text-muted">{{ form.sshkey.help_text }}</small>
{{ form.sshkey | attr:"placeholder:Example ssh-rsa ...." | add_class:"form-control" }}
</div>
......
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