Commit 7afb202a by Őry Máté

network: use FieldWithButtons in HostForm

parent 5f05e808
...@@ -21,7 +21,7 @@ from django.utils.translation import ugettext_lazy as _ ...@@ -21,7 +21,7 @@ from django.utils.translation import ugettext_lazy as _
from crispy_forms.helper import FormHelper from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Fieldset, Div, Submit, BaseInput from crispy_forms.layout import Layout, Fieldset, Div, Submit, BaseInput
from crispy_forms.bootstrap import FormActions, AppendedText from crispy_forms.bootstrap import FormActions, FieldWithButtons, StrictButton
from firewall.models import (Host, Vlan, Domain, Group, Record, BlacklistItem, from firewall.models import (Host, Vlan, Domain, Group, Record, BlacklistItem,
Rule, VlanGroup, SwitchPort) Rule, VlanGroup, SwitchPort)
...@@ -122,10 +122,10 @@ class HostForm(ModelForm): ...@@ -122,10 +122,10 @@ class HostForm(ModelForm):
Fieldset( Fieldset(
_('Network'), _('Network'),
'vlan', 'vlan',
AppendedText('ipv4', FieldWithButtons('ipv4', StrictButton(
'<i class="fa fa-magic" id="ipv4-magic"></i>'), '<i class="fa fa-magic"></i>', css_id="ipv4-magic")),
AppendedText('ipv6', FieldWithButtons('ipv6', StrictButton(
'<i class="fa fa-magic" id="ipv6-magic"></i>'), '<i class="fa fa-magic"></i>', css_id="ipv6-magic")),
'shared_ip', 'shared_ip',
'external_ipv4', 'external_ipv4',
), ),
......
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