
    >TfA\                     L   d dl Z d dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZmZmZmZmZmZ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  d dl!m"Z"m#Z# d dl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ d dl,m-Z-m.Z. d dl/m0Z0m1Z1 d dl2m3Z3m4Z4m5Z5 dZ6 G d dej7                  Z8 G d dej7                  Z9 G d dej7                  Z: G d de
ej7                  Z; G d dej7                  Z< G d dej7                  Z= G d d ej7                  Z> G d! d"ej7                  Z? G d# d$e          Z@ G d% d&e          ZA G d' d(ej7                  ZB G d) d*e
ej7                  ZC G d+ d,e
ej7                  ZD G d- d.ej7                  ZE G d/ d0e          ZFdS )1    N)forms)	mark_safe)gettext_lazy)SyncedDataMixin)
ObjectType)
DeviceRole
DeviceTypeLocationPlatformRegionSite	SiteGroup)*)get_event_type_choices)NetBoxModelForm)TenantTenantGroup)GroupUser)add_blank_choiceget_field_value)CommentFieldContentTypeChoiceFieldContentTypeMultipleChoiceFieldDynamicModelChoiceFieldDynamicModelMultipleChoiceField	JSONField	SlugField)FieldSetObjectAttribute)ChoicesWidget
HTMXSelect)ClusterClusterGroupClusterType)BookmarkFormConfigContextFormConfigTemplateFormCustomFieldChoiceSetFormCustomFieldFormCustomLinkFormEventRuleFormExportTemplateFormImageAttachmentFormJournalEntryFormNotificationGroupFormSavedFilterFormSubscriptionFormTagFormWebhookFormc                   N    e Zd Z e ed          ej                            d           ed                    Z e	 ed          d          Z
 e ed          ej                                         ed	                    Z e	 ed
          d ed                    Z eej                                                  Z e            Z eddddddddd ed          
  
         edddddd ed                    fZ G d  d!          Z fd"Z xZS )#r*   Object typescustom_fieldsz1The type(s) of object that have this custom field)labelqueryset	help_textzDefault valueFr8   requiredzRelated object typez@Type of the related object (for object/multi-object fields only)zRelated object filterz*Specify query parameters as a JSON object.)r8   r<   r:   )r9   object_typesnamer8   
group_namedescriptiontyper<   uniquedefaultzCustom Fieldr>   search_weightfilter_logic
ui_visibleui_editableweightis_cloneableBehaviorc                   D    e Zd ZeZdZ ed           ed          dZdS )CustomFieldForm.Meta__all__zlThe type of data stored in this field. For object/multi-object fields, select the related object type below.zNThis will be displayed as help text for the form field. Markdown is supported.)rA   r@   N)__name__
__module____qualname__CustomFieldmodelfields_
help_texts     =/var/www/html/netbox-4.1.3/netbox/extras/forms/model_forms.pyMetarM   P   sH        A  1mnn
 



rX   rZ   c                 F    t                      j        |i | | j        d         j        j                            dddd           | j        j        rd| j        d         _        t          | d          }|t          j        t          j        t          j        fv rA| j        d         t          dt!          d          	          g| j        d
d          R | _        n| j        d= |t          j        t          j        fv rB| j        d         t          ddt!          d          	          g| j        d
d          R | _        n| j        d= | j        d= |t          j        t          j        fv rB| j        d         t          ddt!          d          	          g| j        d
d          R | _        n| j        d= | j        d= |t          j        t          j        fv rB| j        d         t          dt!          d          	          g| j        d
d          R | _        d S | j        d= d S )NrA   .z#form_fields)zhx-getz
hx-includez	hx-targetTr   validation_regex
ValidationrD      validation_minimumvalidation_maximumrelated_object_typerelated_object_filterzRelated Object
choice_setChoices)super__init__rT   widgetattrsupdateinstancepkdisabledr   CustomFieldTypeChoices	TYPE_TEXTTYPE_LONGTEXTTYPE_URL	fieldsetsr   rU   TYPE_INTEGERTYPE_DECIMALTYPE_OBJECTTYPE_MULTIOBJECTTYPE_SELECTTYPE_MULTISELECT)selfargskwargs
field_type	__class__s       rY   rg   zCustomFieldForm.__init__[   s   $)&))) 	F"(//('1
 1
 	 	 	 = 	0+/DK($T622
 &0&4&/
 
 
 q!+!L//BBB # DNN ./ &3&3
 
 

 q!-/C!L//ZZZ # DNN 0101 &2&7
 
 

 q!.0GaP`NaNabbb # DNN 1234 &2&7
 
 

 q!AiLL999 # DNNN L)))rX   )rO   rP   rQ   r   rU   r   objectswith_featurer=   r   rC   r   publicrb   rc   r   CustomFieldChoiceSetallrd   r   commentsr   rr   rZ   rg   __classcell__r}   s   @rY   r*   r*   -   s       11a#00AA!GHH  L
 ia    G 10a%&&#**,,!VWW  
 &Ia'((!@AA  
 )(%-1133  J |~~H 	FG\=&R\^fhq>""	
 	
 	
 	^\=(Tbijijkuiviv	
 	
 	
I	
 	
 	
 	
 	
 	
 	
 	
F* F* F* F* F* F* F* F* F*rX   r*   c            	            e Zd Z ej         e            d e ed          dz                       Z G d d          Z	dd fd	
Z
d
 Z xZS )r)   FztEnter one choice per line. An optional label may be specified for each choice by appending it with a colon. Example:z" <code>choice1:First Choice</code>)rh   r<   r:   c                       e Zd ZeZdZdS )CustomFieldChoiceSetForm.Meta)r>   r@   base_choicesextra_choicesorder_alphabeticallyN)rO   rP   rQ   r   rS   rT   rW   rX   rY   rZ   r      s        $arX   rZ   Ninitialc                D    t                      j        |d|i| d| j        v rx| j        d         rmg }| j        d         D ]O}|d                             dd          |d                             dd          f}|                    |           P|| j        d<   d S d S d S )Nr   r   r   :\:r_   )rf   rg   r   replaceappend)ry   r   rz   r{   choiceschoicer}   s         rY   rg   z!CustomFieldChoiceSetForm.__init__   s    $::6::: dl**t|O/L*G,7 ' ' )++C779J9J3PU9V9VWv&&&&,3DL))) +***rX   c                 |   g }| j         d                                         D ]}	 t          j        d|d          \  }}|                    dd          }|                    dd          }n# t
          $ r ||}}Y nw xY w|                    |                                |                                f           |S )Nr   z(?<!\\):r_   )maxsplitr   r   )cleaned_data
splitlinesresplitr   
ValueErrorr   strip)ry   datalinevaluer8   s        rY   clean_extra_choicesz,CustomFieldChoiceSetForm.clean_extra_choices   s    %o6AACC 	8 	8D*!xTAFFFueS11eS11 * * *#Tu*KK67777s   AA,,A=<A=)rO   rP   rQ   r   	CharFieldr!   r   rU   r   rZ   rg   r   r   r   s   @rY   r)   r)      s        #EO})AA
 
 11 2 2  Mb b b b b b b b '+ 
4 
4 
4 
4 
4 
4 
4
 
 
 
 
 
 
rX   r)   c                       e Zd Z e ed          ej                            d                    Z e	dddddd	d
 ed                     e	dd ed                    fZ
 G d d          ZdS )r+   r6   custom_linksr8   r9   r>   r=   rI   r?   button_classenabled
new_windowzCustom LinkrD   	link_textlink_url	Templatesc                       e Zd ZeZdZ ej        ddi           ej        ddi          dZ e	d          
                    d           e	d	          
                    d          dZd
S )CustomLinkForm.MetarN   classfont-monospaceri   )r   r   zJinja2 template code for the link text. Reference the object as {example}. Links which render as empty text will not be displayed.z<code>{{ object }}</code>)examplezIJinja2 template code for the link URL. Reference the object as {example}.N)rO   rP   rQ   
CustomLinkrS   rT   r   TextareawidgetsrU   formatrV   rW   rX   rY   rZ   r      s        'w8H.IJJJ&g7G-HIII
 

 D  f8f99[ f8f99
 



rX   rZ   N)rO   rP   rQ   r   rU   r   r~   r   r=   r   rr   rZ   rW   rX   rY   r+   r+      s        11a#00@@  L 	NHlNIWc=!!	
 	
 	
 	jqq~~>>>I
 
 
 
 
 
 
 
 
 
rX   r+   c            
           e Zd Z e ed          ej                            d                    Z e	j
         ed          d e	j        ddi          	          Z ed
ddd ed                     eddd ed                     eddd ed                    fZ G d d          Z fdZ fdZ xZS )r-   r6   export_templatesr   Template codeFr   r   r   r8   r<   rh   r>   r=   r@   template_codezExport TemplaterD   data_source	data_fileauto_sync_enabledData Source	mime_typefile_extensionas_attachment	Renderingc                       e Zd ZeZdZdS )ExportTemplateForm.MetarN   N)rO   rP   rQ   ExportTemplaterS   rT   rW   rX   rY   rZ   r      s        rX   rZ   c                      t                      j        |i | | j        j        r;d| j        d         j        j        d<   t          d          | j        d         _        d S d S NTr   readonlyzDTemplate content is populated from the remote source selected below.	rf   rg   rk   r   rT   rh   ri   rU   r:   ry   rz   r{   r}   s      rY   rg   zExportTemplateForm.__init__   q    $)&))) =" 	DHDK(/5jA56V6 6DK(222	 	rX   c                     t                                                       | j                            d          s;| j                            d          s!t	          j        t          d                    | j        S Nr   r   z0Must specify either local content or a data filerf   cleanr   getr   ValidationErrorrU   ry   r}   s    rY   r   zExportTemplateForm.clean
  k     $$_55 	_d>O>S>ST_>`>` 	_'*\(](]^^^  rX   )rO   rP   rQ   r   rU   r   r~   r   r=   r   r   r   r   r   rr   rZ   rg   r   r   r   s   @rY   r-   r-      s`       11a#001CDD  L $EOa  u~W.>$?@@@  M 	aaPaNbNbccc-@qqGWGWXXX.aannUUUI           ! ! ! ! ! ! ! ! !rX   r-   c                   $    e Zd Z e            Z e ed          ej        	                                          Z
 e            Z eddddddd	 ed
                     ed ed                    fZ G d d          Zdd fd
Z xZS )r1   r6   r   r>   slugr=   r@   rI   r   sharedzSaved FilterrD   
parameters
Parametersc                       e Zd ZeZdZdS )SavedFilterForm.Meta)userN)rO   rP   rQ   SavedFilterrS   excluderW   rX   rY   rZ   r      s        rX   rZ   Nr   c                    |r=d|v r9t          |d                   t          u rt          j        |d                   |d<    t	                      j        |d|i| d S )Nr   r   )rA   strjsonloadsrf   rg   ry   r   rz   r{   r}   s       rY   rg   zSavedFilterForm.__init__$  sp      	J|w..GL)**c11(,
7<3H(I(I%$::6:::::rX   )rO   rP   rQ   r   r   r   rU   r   r~   r   r=   r   r   r   rr   rZ   rg   r   r   s   @rY   r1   r1     s       9;;D11a#''))  L J 	)U]dedeftduduvvvAAlOO444I
        '+ ; ; ; ; ; ; ; ; ; ; ;rX   r1   c                       e Zd Z e ed          ej                            d                    Z G d d          Z	dS )r&   Object type	bookmarksr   c                       e Zd ZeZdZdS )BookmarkForm.Metaobject_type	object_idN)rO   rP   rQ   BookmarkrS   rT   rW   rX   rY   rZ   r   4  s        -rX   rZ   N
rO   rP   rQ   r   rU   r   r~   r   r   rZ   rW   rX   rY   r&   r&   .  st        ((a#00==  K
. . . . . . . . . .rX   r&   c                        e Zd Z e ed          dej                                                  Z e ed          de	j                                                  Z
 G d d          Z fdZ xZS )r0   GroupsF)r8   r<   r9   Usersc                       e Zd ZeZdZdS )NotificationGroupForm.Meta)r>   r@   groupsusersN)rO   rP   rQ   NotificationGrouprS   rT   rW   rX   rY   rZ   r   E  s        !;rX   rZ   c                     t                                                       | j        d         s.| j        d         s!t          j        t          d                    | j        S )Nr   r   z8A notification group specify at least one user or group.)rf   r   r   r   r   rU   r   s    rY   r   zNotificationGroupForm.cleanI  sZ      * 	g43DW3M 	g'*d(e(efff  rX   )rO   rP   rQ   r   rU   r   r~   r   r   r   r   rZ   r   r   r   s   @rY   r0   r0   9  s        ,,akk""$$  F
 ,+ajj!!##  E< < < < < < < <! ! ! ! ! ! ! ! !rX   r0   c                       e Zd Z e ed          ej                            d                    Z G d d          Z	dS )r2   r   notificationsr   c                       e Zd ZeZdZdS )SubscriptionForm.Metar   N)rO   rP   rQ   SubscriptionrS   rT   rW   rX   rY   rZ   r   Y  s        -rX   rZ   Nr   rW   rX   rY   r2   r2   S  st        ((a#00AA  K
. . . . . . . . . .rX   r2   c                       e Zd Z eddd ed                     edddd	d
d ed                     edd ed                    fZ G d d          ZdS )r4   r>   r@   tagsWebhookrD   payload_urlhttp_methodhttp_content_typeadditional_headersbody_templatesecretzHTTP Requestssl_verificationca_file_pathSSLc                   d    e Zd ZeZdZ ej        ddi           ej        ddi          dZdS )WebhookForm.MetarN   r   r   r   )r   r  N)	rO   rP   rQ   r   rS   rT   r   r   r   rW   rX   rY   rZ   r  i  sT        "0%.AQ7R"S"S"S+U^7<L2MNNN
 
rX   rZ   N)rO   rP   rQ   r   rU   rr   rZ   rW   rX   rY   r4   r4   ^  s         	QQy\\BBB=*=?SUdfn>""	
 	
 	
 	#^!!E((CCCI
 
 
 
 
 
 
 
 
 
rX   r4   c            
       (    e Zd Z e ed          ej                            d                    Z e	j
         e             ed                    Z e	j         ed          g           Z ed ed	          
          Z ed ed          
          Z e            Z eddddd ed                     edd ed                     eddd ed                    fZ G d d          Zd Zd Zd Z fdZ fd Z xZS )!r,   r6   event_rulesr   zEvent types)r   r8   zAction choice)r8   r   Fz@Enter conditions in <a href="https://json.org/">JSON</a> format.)r<   r:   zVEnter parameters to pass to the action in <a href="https://json.org/">JSON</a> format.r>   r@   r=   r   r   z
Event RulerD   event_types
conditionsTriggersaction_typeaction_choiceaction_dataActionc                   j    e Zd ZeZdZ ej        ddi           e            ej	        ej	        dZ
dS )EventRuleForm.Meta)r=   r>   r@   r   r
  r  r  action_object_typeaction_object_idr  r   r   r   r   r   )r  r  r  r  N)rO   rP   rQ   	EventRulerS   rT   r   r   r"   HiddenInputr   rW   rX   rY   rZ   r    sU        

 )%.9I/JKKK%:<<"'"3 % 1	
 
rX   rZ   c                 .   d }| j         j        t          j        k    r4t	          | d          }|r t
          j                            |          nd }t          t          d          t
          j        
                                d|          | j        d<   d S )Nr  rl   ScriptTr8   r9   r<   r   r  )rk   r  EventRuleActionChoicesSCRIPTr   r  r~   r   r   rU   r   rT   )ry   r   	script_ids      rY   init_script_choicez EventRuleForm.init_script_choice  s    =$(>(EEE'.@AAI:CMfn((I(666G'>H++^''))	(
 (
 (
O$$$rX   c                 .   d }| j         j        t          j        k    r4t	          | d          }|r t
          j                            |          nd }t          t          d          t
          j        
                                d|          | j        d<   d S )Nr  r  r   Tr  r  )rk   r  r  WEBHOOKr   r   r~   r   r   rU   r   rT   )ry   r   
webhook_ids      rY   init_webhook_choicez!EventRuleForm.init_webhook_choice  s    =$(>(FFF(/ABBJ<FPgo))Z)888DG'>I,,_((**	(
 (
 (
O$$$rX   c                 .   d }| j         j        t          j        k    r4t	          | d          }|r t
          j                            |          nd }t          t          d          t
          j        
                                d|          | j        d<   d S )Nr  r  zNotification groupTr  r  )rk   r  r  NOTIFICATIONr   r   r~   r   r   rU   r   rT   )ry   r   notificationgroup_ids      rY   init_notificationgroup_choicez+EventRuleForm.init_notificationgroup_choice  s    =$(>(KKK#249K#L#L Pdn'/337K3LLLjnG'>())&.2244	(
 (
 (
O$$$rX   c                     t                      j        |i | d| j        d         _        d| j        d         _        t	          | d          }|t
          j        k    r|                                  d S |t
          j        k    r| 	                                 d S |t
          j
        k    r|                                  d S d S )NFr  r  r  )rf   rg   rT   r<   r   r  r   r"  r  r  r$  r&  )ry   rz   r{   r  r}   s       rY   rg   zEventRuleForm.__init__  s    $)&)))5:()238&'0 &dM::0888$$&&&&&2999##%%%%%2???..00000 @?rX   c                    t                                                       | j                            d          }| j                            d          t          j        k    r7t          j                            |          | j        d<   |j	        | j        d<   n| j                            d          t          j
        k    r>t          j                            t          d          | j        d<   |j	        | j        d<   n^| j                            d          t          j        k    r6t          j                            |          | j        d<   |j	        | j        d<   | j        S )Nr  r  r  r  F)for_concrete_model)rf   r   r   r   r  r   r   r~   get_for_modelidr  r  r$  )ry   r  r}   s     rY   r   zEventRuleForm.clean  s<   )--o>>  //3I3QQQ6@6H6V6VWd6e6eD234A4DD011""=115K5RRR6@6H6V6V#( 7W 7 7D23 5B4DD011""=115K5XXX6@6H6V6VWd6e6eD234A4DD01  rX   )rO   rP   rQ   r   rU   r   r~   r   r=   r   MultipleChoiceFieldr   r
  ChoiceFieldr  r   r  r  r   r   r   rr   rZ   r  r"  r&  rg   r   r   r   s   @rY   r,   r,   r  s       11a#00??  L ,%+&&((a  K &E%a    M !VWW  J )!lmm  K |~~H 		6PQPQR^P_P_```11Z==AAAQQx[[QQQI
 
 
 
 
 
 
 


 

 



 

 



 

 

1 1 1 1 1! ! ! ! ! ! ! ! !rX   r,   c            
           e Zd Z e            Z e ed          ej        	                    d          d          Z
 eddddd	 ed
                    fZ G d d          ZdS )r3   r6   r   Fr8   r9   r<   r>   r   colorr@   r=   TagrD   c                       e Zd ZeZg dZdS )TagForm.Meta)r>   r   r0  r@   r=   N)rO   rP   rQ   r1  rS   rT   rW   rX   rY   rZ   r3    s$        
 
 
rX   rZ   N)rO   rP   rQ   r   r   r   rU   r   r~   r   r=   r   rr   rZ   rW   rX   rY   r3   r3     s        9;;D11a#0088  L 	-aaPUhhWWWI
 
 
 
 
 
 
 
 
 
rX   r3   c                       e Zd Z e ed          ej                                        d          Z e ed          e	j                                        d          Z
 e ed          ej                                        d          Z e ed          ej                                        d          Z e ed          ej                                        d          Z e ed          ej                                        d          Z e ed	          ej                                        d          Z e ed
          ej                                        d          Z e ed          ej                                        d          Z e ed          ej                                        d          Z e ed          ej                                        d          Z e ed          ej                                        d          Z e ed          ej                                        d          Z  e! ed          d          Z" e#ddddd ed                     e#ddd ed                     e#dddd d!d"d#d$d%d&d'd(d) ed*                    fZ$ G d+ d,          Z%d-d. fd/
Z& fd0Z' xZ(S )1r'   RegionsFr/  zSite groupsSites	LocationszDevice typesRoles	PlatformszCluster typeszCluster groupsClusterszTenant groupsTenantsTagsDatar;   r>   rI   r@   r   	is_activezConfig ContextrD   r   r   r   r   regionssite_groupssites	locationsdevice_typesroles	platformscluster_typescluster_groupsclusterstenant_groupstenantsr   
Assignmentc                       e Zd ZeZdZdS )ConfigContextForm.Meta)r>   rI   r@   r   r>  r?  r@  rA  rB  rD  rC  rE  rF  rG  rH  rI  rJ  r   r   r   r   N)rO   rP   rQ   ConfigContextrS   rT   rW   rX   rY   rZ   rM  J  s        
rX   rZ   Nr   c                J   |r=d|v r9t          |d                   t          u rt          j        |d                   |d<    t	                      j        |d|i| | j        j        r;d| j        d         j	        j
        d<   t          d          | j        d         _        d S d S )Nr   r   Tr   z8Data is populated from the remote source selected below.)rA   r   r   r   rf   rg   rk   r   rT   rh   ri   rU   r:   r   s       rY   rg   zConfigContextForm.__init__R  s      	>v((GFO$$++"&*WV_"="=$::6::: =" 	j;?DK&,Z8,-.h,i,iDK)))	j 	jrX   c                     t                                                       | j                            d          s;| j                            d          s!t	          j        t          d                    | j        S )Nr   r   z-Must specify either local data or a data filer   r   s    rY   r   zConfigContextForm.clean`  sj     $$V,, 	\T5F5J5J;5W5W 	\'*Y(Z(Z[[[  rX   ))rO   rP   rQ   r   rU   r   r~   r   r?  r   r@  r   rA  r
   rB  r	   rC  r   rD  r   rE  r%   rF  r$   rG  r#   rH  r   rI  r   rJ  r1  r   r   r   r   rr   rZ   rg   r   r   r   s   @rY   r'   r'     s(       --a	ll##%%  G
 21a"&&((  K
 ,+ajj!!##  E
 0/ann!%%''  I
 32a#''))  L
 ,+ajj#''))  E
 0/ann!%%''  I
 43a  $((**  M
 54a !!%))++  N
 /.a
mm$$&&  H
 43a  $((**  M
 .-a	ll##%%  G
 +*aii""  D
 9aii  D 	=&+AAN^L_L_```-@qqGWGWXXX}g{NGU`bqj/9f<	
 	
 	
I
 
 
 
 
 
 
 
 '+ j j j j j j j! ! ! ! ! ! ! ! !rX   r'   c            
           e Zd Z e ed          ej                                        d          Z e	j
         ed          d e	j        ddi                    Z ed	d
dd ed                     ed ed                     eddd ed                    fZ G d d          Z fdZ fdZ xZS )r(   r<  Fr/  r   r   r   r   r   r>   r@   environment_paramsr   zConfig TemplaterD   r   Contentr   r   r   r   c                   @    e Zd ZeZdZd ej        ddi          iZdS )ConfigTemplateForm.MetarN   rR  rows   r   N)	rO   rP   rQ   ConfigTemplaterS   rT   r   r   r   rW   rX   rY   rZ   rU  {  s7         .%.{"C"C"C
rX   rZ   c                      t                      j        |i | | j        j        r;d| j        d         j        j        d<   t          d          | j        d         _        d S d S r   r   r   s      rY   rg   zConfigTemplateForm.__init__  r   rX   c                     t                                                       | j                            d          s;| j                            d          s!t	          j        t          d                    | j        S r   r   r   s    rY   r   zConfigTemplateForm.clean  r   rX   )rO   rP   rQ   r   rU   r1  r~   r   r   r   r   r   r   r   rr   rZ   rg   r   r   r   s   @rY   r(   r(   i  sW       **aii""  D
 $EOa  u~W.>$?@@@  M 	(<f11M^K_K_```qq||444-@qqGWGWXXXI
 
 
 
 
 
 
 
    ! ! ! ! ! ! ! ! !rX   r(   c                   V    e Zd Z e ed          dd          fZ G d d          ZdS )r.   parentr>   imagec                       e Zd ZeZddgZdS )ImageAttachmentForm.Metar>   r]  N)rO   rP   rQ   ImageAttachmentrS   rT   rW   rX   rY   rZ   r_    s        G
rX   rZ   N)rO   rP   rQ   r   r    rr   rZ   rW   rX   rY   r.   r.     s^        **FG<<I
 
 
 
 
 
 
 
 
 
rX   r.   c                       e Zd Z ej         ed           ee          d          Z e	            Z
 G d d          ZdS )r/   KindF)r8   r   r<   c                   8    e Zd ZeZg dZej        ej        dZdS )JournalEntryForm.Meta)assigned_object_typeassigned_object_idkindr   r   )re  rf  N)	rO   rP   rQ   JournalEntryrS   rT   r   r  r   rW   rX   rY   rZ   rd    s6        [[[$)$5"'"3
 
rX   rZ   N)rO   rP   rQ   r   r-  rU   r   JournalEntryKindChoicesrg  r   r   rZ   rW   rX   rY   r/   r/     s        5aii  !899  D
 |~~H
 
 
 
 
 
 
 
 
 
rX   r/   )Gr   r   djangor   django.utils.safestringr   django.utils.translationr   rU   core.forms.mixinsr   core.modelsr   dcim.modelsr   r	   r
   r   r   r   r   extras.choicesextras.modelsnetbox.eventsr   netbox.formsr   tenancy.modelsr   r   users.modelsr   r   utilities.formsr   r   utilities.forms.fieldsr   r   r   r   r   r   r   utilities.forms.renderingr   r    utilities.forms.widgetsr!   r"   virtualization.modelsr#   r$   r%   rN   	ModelFormr*   r)   r+   r-   r1   r&   r0   r2   r4   r,   r3   r'   r(   r.   r/   rW   rX   rY   <module>r|     s    				       - - - - - - 6 6 6 6 6 6 - - - - - - " " " " " " [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [         0 0 0 0 0 0 ( ( ( ( ( ( . . . . . . . . $ $ $ $ $ $ $ $ = = = = = = = =                  @ ? ? ? ? ? ? ? = = = = = = = = D D D D D D D D D D&t* t* t* t* t*eo t* t* t*n$ $ $ $ $u $ $ $N
 
 
 
 
U_ 
 
 
@%! %! %! %! %!%/ %! %! %!P; ; ; ; ;eo ; ; ;6. . . . .5? . . .! ! ! ! !EO ! ! !4. . . . .u . . .
 
 
 
 
/ 
 
 
(q! q! q! q! q!O q! q! q!h
 
 
 
 
eo 
 
 
&m! m! m! m! m! m! m! m!`)! )! )! )! )!%/ )! )! )!X	
 	
 	
 	
 	
%/ 	
 	
 	

 
 
 
 
 
 
 
 
 
rX   