<header class="g-ui-user-select-none">
	<a href="#" class="close" data-bind="click: close">×</a>
	<h3 data-bind="visible: !edit()" data-i18n="POPUPS_IDENTITY/TITLE_ADD_IDENTITY"></h3>
	<h3 data-bind="visible: edit" data-i18n="POPUPS_IDENTITY/TITLE_UPDATE_IDENTITY"></h3>
</header>
<form id="identityform" class="modal-body" autocomplete="off" spellcheck="false" 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">
			<label data-i18n="GLOBAL/EMAIL"></label>
			<div>
				<div class="textEmail" data-bind="text: email, visible: !id()"></div>
				<input name="Email" type="email" class="input-xlarge" autofocus=""
					autocomplete="off" autocorrect="off" autocapitalize="off"
					data-bind="visible: id, value: email, hasfocus: emailFocused, attr: {required: id}">
			</div>
		</div>
		<div class="control-group">
			<label data-i18n="GLOBAL/NAME"></label>
			<input name="Name" type="text" class="input-xlarge"
				autocomplete="off" autocorrect="off" autocapitalize="off"
				data-bind="value: name, hasfocus: nameFocused">
		</div>
		<div class="control-group" data-bind="visible: showReplyTo">
			<label data-i18n="GLOBAL/REPLY_TO"></label>
			<input name="ReplyTo" type="email" class="inputReplyTo input-xlarge"
				autocomplete="off" autocorrect="off" autocapitalize="off"
				data-bind="value: replyTo">
		</div>
		<div class="control-group" data-bind="visible: showBcc">
			<label data-i18n="GLOBAL/BCC"></label>
			<input name="Bcc" type="email" class="inputBcc input-xlarge"
				autocomplete="off" autocorrect="off" autocapitalize="off"
				data-bind="value: bcc">
		</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,
				name: '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>
