[IMP] website, website_sale: change labels of new content

When adding a new product, 'Product Name' is displayed
instead of 'Name', and 'Create' instead of 'Continue' for every type of
new content added.

Part of https://github.com/odoo/odoo/pull/65255

task-2438556
This commit is contained in:
Younn Olivier
2021-03-08 16:23:55 +00:00
parent e55de3be34
commit eddf8971cf
3 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -4,7 +4,7 @@ odoo.define('website.utils', function (require) {
var ajax = require('web.ajax');
var core = require('web.core');
var qweb = core.qweb;
const { qweb, _t } = core;
/**
* Allows to load anchors from a page.
@@ -164,6 +164,8 @@ function prompt(options, _qweb) {
field_name: '',
'default': '', // dict notation for IE<9
init: function () {},
btn_primary_title: _t('Create'),
btn_secondary_title: _t('Cancel'),
}, options || {});
var type = _.intersection(Object.keys(options), ['input', 'textarea', 'select']);
+3 -3
View File
@@ -12,7 +12,7 @@
<form role="form" t-att-id="id">
<div class="form-group row mb0">
<label for="page-name" class="col-md-3 col-form-label">
<t t-esc="field_name"/>:
<t t-esc="field_name"/>
</label>
<div class="col-md-9">
<input t-if="field_type == 'input'" type="text" class="form-control" required="required"/>
@@ -23,8 +23,8 @@
</form>
</main>
<footer class="modal-footer">
<button type="button" class="btn btn-primary btn-continue">Continue</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-label="Cancel">Cancel</button>
<button type="button" class="btn btn-primary btn-continue"><t t-esc="btn_primary_title"/></button>
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-label="Cancel"><t t-esc="btn_secondary_title"/></button>
</footer>
</div>
</div>
@@ -28,7 +28,7 @@ WebsiteNewMenu.include({
return wUtils.prompt({
id: "editor_new_product",
window_title: _t("New Product"),
input: _t("Name"),
input: _t("Product Name"),
}).then(function (result) {
if (!result.val) {
return;