Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Weitz
AKPlanning
Commits
e5ca5640
Commit
e5ca5640
authored
5 years ago
by
Nadja Geisler
Browse files
Options
Downloads
Patches
Plain Diff
highlight required fields in forms in bold
parent
3ddf2458
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AKSubmission/forms.py
+7
-4
7 additions, 4 deletions
AKSubmission/forms.py
static_common/common/css/custom.css
+3
-0
3 additions, 0 deletions
static_common/common/css/custom.css
templates/base.html
+2
-0
2 additions, 0 deletions
templates/base.html
with
12 additions
and
4 deletions
AKSubmission/forms.py
+
7
−
4
View file @
e5ca5640
from
django
import
forms
from
django
import
forms
from
django.core.exceptions
import
ValidationError
from
django.core.exceptions
import
ValidationError
from
django.utils.translation
import
ugettext_lazy
as
_
from
AKModel.models
import
AK
,
AKOwner
from
AKModel.models
import
AK
,
AKOwner
from
django.utils.translation
import
ugettext_lazy
as
_
class
AKForm
(
forms
.
ModelForm
):
class
AKForm
(
forms
.
ModelForm
):
required_css_class
=
'
required
'
class
Meta
:
class
Meta
:
model
=
AK
model
=
AK
fields
=
[
'
name
'
,
fields
=
[
'
name
'
,
...
@@ -83,7 +84,6 @@ class AKForm(forms.ModelForm):
...
@@ -83,7 +84,6 @@ class AKForm(forms.ModelForm):
class
AKSubmissionForm
(
AKForm
):
class
AKSubmissionForm
(
AKForm
):
class
Meta
(
AKForm
.
Meta
):
class
Meta
(
AKForm
.
Meta
):
exclude
=
[
'
link
'
]
exclude
=
[
'
link
'
]
...
@@ -93,7 +93,8 @@ class AKSubmissionForm(AKForm):
...
@@ -93,7 +93,8 @@ class AKSubmissionForm(AKForm):
self
.
fields
[
"
durations
"
]
=
forms
.
CharField
(
self
.
fields
[
"
durations
"
]
=
forms
.
CharField
(
widget
=
forms
.
Textarea
,
widget
=
forms
.
Textarea
,
label
=
_
(
"
Duration(s)
"
),
label
=
_
(
"
Duration(s)
"
),
help_text
=
_
(
"
Enter at least one planned duration (in hours). If your AK should have multiple slots, use multiple lines
"
)
help_text
=
_
(
"
Enter at least one planned duration (in hours). If your AK should have multiple slots, use multiple lines
"
)
)
)
...
@@ -112,6 +113,8 @@ class AKWishForm(AKSubmissionForm):
...
@@ -112,6 +113,8 @@ class AKWishForm(AKSubmissionForm):
class
AKOwnerForm
(
forms
.
ModelForm
):
class
AKOwnerForm
(
forms
.
ModelForm
):
required_css_class
=
'
required
'
class
Meta
:
class
Meta
:
model
=
AKOwner
model
=
AKOwner
fields
=
[
'
name
'
,
'
email
'
,
'
institution
'
,
'
link
'
]
fields
=
[
'
name
'
,
'
email
'
,
'
institution
'
,
'
link
'
]
This diff is collapsed.
Click to expand it.
static_common/common/css/custom.css
0 → 100644
+
3
−
0
View file @
e5ca5640
.form-group.required
{
font-weight
:
bold
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
templates/base.html
+
2
−
0
View file @
e5ca5640
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
{% bootstrap_javascript jquery='slim' %}
{% bootstrap_javascript jquery='slim' %}
{% fontawesome_stylesheet %}
{% fontawesome_stylesheet %}
<link
rel=
"stylesheet"
href=
"{% static 'common/css/custom.css' %}"
>
{% block imports %}{% endblock %}
{% block imports %}{% endblock %}
</head>
</head>
<body>
<body>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment