diff --git a/AKSubmission/forms.py b/AKSubmission/forms.py index 1529a661da6fdcaae695192ad8c073aa05382a06..3bf2bd645f84e702ecf29170b35a7b94dc9d64f2 100644 --- a/AKSubmission/forms.py +++ b/AKSubmission/forms.py @@ -1,12 +1,13 @@ from django import forms from django.core.exceptions import ValidationError +from django.utils.translation import ugettext_lazy as _ from AKModel.models import AK, AKOwner -from django.utils.translation import ugettext_lazy as _ - class AKForm(forms.ModelForm): + required_css_class = 'required' + class Meta: model = AK fields = ['name', @@ -83,7 +84,6 @@ class AKForm(forms.ModelForm): class AKSubmissionForm(AKForm): - class Meta(AKForm.Meta): exclude = ['link'] @@ -93,7 +93,8 @@ class AKSubmissionForm(AKForm): self.fields["durations"] = forms.CharField( widget=forms.Textarea, 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): class AKOwnerForm(forms.ModelForm): + required_css_class = 'required' + class Meta: model = AKOwner fields = ['name', 'email', 'institution', 'link'] diff --git a/static_common/common/css/custom.css b/static_common/common/css/custom.css new file mode 100644 index 0000000000000000000000000000000000000000..3f26ff56455004b44ea1571fdb68f2299bfff3c7 --- /dev/null +++ b/static_common/common/css/custom.css @@ -0,0 +1,3 @@ +.form-group.required { + font-weight: bold; +} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 412b61095cac80628969ee5b75f3d0c9457deb8d..ad0c138aeac5978294db8fe0ed8114ba14ed02a0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -14,6 +14,8 @@ {% bootstrap_javascript jquery='slim' %} {% fontawesome_stylesheet %} + <link rel="stylesheet" href="{% static 'common/css/custom.css' %}"> + {% block imports %}{% endblock %} </head> <body>