File tree 2 files changed +8
-4
lines changed
addons/website/static/src/client_actions/website_preview
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 24
24
<DropdownItem onSelected.bind=" () => this.translatable ? this.editFromTranslate() : this.onClickEditPage()" class =" 'o_edit_website_dropdown_item'" >
25
25
Edit 404 page<t t-if =" translatable" t-translation =" off" > - <span class =" text-muted" t-out =" this.currentWebsiteInfo.defaultLangName" /></t >
26
26
</DropdownItem >
27
- <DropdownItem onSelected.bind=" () => this.props.onNewPage()" class =" 'o_edit_website_dropdown_item'" >
27
+ <DropdownItem onSelected.bind=" () => this.props.onNewPage(true )" class =" 'o_edit_website_dropdown_item'" >
28
28
<t t-set =" url" t-value =" this.websiteService.currentLocation" />
29
29
Create <span class =" text-muted" t-out =" url" /> page
30
30
</DropdownItem >
Original file line number Diff line number Diff line change @@ -190,13 +190,17 @@ export class WebsiteBuilder extends Component {
190
190
}
191
191
}
192
192
193
- onNewPage ( ) {
194
- this . dialog . add ( AddPageDialog , {
193
+ onNewPage ( keepUrl = false ) {
194
+ const params = {
195
195
onAddPage : ( ) => {
196
196
this . websiteService . context . showNewContentModal = false ;
197
197
} ,
198
198
websiteId : this . websiteService . currentWebsite . id ,
199
- } ) ;
199
+ } ;
200
+ if ( keepUrl ) {
201
+ params . forcedURL = this . websiteService . currentLocation ;
202
+ }
203
+ this . dialog . add ( AddPageDialog , params ) ;
200
204
}
201
205
202
206
async onEditPage ( ) {
You can’t perform that action at this time.
0 commit comments