1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Added CBVs for SecretRoles

This commit is contained in:
Jeremy Stretch
2016-05-16 12:07:12 -04:00
parent a07aa69321
commit b481935b9a
8 changed files with 125 additions and 5 deletions

View File

@@ -29,6 +29,21 @@ def validate_rsa_key(key, is_secret=True):
raise forms.ValidationError("Error validating RSA key. Please ensure that your key supports PKCS#1 OAEP.")
#
# Secret roles
#
class SecretRoleForm(forms.ModelForm, BootstrapMixin):
class Meta:
model = SecretRole
fields = ['name', 'slug']
class SecretRoleBulkDeleteForm(ConfirmationForm):
pk = forms.ModelMultipleChoiceField(queryset=SecretRole.objects.all(), widget=forms.MultipleHiddenInput)
#
# Secrets
#