mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-25 13:10:14 +01:00
Docs - 5.0 release notes - clean up formatting
This commit is contained in:
parent
eb5bb5a9c8
commit
6ec6895f4f
@ -141,7 +141,6 @@ If there are custom styles in place for the `ModelAdmin`'s header content or mor
|
||||
| Heading & search (contains `h1`) | `.left.header-left` | `.left` |
|
||||
| Action buttons (`header_extra`) | `.right.header-right` | `.right` |
|
||||
|
||||
|
||||
### Slug field widget required for auto-formatting
|
||||
|
||||
The slug field JavaScript behaviour was previously attached to any field with an ID of `id_slug`, this has now changed to be any field with the appropriate HTML data attributes.
|
||||
@ -162,17 +161,26 @@ class MyPage(Page):
|
||||
Additionally, the slug behaviour can be attached to any field easily by including the following attributes in HTML or via Django's widget `attrs`.
|
||||
|
||||
```html
|
||||
<input type="text" name="slug" data-controller="w-slug" data-action="blur->w-slug#slugify" />
|
||||
<input
|
||||
type="text"
|
||||
name="slug"
|
||||
data-controller="w-slug"
|
||||
data-action="blur->w-slug#slugify"
|
||||
/>
|
||||
```
|
||||
|
||||
To allow unicode values, add the data attribute value;
|
||||
|
||||
```html
|
||||
<input type="text" name="slug" data-controller="w-slug" data-action="blur->w-slug#slugify" data-w-slug-allow-unicode="true" />
|
||||
<input
|
||||
type="text"
|
||||
name="slug"
|
||||
data-controller="w-slug"
|
||||
data-action="blur->w-slug#slugify"
|
||||
data-w-slug-allow-unicode="true"
|
||||
/>
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Progress button (`button-longrunning`) now implemented with Stimulus
|
||||
|
||||
The `button-longrunning` class usage has been updated to use the newly adopted Stimulus approach, the previous data attributes will be deprecated in a future release.
|
||||
|
Loading…
Reference in New Issue
Block a user