Merge "Remove the extra required=True"

This commit is contained in:
Jenkins 2017-03-21 11:21:05 +00:00 committed by Gerrit Code Review
commit 0a2e5973de
2 changed files with 4 additions and 7 deletions

View File

@ -50,7 +50,7 @@ class CreateForm(forms.SelfHandlingForm):
name = forms.CharField(max_length=255, label=_("Name"))
description = forms.CharField(max_length=255, label=_("Description"),
required=False)
goal = forms.ChoiceField(label=_('Goal'), required=True)
goal = forms.ChoiceField(label=_('Goal'))
strategy = forms.DynamicChoiceField(label=_('Strategy'), required=False)
scope = forms.CharField(

View File

@ -31,8 +31,7 @@ LOG = logging.getLogger(__name__)
class CreateForm(forms.SelfHandlingForm):
audit_template = forms.ChoiceField(label=_("Audit Template"),
required=True)
audit_template = forms.ChoiceField(label=_("Audit Template"))
audit_type = forms.ChoiceField(label=_("Audit Type"),
choices=[(None, _("Select Audit Type")),
('oneshot', _('ONESHOT')),
@ -40,8 +39,7 @@ class CreateForm(forms.SelfHandlingForm):
widget=forms.Select(attrs={
'class': 'switchable',
'data-slug': 'audit_type'
}),
required=True)
}))
interval = forms.DurationField(initial="01:00:00",
label=_("Interval (format hh:mm:ss)"),
help_text=_("Interval in format hh:mm:ss "
@ -50,8 +48,7 @@ class CreateForm(forms.SelfHandlingForm):
'class': 'switched',
'data-switch-on': 'audit_type',
'data-audit_type-continuous':
_("Interval (format hh:mm:ss)")}),
required=True)
_("Interval (format hh:mm:ss)")}))
failure_url = 'horizon:admin:audits:index'
auto_trigger = forms.BooleanField(label=_("Auto Trigger"),
required=False)