
    >Tf$                        d dl mZ d dlmZ d dlT d dlT d dlmZ d dl	m
Z
 d dlmZmZ d dlmZmZmZ d dlmZ d d	lmZ d
Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de
          Z G d de
          Z G d de          Z G d de          Z G d de          Z  G d d e          Z! G d! d"e          Z"d#S )$    )forms)gettext_lazy)*)get_event_type_choices)NetBoxModelBulkEditForm)BulkEditFormadd_blank_choice)
ColorFieldCommentFieldDynamicModelChoiceField)FieldSet)BulkEditNullBooleanSelect)ConfigContextBulkEditFormConfigTemplateBulkEditFormCustomFieldBulkEditForm CustomFieldChoiceSetBulkEditFormCustomLinkBulkEditFormEventRuleBulkEditFormExportTemplateBulkEditFormJournalEntryBulkEditFormNotificationGroupBulkEditFormSavedFilterBulkEditFormTagBulkEditFormWebhookBulkEditFormc                      e Zd Z ej        ej                                        ej                  Z	 ej
         ed          d          Z ej
         ed          d          Z ej         ed          d e                      Z ej         ed          d e                      Z ej         ed	          d          Z eej                                        d
          Z ej         ed           ee          d          Z ej         ed           ee          d          Z ej         ed          d e                      Z ej         ed          d          Z ej         ed          d          Z ej
         ed          d          Z  e!            Z" e#dddddd ed                     e#ddd ed                     e#ddd  ed!                    fZ$d"Z%d#S )$r   querysetwidgetz
Group nameFlabelrequiredDescriptionRequiredr    r!   r   zMust be uniqueWeight)r   r!   z
UI visibler    choicesr!   zUI editablezIs cloneablezMinimum valuezMaximum valuezValidation regex
group_namedescriptionweightr!   unique
choice_set
Attributes)name
ui_visibleui_editableis_cloneableBehaviorvalidation_minimumvalidation_maximumvalidation_regex
Validation)r(   r)   r,   N)&__name__
__module____qualname__r   ModelMultipleChoiceFieldCustomFieldobjectsallMultipleHiddenInputpk	CharField_r(   r)   NullBooleanFieldr   r!   r+   IntegerFieldr*   r   CustomFieldChoiceSetr,   ChoiceFieldr	   CustomFieldUIVisibleChoicesr/   CustomFieldUIEditableChoicesr0   r1   r3   r4   r5   r   commentsr   	fieldsetsnullable_fields     ;/var/www/html/netbox-4.1.3/netbox/extras/forms/bulk_edit.pyr   r      s       	'	'$((**(
 
 
B !aoo  J "%/a  K &u%a
mm((**  H
 $U#a !!((**  F
  Uakk  F )(%-1133  J #"aoo  !<==  J
 $%#a  !=>>  K
 *5)a((**  L
 ,+a     ,+a     'ua"##   |~~H 	}h
Hlababcoapapqqq}n11Z==QQQ%';=OVWVWXdVeVefffI
 BOOOrL   r   c                       e Zd Z ej        ej                                        ej                  Z	 ej
         ee          d          Z ej        d          Z ej        d e                      ZdZdS )r   r   F)r'   r!   )r!   )r!   r   )base_choicesr)   N)r7   r8   r9   r   r:   rD   r<   r=   r>   r?   rE   r	   CustomFieldChoiceSetBaseChoicesrO   r@   r)   rB   r   order_alphabeticallyrJ   rK   rL   rM   r   r   a   s        	'	'%-1133(
 
 
B %5$  !@AA  L "%/  K 251((**  
 6OOOrL   r   c                   z   e Zd Z ej        ej                                        ej                  Z	 ej
         ed          d e                      Z ej
         ed          d e                      Z ej         ed          d          Z ej         ed           ee          d	          Zd
S )r   r   EnabledFr$   z
New windowr%   r   zButton classr&   N)r7   r8   r9   r   r:   
CustomLinkr<   r=   r>   r?   rB   rA   r   enabled
new_windowrC   r*   rE   r	   CustomLinkButtonClassChoicesbutton_classrK   rL   rM   r   r   u   s       	'	'#''))(
 
 
B %e$a	ll((**  G
 ('aoo((**  J
  Uakk  F %5$a  !=>>  LLLrL   r   c                   ^   e Zd Z ej        ej                                        ej                  Z	 ej
         ed          dd          Z ej
         ed          dd          Z ej
         ed          d	d          Z ej         ed
          d e                      ZdZdS )r   r   r"      Fr    
max_lengthr!   z	MIME type2   zFile extension   zAs attachmentr$   )r)   	mime_typefile_extensionN)r7   r8   r9   r   r:   ExportTemplater<   r=   r>   r?   r@   rA   r)   r_   r`   rB   r   as_attachmentrJ   rK   rL   rM   r   r      s       	'	''++--(
 
 
B "%/a  K
  ann  I
 %U_a !!  N
 +E*a  ((**  M EOOOrL   r   c                   l   e Zd Z ej        ej                                        ej                  Z	 ej
         ed          dd          Z ej         ed          d          Z ej         ed          d e            	          Z ej         ed
          d e            	          ZdZdS )r   r   r"   rZ   Fr[   r%   r   rS   r$   Sharedr)   N)r7   r8   r9   r   r:   SavedFilterr<   r=   r>   r?   r@   rA   r)   rC   r*   rB   r   rU   sharedrJ   rK   rL   rM   r   r      s       	'	'$((**(
 
 
B "%/a  K
  Uakk  F %e$a	ll((**  G
 $U#akk((**  F 'OOOrL   r   c                      e Zd ZeZ ej        ej                                        ej	                  Z
 ej         ed          dd          Z ej         ee          d ed                    Z ej        d ed          	          Z ej        d e             ed
                    Z ej         ed          d          Z ej        d ed          	          ZdZdS )r   r   r"   rZ   Fr[   zHTTP methodr'   r!   r    zPayload URL)r!   r    zSSL verification)r!   r   r    Secretr   zCA file path)secretca_file_pathN)r7   r8   r9   Webhookmodelr   r:   r<   r=   r>   r?   r@   rA   r)   rE   r	   WebhookHttpMethodChoiceshttp_methodpayload_urlrB   r   ssl_verificationrk   rl   rJ   rK   rL   rM   r   r      sf       E	'	'$$&&(
 
 
B "%/a  K
 $%#  !9::a  K
 "%/a  K .u-((**a"##  
 U_akk  F #5?a  L
 1OOOrL   r   c                   :   e Zd ZeZ ej        ej                                        ej	                  Z
 ej         ed          d e                      Z ej         e            d ed                    Z ej         ed          dd	          Zd
ZdS )r   r   rS   Fr$   zEvent typesri   r"   rZ   r[   )r)   
conditionsN)r7   r8   r9   	EventRulern   r   r:   r<   r=   r>   r?   rB   rA   r   rU   MultipleChoiceFieldr   event_typesr@   r)   rJ   rK   rL   rM   r   r      s        E	'	'"&&(((
 
 
B %e$a	ll((**  G
 ,%+&&((a  K
 "%/a  K 4OOOrL   r   c                       e Zd Z ej        ej                                        ej                  Z	 e
 ed          d          Z ej         ed          dd          ZdZd	S )
r   r   ColorFr   r"   rZ   r[   re   N)r7   r8   r9   r   r:   Tagr<   r=   r>   r?   r
   rA   colorr@   r)   rJ   rK   rL   rM   r   r     s        	'	'""(
 
 
B Jajj  E "%/a  K 'OOOrL   r   c                   &   e Zd Z ej        ej                                        ej                  Z	 ej
         ed          dd          Z ej         ed          d e                      Z ej         ed          dd	
          ZdZdS )r   r   r%   Fr   )r    r!   	min_valuez	Is activer$   r"   d   )r    r!   r\   re   N)r7   r8   r9   r   r:   ConfigContextr<   r=   r>   r?   rC   rA   r*   rB   r   	is_activer@   r)   rJ   rK   rL   rM   r   r     s        	'	'&**,,(
 
 
B  Uakk  F
 '&ann((**  I
 "%/a  K 'OOOrL   r   c                       e Zd Z ej        ej                                        ej                  Z	 ej
         ed          dd          ZdZdS )r   r   r"   rZ   Fr[   re   N)r7   r8   r9   r   r:   ConfigTemplater<   r=   r>   r?   r@   rA   r)   rJ   rK   rL   rM   r   r   2  ss        	'	''++--(
 
 
B "%/a  K 'OOOrL   r   c                       e Zd Z ej        ej                                        ej                  Z	 ej
         ed           ee          d          Z e            ZdS )r   r   KindFr&   N)r7   r8   r9   r   r:   JournalEntryr<   r=   r>   r?   rE   rA   r	   JournalEntryKindChoiceskindr   rH   rK   rL   rM   r   r   @  s        	'	'%))++(
 
 
B 5aii  !899  D
 |~~HHHrL   r   c                       e Zd Z ej        ej                                        ej                  Z	 ej
         ed          dd          ZdZdS )r   r   r"   rZ   Fr[   re   N)r7   r8   r9   r   r:   NotificationGroupr<   r=   r>   r?   r@   rA   r)   rJ   rK   rL   rM   r   r   M  ss        	'	'"*..00(
 
 
B "%/a  K 'OOOrL   r   N)#djangor   django.utils.translationr   rA   extras.choicesextras.modelsnetbox.eventsr   netbox.formsr   utilities.formsr   r	   utilities.forms.fieldsr
   r   r   utilities.forms.renderingr   utilities.forms.widgetsr   __all__r   r   r   r   r   r   r   r   r   r   r   r   rK   rL   rM   <module>r      s         6 6 6 6 6 6         0 0 0 0 0 0 0 0 0 0 0 0 : : : : : : : : T T T T T T T T T T . . . . . . = = = = = = AB AB AB AB ABl AB AB ABH6 6 6 6 6| 6 6 6(    \   4E E E E E E E E:' ' ' ' 'l ' ' '8#1 #1 #1 #1 #11 #1 #1 #1L4 4 4 4 43 4 4 44' ' ' ' 'l ' ' '$' ' ' ' ' ' ' '0' ' ' ' ' ' ' '
 
 
 
 
| 
 
 
' ' ' ' 'L ' ' ' ' 'rL   