mirror of
https://github.com/bringout/oca-server-auth.git
synced 2026-04-19 01:52:06 +02:00
121 lines
4.1 KiB
XML
121 lines
4.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<templates id="template" xml:space="preserve">
|
|
<t t-name="vault.Field.buttons.send" owl="1">
|
|
<button
|
|
t-if="sendButton"
|
|
t-on-click="_onSendValue"
|
|
class="btn btn-secondary btn-sm fa fa-share-alt o_vault_send"
|
|
title="Send the secret to an user"
|
|
aria-label="Send the secret to an user"
|
|
/>
|
|
</t>
|
|
|
|
<t t-name="vault.Field.buttons" owl="1">
|
|
<button
|
|
t-if="!state.decrypted && showButton"
|
|
t-on-click="_onShowValue"
|
|
class="btn btn-secondary btn-sm fa fa-eye o_vault_show"
|
|
title="Show"
|
|
aria-label="Show"
|
|
/>
|
|
<button
|
|
t-elif="showButton"
|
|
t-on-click="_onShowValue"
|
|
class="btn btn-secondary btn-sm fa fa-eye-slash o_vault_show"
|
|
title="Hide"
|
|
aria-label="Hide"
|
|
/>
|
|
<button
|
|
t-if="copyButton"
|
|
t-on-click="_onCopyValue"
|
|
class="btn btn-secondary btn-sm fa fa-clipboard o_vault_clipboard"
|
|
title="Copy to clipboard"
|
|
aria-label="Copy to clipboard"
|
|
/>
|
|
<t t-call="vault.Field.buttons.send" />
|
|
</t>
|
|
|
|
<t t-name="vault.FieldVault" owl="1">
|
|
<div class="o_vault o_vault_error" t-if="!supported()">
|
|
<span>*******</span>
|
|
</div>
|
|
<div class="o_vault" t-elif="props.readonly">
|
|
<span class="o_vault_buttons">
|
|
<t t-call="vault.Field.buttons" />
|
|
</span>
|
|
<span t-esc="formattedValue" t-ref="span" />
|
|
</div>
|
|
<div class="o_vault" t-else="">
|
|
<span class="o_vault_buttons">
|
|
<button
|
|
t-if="generateButton"
|
|
t-on-click="_onGenerateValue"
|
|
class="btn btn-secondary btn-sm fa fa-lock o_vault_generate"
|
|
title="Generate"
|
|
aria-label="Generate"
|
|
/>
|
|
</span>
|
|
<input class="o_input" type="text" t-esc="formattedValue" t-ref="input" />
|
|
</div>
|
|
</t>
|
|
|
|
<t
|
|
t-name="vault.FileVault"
|
|
t-inherit="web.BinaryField"
|
|
t-inherit-mode="primary"
|
|
owl="1"
|
|
>
|
|
<xpath expr="//button[hasclass('o_clear_file_button')]" position="after">
|
|
<t t-call="vault.Field.buttons.send" />
|
|
</xpath>
|
|
</t>
|
|
|
|
<t t-name="vault.FieldVaultInbox" owl="1">
|
|
<div class="o_vault o_vault_error" t-if="!supported()">
|
|
<span>*******</span>
|
|
</div>
|
|
<div class="o_vault" t-elif="props.value">
|
|
<span class="o_vault_buttons">
|
|
<t t-call="vault.Field.buttons" />
|
|
<button
|
|
t-if="saveButton"
|
|
t-on-click="_onSaveValue"
|
|
class="btn btn-secondary btn-sm fa fa-save"
|
|
title="Save in a vault"
|
|
aria-label="Save in a vault"
|
|
/>
|
|
</span>
|
|
|
|
<span class="o_vault_inbox" t-esc="formattedValue" t-ref="span" />
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="vault.FileVaultInbox" owl="1">
|
|
<div class="o_vault o_vault_error" t-if="!supported()">
|
|
<span>*******</span>
|
|
</div>
|
|
<div class="o_vault" t-elif="props.value">
|
|
<span class="o_vault_buttons">
|
|
<button
|
|
t-if="saveButton"
|
|
t-on-click="_onSaveValue"
|
|
class="btn btn-secondary btn-sm fa fa-save"
|
|
title="Save in a vault"
|
|
aria-label="Save in a vault"
|
|
/>
|
|
</span>
|
|
|
|
<a class="o_form_uri" href="#" t-on-click.prevent="onFileDownload">
|
|
<span class="fa fa-download me-2" />
|
|
<t t-if="state.fileName" t-esc="state.fileName" />
|
|
</a>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="vault.FileVaultExport" owl="1">
|
|
<a class="o_form_uri" href="#" t-on-click.prevent="onFileDownload">
|
|
<span class="fa fa-download me-2" />
|
|
<t t-if="state.fileName" t-esc="state.fileName" />
|
|
</a>
|
|
</t>
|
|
</templates>
|