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_side
pull/11521/head
Neeraj P Yetheendran 2024-01-23 16:57:07 +05:30 zatwierdzone przez LB (Ben Johnston)
rodzic adfd8b32dc
commit f341f6bee5
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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.

Wyświetl plik

@ -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 %}

Wyświetl plik

@ -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"