Made empty placeholders the default.
This commit is contained in:
@@ -23,6 +23,10 @@ STATIC_ROOT = os.path.join(BASE_VAR_DIR, 'www', 'static')
|
||||
|
||||
LANGUAGE_CODE = 'de'
|
||||
|
||||
BOOTSTRAP3 = {
|
||||
'set_placeholder': False,
|
||||
}
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
|
||||
@@ -23,12 +23,7 @@ class LoginForm(auth_forms.AuthenticationForm):
|
||||
username = auth_forms.UsernameField(
|
||||
max_length=254,
|
||||
label=_(u'E-Mail-Adresse'),
|
||||
widget=forms.TextInput(attrs={'autofocus': True,
|
||||
'placeholder': ''}),
|
||||
)
|
||||
password = forms.CharField(
|
||||
label=_(u'Passwort'),
|
||||
widget=forms.PasswordInput(attrs={'placeholder': ''}),
|
||||
widget=forms.TextInput(attrs={'autofocus': True}),
|
||||
)
|
||||
|
||||
error_messages = {
|
||||
@@ -44,10 +39,10 @@ class LoginForm(auth_forms.AuthenticationForm):
|
||||
class SetPasswordForm(forms.Form):
|
||||
new_password = forms.CharField(max_length=12,
|
||||
label=_(u'Neues Passwort'),
|
||||
widget=forms.PasswordInput(attrs={'placeholder': ''}))
|
||||
widget=forms.PasswordInput)
|
||||
new_password_repeat = forms.CharField(max_length=12,
|
||||
label=_(u'Neues Passwort wiederholen'),
|
||||
widget=forms.PasswordInput(attrs={'placeholder': ''}))
|
||||
widget=forms.PasswordInput)
|
||||
send_password_mail = forms.BooleanField(required=False,
|
||||
label=_(u'Neues Passwort per E-Mail zusenden'),
|
||||
)
|
||||
@@ -196,9 +191,7 @@ class ModeForm(EventCreateForm):
|
||||
first_day = forms.DateField(required=True,
|
||||
label=_(u'Erster Tag'),
|
||||
help_text=_(u'Format: tt.mm.jjjj'),
|
||||
widget=DateWidget(attrs={'id': 'id_first_day_widget',
|
||||
'placeholder': '',
|
||||
},
|
||||
widget=DateWidget(attrs={'id': 'id_first_day_widget'},
|
||||
usel10n=True,
|
||||
options={
|
||||
# 'format': 'dd.mm.yyyy',
|
||||
@@ -274,7 +267,7 @@ class TrainingForm(EventCreateForm):
|
||||
|
||||
course_topic_1 = forms.CharField(required=True,
|
||||
label=u'%s - %s 1' % (_(u'Kursinhalt'), _(u'Absatz')),
|
||||
widget=forms.Textarea(attrs={'rows': 2, 'placeholder': ''}))
|
||||
widget=forms.Textarea(attrs={'rows': 2}))
|
||||
course_topic_2 = forms.CharField(required=False,
|
||||
label=u'%s - %s 2' % (_(u'Kursinhalt'), _(u'Absatz')),
|
||||
widget=forms.TextInput(attrs={'placeholder': _(u'Kann frei gelassen werden')}))
|
||||
@@ -293,7 +286,7 @@ class TrainingForm(EventCreateForm):
|
||||
|
||||
course_goal_1 = forms.CharField(required=True,
|
||||
label=u'%s - %s 1' % (_(u'Kursziel'), _(u'Absatz')),
|
||||
widget=forms.Textarea(attrs={'rows': 2, 'placeholder': ''}))
|
||||
widget=forms.Textarea(attrs={'rows': 2}))
|
||||
course_goal_2 = forms.CharField(required=False,
|
||||
label=u'%s - %s 2' % (_(u'Kursziel'), _(u'Absatz')),
|
||||
widget=forms.TextInput(attrs={'placeholder': _(u'Kann frei gelassen werden')}))
|
||||
@@ -473,7 +466,8 @@ class RequirementsForm(EventCreateForm):
|
||||
_(u'Schwierigkeitsgrade in arabischen Ziffern,'
|
||||
u' Km, Hm, Stunden.')
|
||||
),
|
||||
widget=forms.Textarea(attrs={'rows': 2, 'placeholder': ''}))
|
||||
widget=forms.Textarea(attrs={'rows': 2,
|
||||
'placeholder': _(u'Kann frei gelassen werden')}))
|
||||
|
||||
equipment = forms.CharField(required=False,
|
||||
label=_(u'Ausrüstung'),
|
||||
@@ -483,7 +477,8 @@ class RequirementsForm(EventCreateForm):
|
||||
u' der potentielle Teilnehmer soll aber ein Vorstellung davon bekommen,'
|
||||
u' was er sich gegebenenfalls noch leihen/beschaffen muss.')
|
||||
),
|
||||
widget=forms.Textarea(attrs={'rows': 2, 'placeholder': ''}))
|
||||
widget=forms.Textarea(attrs={'rows': 2,
|
||||
'placeholder': _(u'Kann frei gelassen werden')}))
|
||||
|
||||
pre_meeting_1 = forms.DateTimeField(required=False,
|
||||
label=u'1. %s' % _(u'Vortreffen'),
|
||||
@@ -590,7 +585,7 @@ class DescriptionForm(EventCreateForm):
|
||||
label=_(u'Name/Titel der Veranstaltung'),
|
||||
)
|
||||
description = forms.CharField(label=_(u'Beschreibung'),
|
||||
widget=forms.Textarea(attrs={'placeholder': u''}))
|
||||
widget=forms.Textarea())
|
||||
|
||||
def _proceed_session_data(self, session_data):
|
||||
super(DescriptionForm, self)._proceed_session_data(session_data)
|
||||
@@ -623,7 +618,6 @@ class DescriptionForm(EventCreateForm):
|
||||
if not title_prefix:
|
||||
title_prefix = u'Development Default Title'
|
||||
|
||||
self.fields['title'].widget.attrs['placeholder'] = u''
|
||||
self.fields['title'].initial = title_prefix
|
||||
|
||||
|
||||
@@ -741,11 +735,11 @@ class TrainerForm(EventCreateForm):
|
||||
self.fields['trainer_email'].widget.attrs['placeholder'] = _(u'heinzel@alpenverein-karlsruhe.de')
|
||||
self.fields['trainer_phone'].widget.attrs['placeholder'] = _(u'0150 150 15 01')
|
||||
self.fields['trainer_2_fullname'].widget.attrs['placeholder'] = _(u'Kann freigelassen werden')
|
||||
self.fields['trainer_2_email'].widget.attrs['placeholder'] = u''
|
||||
self.fields['trainer_2_phone'].widget.attrs['placeholder'] = u''
|
||||
self.fields['trainer_2_email'].widget.attrs['placeholder'] = u'--'
|
||||
self.fields['trainer_2_phone'].widget.attrs['placeholder'] = u'--'
|
||||
self.fields['trainer_3_fullname'].widget.attrs['placeholder'] = _(u'Kann freigelassen werden')
|
||||
self.fields['trainer_3_email'].widget.attrs['placeholder'] = u''
|
||||
self.fields['trainer_3_phone'].widget.attrs['placeholder'] = u''
|
||||
self.fields['trainer_3_email'].widget.attrs['placeholder'] = u'--'
|
||||
self.fields['trainer_3_phone'].widget.attrs['placeholder'] = u'--'
|
||||
|
||||
if DEVELOPMENT_INIT_FORMS:
|
||||
self.fields['trainer_firstname'].initial = self.fields['trainer_firstname'].widget.attrs['placeholder']
|
||||
@@ -758,7 +752,7 @@ class ChargesForm(EventCreateForm):
|
||||
_next_form_name = 'OverviewForm'
|
||||
|
||||
charge_key = forms.CharField(disabled=True,
|
||||
label=_(u'Abrechnungsschlüssel'),
|
||||
label=_(u'Kostenschlüssel'),
|
||||
)
|
||||
trainer_fee = forms.FloatField(disabled=True,
|
||||
label=_(u'Pauschale Trainer*in'),
|
||||
@@ -807,32 +801,32 @@ class ChargesForm(EventCreateForm):
|
||||
elif sport == 'W' and not last_day:
|
||||
charge_key = '0'
|
||||
elif sport == 'W' and terrain != 'alpine':
|
||||
charge_key = u'A'
|
||||
charge_key = 'A'
|
||||
elif sport == 'W':
|
||||
charge_key = u'B'
|
||||
charge_key = 'B'
|
||||
elif terrain != 'alpine' and not last_day:
|
||||
charge_key = u'C'
|
||||
charge_key = 'C'
|
||||
elif terrain != 'alpine':
|
||||
charge_key = u'D'
|
||||
charge_key = 'D'
|
||||
elif mode == 'training' and country in ('DE', 'AU'):
|
||||
charge_key = u'G'
|
||||
charge_key = 'G'
|
||||
elif mode == 'training':
|
||||
charge_key = u'H'
|
||||
charge_key = 'H'
|
||||
elif sport == 'K' and country in ('DE', 'AU'):
|
||||
charge_key = u'E'
|
||||
charge_key = 'E'
|
||||
elif sport == 'K':
|
||||
charge_key = u'F'
|
||||
charge_key = 'F'
|
||||
elif country in ('DE', 'AU'):
|
||||
charge_key = u'I'
|
||||
charge_key = 'I'
|
||||
else:
|
||||
charge_key = u'J'
|
||||
charge_key = 'J'
|
||||
|
||||
additional_costs_text = ugettext(u'Fahrtkosten')
|
||||
|
||||
if last_day:
|
||||
timedelta = last_day - first_day
|
||||
ndays = timedelta.days + 1
|
||||
additional_costs_text += ugettext(u', Verpflegung und Unterkunft')
|
||||
additional_costs_text += ugettext(u', Unterkunft und Verpflegung')
|
||||
else:
|
||||
ndays = 1
|
||||
if pre_meeting_2:
|
||||
@@ -869,6 +863,7 @@ class ChargesForm(EventCreateForm):
|
||||
self.fields['trainer_reward'].initial = trainer_reward
|
||||
|
||||
self.fields['charge'].initial = charge
|
||||
self.fields['additional_costs'].widget.attrs['placeholder'] = ugettext(u'Kann freigelassen werden')
|
||||
self.fields['additional_costs'].initial = additional_costs_text
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user