<div class="popups">
	<div class="modal hide b-identity-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 data-bind="visible: !edit()" class="i18n" data-i18n-text="POPUPS_IDENTITIES/TITLE_ADD_IDENTITY"></span>
					<span data-bind="visible: edit" class="i18n" data-i18n-text="POPUPS_IDENTITIES/TITLE_UPDATE_IDENTITY"></span>
				</h3>
			</div>
			<div class="modal-body">
				<div class="form-horizontal">
					<div class="alert" data-bind="visible: '' !== submitError()">
						<button type="button" class="close" data-bind="click: function () { submitError('') }">&times;</button>
						<span data-bind="text: submitError"></span>
					</div>
					<br />
					<div class="control-group" data-bind="visible: !owner(), css: {'error': email.hasError}">
						<label class="i18n control-label" data-i18n-text="POPUPS_IDENTITIES/LABEL_EMAIL"></label>
						<div class="controls">
							<input type="email" class="inputEmail input-large"
								autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
								data-bind="value: email, onEnter: addOrEditIdentityCommand, hasfocus: email.focused" />
						</div>
					</div>
					<div class="control-group" data-bind="visible: owner">
						<label class="i18n control-label" data-i18n-text="POPUPS_IDENTITIES/LABEL_EMAIL"></label>
						<div class="controls">
							<div class="textEmail" data-bind="text: email"></div>
						</div>
					</div>
					<div class="control-group">
						<label class="i18n control-label" data-i18n-text="POPUPS_IDENTITIES/LABEL_NAME"></label>
						<div class="controls">
							<input type="text" class="inputName input-large"
								autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
								data-bind="value: name, onEnter: addOrEditIdentityCommand, hasfocus: name.focused" />
						</div>
					</div>
					<div class="control-group" data-bind="css: {'error': replyTo.hasError}"  style="display: none">
						<label class="i18n control-label" data-i18n-text="POPUPS_IDENTITIES/LABEL_REPLY_TO"></label>
						<div class="controls">
							<input type="text" class="inputReplyTo input-large"
								autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
								data-bind="value: replyTo, onEnter: addOrEditIdentityCommand, hasfocus: replyTo.focused" />
						</div>
					</div>
					<div class="control-group" data-bind="css: {'error': bcc.hasError}"  style="display: none">
						<label class="i18n control-label" data-i18n-text="POPUPS_IDENTITIES/LABEL_BCC"></label>
						<div class="controls">
							<input type="text" class="inputBcc input-large"
								autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
								data-bind="value: bcc, onEnter: addOrEditIdentityCommand, hasfocus: bcc.focused" />
						</div>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<a class="btn buttonAddAccount" data-bind="command: addOrEditIdentityCommand">
					<i data-bind="visible: !edit(), css: {'icon-user-add': !submitRequest(), 'icon-spinner animated': submitRequest()}"></i>
					<i data-bind="visible: edit, css: {'icon-ok': !submitRequest(), 'icon-spinner animated': submitRequest()}"></i>
					&nbsp;&nbsp;
					<span data-bind="visible: !edit()" class="i18n" data-i18n-text="POPUPS_IDENTITIES/BUTTON_ADD_IDENTITY"></span>
					<span data-bind="visible: edit" class="i18n" data-i18n-text="POPUPS_IDENTITIES/BUTTON_UPDATE_IDENTITY"></span>
				</a>
			</div>
		</div>
	</div>
</div>
