mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#3880: Define constants for arbitrary values
This commit is contained in:
@ -9,6 +9,7 @@ from utilities.forms import (
|
||||
APISelect, APISelectMultiple, BootstrapMixin, FilterChoiceField, FlexibleModelChoiceField, SlugField,
|
||||
StaticSelect2Multiple
|
||||
)
|
||||
from .constants import *
|
||||
from .models import Secret, SecretRole, UserKey
|
||||
|
||||
|
||||
@ -69,7 +70,7 @@ class SecretRoleCSVForm(forms.ModelForm):
|
||||
|
||||
class SecretForm(BootstrapMixin, CustomFieldForm):
|
||||
plaintext = forms.CharField(
|
||||
max_length=65535,
|
||||
max_length=SECRET_PLAINTEXT_MAX_LENGTH,
|
||||
required=False,
|
||||
label='Plaintext',
|
||||
widget=forms.PasswordInput(
|
||||
@ -79,7 +80,7 @@ class SecretForm(BootstrapMixin, CustomFieldForm):
|
||||
)
|
||||
)
|
||||
plaintext2 = forms.CharField(
|
||||
max_length=65535,
|
||||
max_length=SECRET_PLAINTEXT_MAX_LENGTH,
|
||||
required=False,
|
||||
label='Plaintext (verify)',
|
||||
widget=forms.PasswordInput()
|
||||
|
Reference in New Issue
Block a user