mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #1320: Remove checkbox from confirmation dialog
This commit is contained in:
@ -1694,8 +1694,7 @@ class InterfaceConnectionCSVForm(forms.ModelForm):
|
|||||||
return interface
|
return interface
|
||||||
|
|
||||||
|
|
||||||
class InterfaceConnectionDeletionForm(BootstrapMixin, forms.Form):
|
class InterfaceConnectionDeletionForm(ConfirmationForm):
|
||||||
confirm = forms.BooleanField(required=True)
|
|
||||||
# Used for HTTP redirect upon successful deletion
|
# Used for HTTP redirect upon successful deletion
|
||||||
device = forms.ModelChoiceField(queryset=Device.objects.all(), widget=forms.HiddenInput(), required=False)
|
device = forms.ModelChoiceField(queryset=Device.objects.all(), widget=forms.HiddenInput(), required=False)
|
||||||
|
|
||||||
|
@ -13,14 +13,6 @@
|
|||||||
<div class="panel-heading">{% block title %}{% endblock %}</div>
|
<div class="panel-heading">{% block title %}{% endblock %}</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{% block message %}<p>Are you sure?</p>{% endblock %}
|
{% block message %}<p>Are you sure?</p>{% endblock %}
|
||||||
<div class="form-group">
|
|
||||||
<div class="checkbox{% if form.confirm.errors %} has-error{% endif %}">
|
|
||||||
<label for="{{ form.confirm.id_for_label }}">
|
|
||||||
{{ form.confirm }}
|
|
||||||
{{ form.confirm.label }}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<button type="submit" name="_confirm" class="btn btn-{{ button_class|default:"danger" }}">Confirm</button>
|
<button type="submit" name="_confirm" class="btn btn-{{ button_class|default:"danger" }}">Confirm</button>
|
||||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||||
|
@ -510,7 +510,7 @@ class ConfirmationForm(BootstrapMixin, ReturnURLForm):
|
|||||||
"""
|
"""
|
||||||
A generic confirmation form. The form is not valid unless the confirm field is checked.
|
A generic confirmation form. The form is not valid unless the confirm field is checked.
|
||||||
"""
|
"""
|
||||||
confirm = forms.BooleanField(required=True)
|
confirm = forms.BooleanField(required=True, widget=forms.HiddenInput(), initial=True)
|
||||||
|
|
||||||
|
|
||||||
class BulkEditForm(forms.Form):
|
class BulkEditForm(forms.Form):
|
||||||
|
Reference in New Issue
Block a user