<div class="fields">
	<div class="fieldset">
		<div class="row" data-bind="visible: !bCreate ">
			<div>
				<label class="custom_checkbox" data-bind="css: {'checked': isDefault, 'disabled': disableCheckbox}">
					<span class="icon"></span>
					<input type="checkbox" data-bind="checked: isDefault, enable: !disableCheckbox(), attr: {'id': 'identity_default_' + bCreate}" />
				</label>
				<label data-bind="i18n: {'key': '%MODULENAME%/LABEL_IDENTITY_SET_DEFAULT'}, attr: {'for': 'identity_default_' + bCreate}"></label>
			</div>
		</div>
		<div class="row">
			<span class="label" data-bind="i18n: {'key': '%MODULENAME%/LABEL_YOUR_NAME'}"></span>
			<input class="value input" spellcheck="false" type="text" data-bind="value: friendlyName, valueUpdate: 'afterkeydown', onEnter: save, hasFocus: friendlyNameHasFocus"/>
		</div>
		<div class="row">
			<span class="label" data-bind="i18n: {'key': 'COREWEBCLIENT/LABEL_EMAIL'}"></span>
			<input class="value input" spellcheck="false" type="text" 
				   data-bind="value: email, valueUpdate: 'afterkeydown', onEnter: save, disable: disableEditEmail, visible: emailList().length === 0"/>
			<select class="value input" data-bind="value: selectedEmail, options: emailList, visible: emailList().length > 0"></select>
		</div>
		<div class="row remove_account" data-bind="visible: !disableRemoveIdentity()">
			<span class="link" data-bind="i18n: {'key': '%MODULENAME%/ACTION_REMOVE_IDENTITY'}, click: remove"></span>
		</div>
	</div>

	<div class="buttons">
		<span class="button" data-bind="i18n: {'key': 'COREWEBCLIENT/ACTION_SAVE'}, click: save, visible: !isSaving()"></span>
		<span class="button" data-bind="i18n: {'key': 'COREWEBCLIENT/ACTION_SAVE_IN_PROGRESS'}, visible: isSaving()"></span>
		<span class="button secondary_button" data-bind="i18n: {'key': 'COREWEBCLIENT/ACTION_CANCEL'}, click: cancel, visible: bCreate"></span>
	</div>
</div>
