@@ -2,6 +2,8 @@ from allauth.account.forms import SignupForm
fromdjangoimportforms
fromdjango.contrib.auth.modelsimportUser
fromdjango.core.validatorsimportRegexValidator
fromdjango.utils.safestringimportmark_safe
fromtaggit.formsimportTagField
importconfig
...
...
@@ -42,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>'),)
classMeta:
model=AllgoUser
...
...
@@ -56,7 +59,7 @@ class UserWebappForm(forms.ModelForm):
owner=forms.CharField(required=False,label="Owner",label_suffix='',help_text="Username of the new owner of the application. You will immediately loose access to the application.")
@@ -97,19 +100,22 @@ class HomeSignupForm(SignupForm):
classJobForm(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='Click "Choose file" to select and upload your job\'s input files')
queue_id=forms.ModelChoiceField(
queryset=JobQueue.objects.all().distinct(),
initial=1,
label='Queue',
label_suffix='',
help_text=mark_safe('The <a href="https://allgo.gitlabpages.inria.fr/doc/run.html?highlight=queue#queue">queue for scheduling your job</a>. Queues with shorter limit have a higher priority.'),
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",
...
...
@@ -162,7 +168,7 @@ class WebappForm(forms.ModelForm):
contact=forms.EmailField(label="Email contact",label_suffix="",required=False,help_text="By default this will be your personnal e-mail address. You may fill this field if you wish to use a different contact address.")
help_text=mark_safe('The default <a href="https://allgo.gitlabpages.inria.fr/doc/deploy.html#queue">queue for scheduling new jobs</a> using this app.'),
help_text=mark_safe('This is the <a href="https://allgo.gitlabpages.inria.fr/doc/deploy.html#entrypoint">command executed when allgo runs a job</a> for this app.'),
{{ form.description | attr:"placeholder:Consider it as the app README file" | add_class:"form-control" }}
<smallid="descriptionHelp"class="form-text text-muted"><ahref="https://daringfireball.net/projects/markdown/syntax"title="Markdown syntax">Mardown syntax</a> is used for formatting.</small>
<smallclass="form-text text-muted"><ahref="https://daringfireball.net/projects/markdown/syntax"title="Markdown syntax">Mardown syntax</a> is used for formatting.</small>