<header class="g-ui-user-select-none">
	<a href="#" class="close" data-bind="click: close">×</a>
	<h3>
		<span data-bind="visible: !edit()" data-i18n="POPUPS_IDENTITY/TITLE_ADD_IDENTITY"></span>
		<span data-bind="visible: edit" data-i18n="POPUPS_IDENTITY/TITLE_UPDATE_IDENTITY"></span>
	</h3>
</header>
<form id="identityform" class="modal-body" autocomplete="off" data-bind="submit: submitForm">
	<div class="form-horizontal g-ui-user-select-none">
		<div class="alert" data-bind="visible: '' !== submitError()">
			<a href="#" class="close" data-bind="click: function () { submitError('') }">×</a>
			<span data-bind="text: submitError"></span>
		</div>
		<div class="control-group" data-bind="css: {'error': emailHasError}">
			<label data-i18n="GLOBAL/EMAIL"></label>
			<div>
				<div class="textEmail" data-bind="text: email, visible: owner"></div>
				<input type="email" class="input-xlarge" autofocus=""
					autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
					data-bind="visible: !owner(), value: email, hasfocus: emailFocused">
			</div>
		</div>
		<div class="control-group">
			<label data-i18n="GLOBAL/NAME"></label>
			<input type="text" class="input-xlarge"
				autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
				data-bind="value: name">
		</div>
		<div class="control-group" data-bind="visible: showReplyTo, css: {'error': replyToHasError}">
			<label data-i18n="GLOBAL/REPLY_TO"></label>
			<input type="text" class="inputReplyTo input-xlarge"
				autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
				data-bind="value: replyTo, hasfocus: replyToFocused">
		</div>
		<div class="control-group" data-bind="visible: showBcc, css: {'error': bccHasError}">
			<label data-i18n="GLOBAL/BCC"></label>
			<input type="text" class="inputBcc input-xlarge"
				autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
				data-bind="value: bcc, hasfocus: bccFocused">
		</div>
		<div class="control-group" data-bind="visible: !showReplyTo() || !showBcc()">
			<div>
				<span data-bind="visible: !showReplyTo()">
					<span class="g-ui-link" data-i18n="GLOBAL/REPLY_TO"
						data-bind="click: function () { showReplyTo(true); }"></span>
					&nbsp;&nbsp;
				</span>
				<span data-bind="visible: !showBcc()">
					<span class="g-ui-link" data-i18n="GLOBAL/BCC"
						data-bind="click: function () { showBcc(true); }"></span>
				</span>
			</div>
		</div>
	</div>
	<hr>
	<div class="control-group g-ui-user-select-none">
		<div data-bind="component: {
			name: 'Checkbox',
			params: {
				label: 'POPUPS_IDENTITY/LABEL_SIGNATURE_INSERT_BEFORE',
				value: signatureInsertBefore
			}
		}"></div>
	</div>
	<div class="e-signature-place" data-bind="editor: signature"></div>
</form>
<footer>
	<button form="identityform" class="btn buttonAddIdentity">
		<i data-bind="visible: !edit(), css: {'icon-user-add': !submitRequest(), 'icon-spinner': submitRequest()}"></i>
		<span data-bind="visible: !edit()" data-i18n="POPUPS_IDENTITY/BUTTON_ADD_IDENTITY"></span>
		<i data-bind="visible: edit, css: {'icon-ok': !submitRequest(), 'icon-spinner': submitRequest()}"></i>
		<span data-bind="visible: edit" data-i18n="POPUPS_IDENTITY/BUTTON_UPDATE_IDENTITY"></span>
	</button>
</footer>
