Commit 156473d4 by Kálmán Viktor

Merge branch 'issue-245' into 'master'

 Use gettext in LeaseForm

Closes #245
parents 4263acfd 16af9f8e
...@@ -634,12 +634,8 @@ class LeaseForm(forms.ModelForm): ...@@ -634,12 +634,8 @@ class LeaseForm(forms.ModelForm):
Field('name'), Field('name'),
Field("suspend_interval_seconds", type="hidden", value="0"), Field("suspend_interval_seconds", type="hidden", value="0"),
Field("delete_interval_seconds", type="hidden", value="0"), Field("delete_interval_seconds", type="hidden", value="0"),
HTML(string_concat("<label>", _("Suspend in"), "</label>")),
Div( Div(
Div(
HTML(_("Suspend in")),
css_class="input-group-addon",
style="width: 100px;",
),
NumberField("suspend_hours", css_class="form-control"), NumberField("suspend_hours", css_class="form-control"),
Div( Div(
HTML(_("hours")), HTML(_("hours")),
...@@ -662,12 +658,8 @@ class LeaseForm(forms.ModelForm): ...@@ -662,12 +658,8 @@ class LeaseForm(forms.ModelForm):
), ),
css_class="input-group interval-input", css_class="input-group interval-input",
), ),
HTML(string_concat("<label>", _("Delete in"), "</label>")),
Div( Div(
Div(
HTML(_("Delete in")),
css_class="input-group-addon",
style="width: 100px;",
),
NumberField("delete_hours", css_class="form-control"), NumberField("delete_hours", css_class="form-control"),
Div( Div(
HTML(_("hours")), HTML(_("hours")),
...@@ -691,7 +683,7 @@ class LeaseForm(forms.ModelForm): ...@@ -691,7 +683,7 @@ class LeaseForm(forms.ModelForm):
css_class="input-group interval-input", css_class="input-group interval-input",
) )
) )
helper.add_input(Submit("submit", "Save changes")) helper.add_input(Submit("submit", _("Save changes")))
return helper return helper
class Meta: class Meta:
......
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 sign in to comment