kopia lustrzana https://github.com/wagtail/wagtail
				
				
				
			Fixed issues preventing build
- html+django snippets are not parsing correctly due to script usage, replace with simple text snippets - Fix up incorrect link added in extending_client_sidepull/11521/head
							rodzic
							
								
									adfd8b32dc
								
							
						
					
					
						commit
						f341f6bee5
					
				|  | @ -213,7 +213,7 @@ For more complex widgets we can now integrate additional libraries whenever the | |||
| 
 | ||||
| In this example we will build a color picker widget using the [Coloris](https://coloris.js.org/) JavaScript library with support for custom widget options. | ||||
| 
 | ||||
| First, let's start with the HTML, building on the [Django widgets](django:ref/forms/widgets) system that Wagtail supports for `FieldPanel` and `FieldBlock`. Using the `build_attrs` method, we build up the appropriate Stimulus data attributes to support common data structures being passed into the controller. | ||||
| First, let's start with the HTML, building on the [Django widgets](inv:django#ref/forms/widgets) system that Wagtail supports for `FieldPanel` and `FieldBlock`. Using the `build_attrs` method, we build up the appropriate Stimulus data attributes to support common data structures being passed into the controller. | ||||
| 
 | ||||
| Observe that we are using `json.dumps` for complex values (a list of strings in this case), Django will automatically escape these values when rendered to avoid common causes of insecure client-side code. | ||||
| 
 | ||||
|  |  | |||
|  | @ -499,7 +499,7 @@ The current approach will trigger a deprecation warning and will be removed in a | |||
| 
 | ||||
| #### Old | ||||
| 
 | ||||
| ```html+django | ||||
| ```text | ||||
| {% load wagtailadmin_tags %} | ||||
| <script type="text/django-form-template" id="id_{{ formset.prefix }}-EMPTY_FORM_TEMPLATE"> | ||||
|     {% escapescript %} | ||||
|  |  | |||
|  | @ -318,7 +318,7 @@ window.enableDirtyFormCheck('.my-form', { alwaysDirty: true, confirmationMessage | |||
| 
 | ||||
| The new approach will be data attribute driven as follows. | ||||
| 
 | ||||
| ```javascript | ||||
| ```text | ||||
| <form | ||||
|   method="POST" | ||||
|   data-controller="w-unsaved" | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Neeraj P Yetheendran
						Neeraj P Yetheendran