snappymail/rainloop/v/0.0.0/app/templates/Views/User/PopupsComposeOpenPgp.html
2016-04-07 14:07:19 +02:00

112 lines
4.5 KiB
HTML

<div class="popups">
<div class="modal hide b-compose-open-pgp-content g-ui-user-select-none" data-bind="modal: modalVisibility">
<div>
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>
<h3>
<span class="i18n" data-i18n="POPUPS_COMPOSE_OPEN_PGP/TITLE_COMPOSE_OPEN_PGP"></span>
</h3>
</div>
<div class="modal-body">
<div class="alert" data-bind="visible: '' !== notification()">
<span data-bind="text: notification"></span>
</div>
<div class="row-fluid">
<div class="span5">
<div data-bind="component: {
name: 'Checkbox',
params: {
label: 'POPUPS_COMPOSE_OPEN_PGP/LABEL_SIGN',
value: sign
}
}"></div>
<div class="key-list" data-bind="visible: sign">
<div class="key-list-wrp empty" data-bind="visible: !signKey()">
No private key found
</div>
<div class="key-list-wrp" data-bind="visible: signKey">
<div class="key-list__item row-fluid">
<div class="key-list__item-hash span4">
(<span data-bind="text: signKey() ? signKey().hash : ''"></span>)
</div>
<div class="key-list__item-names span8">
<div data-bind="if: signKey()">
<div data-bind="foreach: signKey().users">
<div class="key-list__item-name" data-bind="text: $data"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="span7">
<div data-bind="component: {
name: 'Checkbox',
params: {
label: 'POPUPS_COMPOSE_OPEN_PGP/LABEL_ENCRYPT',
value: encrypt
}
}"></div>
<div class="key-list" data-bind="visible: encrypt">
<div class="key-list-wrp empty" data-bind="visible: !encryptKeys() || encryptKeys().length === 0">
No public keys selected
</div>
<div class="key-list-wrp" data-bind="visible: encryptKeys() && encryptKeys().length > 0">
<div data-bind="foreach: encryptKeys">
<div class="key-list__item row-fluid">
<div class="key-list__item-delete span1" data-bind="click: removable ? $parent.deletePublickKey : null, css: {'disabled': !removable}">
<i class="icon-trash"></i>
</div>
<div class="key-list__item-hash span3" data-bind="visible: !empty">
(<span data-bind="text: hash"></span>)
</div>
<div class="span8">
<span class="key-list__item-names" data-bind="css: {'empty': empty}">
<span data-bind="foreach: users">
<div class="key-list__item-name" data-bind="text: $data"></div>
</span>
</span>
<span class="key-list__item-error" data-bind="visible: empty">
(Public key not found)
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row-fluid key-actions">
<div class="span5">
<input type="password" class="inputPassword input-block-level i18n"
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
data-i18n="[placeholder]POPUPS_COMPOSE_OPEN_PGP/LABEL_PASSWORD"
data-bind="visible: sign, textInput: password, hasfocus: password.focus, onEnter: doCommand" />
</div>
<div class="span7" data-bind="visible: encrypt() && 0 < publicKeysOptions().length">
<div class="form-inline">
<select class="input-block-level" data-bind="options: publicKeysOptions, value: selectedPublicKey,
optionsCaption: optionsCaption, optionsText: 'name', optionsValue: 'id',
optionsAfterRender: addOptionClass"></select>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn buttonDo" data-bind="command: doCommand, hasfocus: buttonFocus,
enable: (sign() || encrypt()) && (!sign() || (sign() && password().length)) && (!encrypt() || encrypt() && encryptKeys().length > 0)">
<i data-bind="css: {'icon-key': !submitRequest(), 'icon-spinner animated': submitRequest()}"></i>
&nbsp;&nbsp;
<span class="i18n" data-bind="visible: sign() && !encrypt()" data-i18n="POPUPS_COMPOSE_OPEN_PGP/BUTTON_SIGN"></span>
<span class="i18n" data-bind="visible: !sign() && encrypt()" data-i18n="POPUPS_COMPOSE_OPEN_PGP/BUTTON_ENCRYPT"></span>
<span class="i18n" data-bind="visible: (sign() && encrypt()) || (!sign() && !encrypt())" data-i18n="POPUPS_COMPOSE_OPEN_PGP/BUTTON_SIGN_AND_ENCRYPT"></span>
</button>
</div>
</div>
</div>
</div>