[IMP] account,sale,website: improve buttons text and class

Website generic: change "edit to backend" class to match other menu dropdown items.

Invoice: add "back to edit mode" banner.

Sales Order:
- "Reject" in red, we really don't want the user to click it.
- "Accept & Sign" renamed to better convey the meaning and match the button on the popup.

PR: #26801
task-1876864
This commit is contained in:
Sébastien Theys
2018-09-19 12:00:37 +02:00
committed by Romain Derie
parent d50aa61cf7
commit a7f32c2649
3 changed files with 11 additions and 5 deletions
@@ -76,6 +76,12 @@
<xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
<t t-set="wrapwrap_classes" t-value="'o_portal_bg_dark'"/>
<t t-set="o_portal_fullwidth_alert" groups="sales_team.group_sale_salesman">
<t t-call="portal.portal_back_in_edit_mode">
<t t-set="backend_url" t-value="'/web#return_label=Website&amp;model=%s&amp;id=%s&amp;action=%s&amp;view_type=form' % (invoice._name, invoice.id, invoice.env.ref('account.action_invoice_tree1').id)"/>
</t>
</t>
<div class="row mt16 o_portal_invoice_sidebar">
<!-- Sidebar -->
<t t-call="portal.portal_record_sidebar">
+4 -4
View File
@@ -143,7 +143,7 @@
<t t-if="to_accept or to_accept_and_pay or sale_order.is_expired">
<a role="button" t-if="to_accept" class="btn btn-primary btn-block" data-toggle="modal" data-target="#modalaccept" href="#">
<i class="fa fa-check"/> Accept
<i class="fa fa-check"/> Accept &amp; Sign
</a>
<a role="button" t-elif="to_accept_and_pay" class="btn btn-success btn-block" data-toggle="modal" data-target="#modalaccept" href="#">
<i class="fa fa-check"/> <t t-if="not sale_order.signature">Accept &amp; </t>Pay
@@ -319,8 +319,8 @@
<textarea rows="4" name="decline_message" placeholder="Your feedback....." class="form-control"/>
</main>
<footer class="modal-footer">
<button type="submit" t-att-id="sale_order.id" class="btn btn-primary">Reject</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="submit" t-att-id="sale_order.id" class="btn btn-danger"><i class="fa fa-times"></i> Reject</button>
<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
</footer>
</form>
</div>
@@ -344,7 +344,7 @@
<div t-if="to_accept or to_accept_and_pay or to_pay" class="row justify-content-center text-center d-print-none pt-1 pb-4">
<div class="col-sm-auto mt8">
<a t-if="to_accept" role="button" class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" href="#"><i class="fa fa-check"/> Accept</a>
<a t-if="to_accept" role="button" class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" href="#"><i class="fa fa-check"/> Accept &amp; Sign</a>
<a t-elif="to_accept_and_pay" role="button" class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" href="#"><i class="fa fa-check"/> <t t-if="not sale_order.signature">Accept &amp; </t>Pay</a>
</div>
<t t-if="to_accept or to_accept_and_pay">
@@ -123,7 +123,7 @@
</a>
<div class="dropdown-menu" role="menu">
<a role="menuitem" style="text-align: left;" t-attf-href="/web#return_label=Website&amp;view_type=form&amp;model=#{main_object._name}&amp;id=#{main_object.id}&amp;action=#{action}"
class="dropdown-item btn btn-link btn-sm" title='Edit in backend' id="edit-in-backend">Edit in backend</a>
class="dropdown-item" title='Edit in backend' id="edit-in-backend">Edit in backend</a>
</div>
</li>
<li t-if="translatable">