<div class="modal fade b-template-add-content" data-bind="modal: modalVisibility">
	<div class="modal-header g-ui-user-select-none">
		<button type="button" class="close" data-bind="command: cancelCommand">×</button>
		<h3>
			<span data-bind="visible: '' === id()" data-i18n="POPUPS_ADD_TEMPLATE/TITLE_ADD_TEMPLATE"></span>
			<span data-bind="visible: '' !== id()" data-i18n="POPUPS_ADD_TEMPLATE/TITLE_UPDATE_TEMPLATE"></span>
		</h3>
	</div>
	<div class="modal-body">
		<div class="form-horizontal g-ui-user-select-none">
			<div class="alert" data-bind="visible: '' !== submitError()">
				<button type="button" class="close" data-bind="click: function () { submitError('') }">×</button>
				<span data-bind="text: submitError"></span>
			</div>
			<br />
			<div class="control-group" data-bind="css: {'error': nameError}">
				<label class="control-label" data-i18n="GLOBAL/NAME"></label>
				<div class="controls">
					<input type="text" class="inputName input-xlarge"
						autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
						data-bind="textInput: name, onEnter: addTemplateCommand" />
				</div>
			</div>
		</div>
		<hr />
		<div class="form-horizontal">
			<div class="control-group" data-bind="css: {'error': bodyError}">
				<div class="e-template-place" data-bind="initDom: signatureDom"></div>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<a class="btn buttonAddAccount" data-bind="command: addTemplateCommand">
			<i data-bind="visible: '' == id(), css: {'icon-user-add': !submitRequest(), 'icon-spinner': submitRequest()}"></i>
			<span data-bind="visible: '' == id()" data-i18n="POPUPS_ADD_TEMPLATE/BUTTON_ADD_TEMPLATE"></span>
			<i data-bind="visible: '' !== id(), css: {'icon-ok': !submitRequest(), 'icon-spinner': submitRequest()}"></i>
			<span data-bind="visible: '' !== id()" data-i18n="POPUPS_ADD_TEMPLATE/BUTTON_UPDATE_TEMPLATE"></span>
		</a>
	</div>
</div>
