|
4 | 4 | from extras.choices import * |
5 | 5 | from extras.models import * |
6 | 6 | from extras.utils import FeatureQuery |
7 | | -from utilities.forms import BulkEditForm, BulkEditNullBooleanSelect, ColorField, ContentTypeChoiceField, StaticSelect |
| 7 | +from utilities.forms import ( |
| 8 | + add_blank_choice, BulkEditForm, BulkEditNullBooleanSelect, ColorField, ContentTypeChoiceField, StaticSelect, |
| 9 | +) |
8 | 10 |
|
9 | 11 | __all__ = ( |
10 | 12 | 'ConfigContextBulkEditForm', |
@@ -55,7 +57,7 @@ class CustomLinkBulkEditForm(BulkEditForm): |
55 | 57 | required=False |
56 | 58 | ) |
57 | 59 | button_class = forms.ChoiceField( |
58 | | - choices=CustomLinkButtonClassChoices, |
| 60 | + choices=add_blank_choice(CustomLinkButtonClassChoices), |
59 | 61 | required=False, |
60 | 62 | widget=StaticSelect() |
61 | 63 | ) |
@@ -117,21 +119,25 @@ class WebhookBulkEditForm(BulkEditForm): |
117 | 119 | widget=BulkEditNullBooleanSelect() |
118 | 120 | ) |
119 | 121 | http_method = forms.ChoiceField( |
120 | | - choices=WebhookHttpMethodChoices, |
121 | | - required=False |
| 122 | + choices=add_blank_choice(WebhookHttpMethodChoices), |
| 123 | + required=False, |
| 124 | + label='HTTP method' |
122 | 125 | ) |
123 | 126 | payload_url = forms.CharField( |
124 | | - required=False |
| 127 | + required=False, |
| 128 | + label='Payload URL' |
125 | 129 | ) |
126 | 130 | ssl_verification = forms.NullBooleanField( |
127 | 131 | required=False, |
128 | | - widget=BulkEditNullBooleanSelect() |
| 132 | + widget=BulkEditNullBooleanSelect(), |
| 133 | + label='SSL verification' |
129 | 134 | ) |
130 | 135 | secret = forms.CharField( |
131 | 136 | required=False |
132 | 137 | ) |
133 | 138 | ca_file_path = forms.CharField( |
134 | | - required=False |
| 139 | + required=False, |
| 140 | + label='CA file path' |
135 | 141 | ) |
136 | 142 |
|
137 | 143 | class Meta: |
@@ -185,7 +191,7 @@ class JournalEntryBulkEditForm(BulkEditForm): |
185 | 191 | widget=forms.MultipleHiddenInput |
186 | 192 | ) |
187 | 193 | kind = forms.ChoiceField( |
188 | | - choices=JournalEntryKindChoices, |
| 194 | + choices=add_blank_choice(JournalEntryKindChoices), |
189 | 195 | required=False |
190 | 196 | ) |
191 | 197 | comments = forms.CharField( |
|
0 commit comments