[FIX] mail: fix dialogs titles
task-2282380 closes odoo/odoo#55276 X-original-commit: 1ce481baa2267ce912b5ec8c178af860c663d971 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -536,9 +536,7 @@ QUnit.test('reject pending moderation message (reject with explanation)', async
|
||||
);
|
||||
assert.strictEqual(
|
||||
dialog.querySelector('.modal-title').textContent,
|
||||
// TODO FIXME, this should be a proper title "Send explanation to author"
|
||||
// see https://github.com/odoo/owl/issues/670
|
||||
"[object Object]",
|
||||
"Send explanation to author",
|
||||
"dialog should have correct title"
|
||||
);
|
||||
|
||||
@@ -694,14 +692,12 @@ QUnit.test('discard pending moderation message (reject without explanation)', as
|
||||
);
|
||||
assert.strictEqual(
|
||||
dialog.querySelector('.modal-title').textContent,
|
||||
// TODO FIXME, this should be a proper title "Confirmation"
|
||||
// see https://github.com/odoo/owl/issues/670
|
||||
"[object Object]",
|
||||
"Confirmation",
|
||||
"dialog should have correct title"
|
||||
);
|
||||
assert.strictEqual(
|
||||
dialog.textContent,
|
||||
"[object Object]×You are going to discard 1 message.Do you confirm the action?DiscardCancel",
|
||||
"Confirmation×You are going to discard 1 message.Do you confirm the action?DiscardCancel",
|
||||
"should warn the user on discard action"
|
||||
);
|
||||
|
||||
|
||||
@@ -42,6 +42,13 @@ class ModerationBanDialog extends Component {
|
||||
return this.props.messageLocalIds.map(localId => this.env.models['mail.message'].get(localId));
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
get CONFIRMATION() {
|
||||
return this.env._t("Confirmation");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Handlers
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<templates xml:space="preserve">
|
||||
<t t-name="mail.ModerationBanDialog" owl="1">
|
||||
<div><!-- TODO FIXME necessary div for useRef, can be removed at next owl update, see https://github.com/odoo/owl/issues/638 -->
|
||||
<t t-set="title">Confirmation</t>
|
||||
<Dialog contentClass="'o_ModerationBanDialog'" title="title" size="'medium'" t-ref="dialog">
|
||||
<Dialog contentClass="'o_ModerationBanDialog'" title="CONFIRMATION" size="'medium'" t-ref="dialog">
|
||||
<t t-if="messages.length === 1">
|
||||
<p>You are going to ban the following user:</p>
|
||||
</t>
|
||||
|
||||
+7
@@ -57,6 +57,13 @@ class ModerationDiscardDialog extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
get CONFIRMATION() {
|
||||
return this.env._t("Confirmation");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Handlers
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
+1
-2
@@ -2,8 +2,7 @@
|
||||
<templates xml:space="preserve">
|
||||
<t t-name="mail.ModerationDiscardDialog" owl="1">
|
||||
<div><!-- TODO FIXME necessary div for useRef, can be removed at next owl update, see https://github.com/odoo/owl/issues/638 -->
|
||||
<t t-set="title">Confirmation</t>
|
||||
<Dialog contentClass="'o_ModerationDiscardDialog'" title="title" size="'medium'" t-ref="dialog">
|
||||
<Dialog contentClass="'o_ModerationDiscardDialog'" title="CONFIRMATION" size="'medium'" t-ref="dialog">
|
||||
<p t-esc="getText()"/>
|
||||
<p>Do you confirm the action?</p>
|
||||
<t t-set-slot="buttons">
|
||||
|
||||
@@ -48,6 +48,13 @@ class ModerationRejectDialog extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
get SEND_EXPLANATION_TO_AUTHOR() {
|
||||
return this.env._t("Send explanation to author");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Handlers
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
+1
-2
@@ -2,8 +2,7 @@
|
||||
<templates xml:space="preserve">
|
||||
<t t-name="mail.ModerationRejectDialog" owl="1">
|
||||
<div><!-- TODO FIXME necessary div for useRef, can be removed at next owl update, see https://github.com/odoo/owl/issues/638 -->
|
||||
<t t-set="title">Send explanation to author</t>
|
||||
<Dialog contentClass="'o_ModerationRejectDialog'" title="title" size="'medium'" t-ref="dialog">
|
||||
<Dialog contentClass="'o_ModerationRejectDialog'" title="SEND_EXPLANATION_TO_AUTHOR" size="'medium'" t-ref="dialog">
|
||||
<input class="o_ModerationRejectDialog_title form-control" type="text" placeholder="Subject" autofocus="autofocus" t-model="state.title"/>
|
||||
<textarea class="o_ModerationRejectDialog_comment form-control mt16" placeholder="Mail Body" t-model="state.comment"/>
|
||||
<t t-set-slot="buttons">
|
||||
|
||||
Reference in New Issue
Block a user