Files
2024-11-18 11:19:08 +08:00

41 lines
1.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<!--odoo\addons\web\static\src\views\form\form_status_indicator\form_status_indicator.xml-->
<t t-name="web.FormStatusIndicator">
<div class="o_form_status_indicator d-md-flex align-items-center align-self-md-end me-auto" t-att-class="{ o_form_status_indicator_new_record: props.model.root.isNew }">
<div class="o_form_status_indicator_buttons d-flex" t-att-class="{ invisible: !(props.model.root.isNew or displayButtons) }">
<button
type="button"
class="o_form_button_save btn btn-light px-1 py-0 lh-sm"
data-hotkey="s"
t-on-click.stop="save"
data-tooltip="Save manually"
style="background-color: blue !important;color: white !important;"
aria-label="Save manually"
t-ref="save">
<i class="fa fa-cloud-upload fa-fw"/>
保存
</button>
<button
type="button"
class="o_form_button_cancel btn btn-light px-1 py-0 lh-sm"
data-hotkey="j"
t-on-click.stop="discard"
data-tooltip="Discard changes"
style="background-color: red !important;color: white !important;"
aria-label="Discard changes">
<i class="fa fa-undo fa-fw"/>
取消
</button>
</div>
<span
t-if="!props.model.root.isNew and indicatorMode === 'invalid'"
class="text-danger small ms-2"
data-tooltip="Unable to save. Correct the issue or discard changes">
<i class="fa fa-warning" />
</span>
</div>
</t>
</templates>