kopia lustrzana https://github.com/wagtail/wagtail
Docs - 5.0 release notes - clean up formatting
rodzic
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` |
|
| Heading & search (contains `h1`) | `.left.header-left` | `.left` |
|
||||||
| Action buttons (`header_extra`) | `.right.header-right` | `.right` |
|
| Action buttons (`header_extra`) | `.right.header-right` | `.right` |
|
||||||
|
|
||||||
|
|
||||||
### Slug field widget required for auto-formatting
|
### 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.
|
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`.
|
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
|
```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;
|
To allow unicode values, add the data attribute value;
|
||||||
|
|
||||||
```html
|
```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
|
### 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.
|
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.
|
||||||
|
|
Ładowanie…
Reference in New Issue