<div class="fields">
	<div class="fieldset">
		<div class="row">
			<div>
				<label class="custom_checkbox" data-bind="css: {'checked': isEnabled}">
					<span class="icon"></span>
					<input type="checkbox" id="incoming_mail_enabled" data-bind="checked: isEnabled" />
				</label>
				<label for="incoming_mail_enabled" data-bind="i18n: {'key': '%MODULENAME%/LABEL_ENABLED'}"></label>
			</div>
		</div>
		<div class="row hint">
			<span data-bind="text: fetcherIntervalHint"></span>
		</div>
		<div class="row incoming">
			<!-- ko template: {name: '%ModuleName%_Settings_ServerPropertiesView', data: oIncoming} --><!-- /ko -->
		</div>

		<div class="row login">
			<span class="label" data-bind="i18n: {'key': 'COREWEBCLIENT/LABEL_LOGIN'}"></span>
			<span class="value text" data-bind="text: incomingLogin"></span>
		</div>
		<div class="row password">
			<span class="label required" data-bind="i18n: {'key': 'COREWEBCLIENT/LABEL_PASSWORD'}"></span>
			<input class="value input" spellcheck="false" autocomplete="new-password" type="password" maxlength="255" data-bind="value: incomingPassword, valueUpdate: 'afterkeydown', onEnter: save, hasFocus: passwordIsSelected, enable: isEnabled"/>
		</div>

		<div class="row folder">
			<span class="label required" data-bind="i18n: {'key': '%MODULENAME%/LABEL_TARGET_FOLDER'}"></span>
			<span data-bind="i18n: {'key': '%MODULENAME%/INFO_WAITING_FOLDER_LIST'}, visible: options().length === 0"></span>
			<select class="value input" data-bind="visible: options().length > 1, value: folder, options: options,
				optionsText: 'translatedDisplayName', optionsValue: 'fullName', optionsAfterRender: defaultOptionsAfterRender, enable: isEnabled">
			</select>
		</div>

		<div class="row hint">
			<span data-bind="i18n: {'key': '%MODULENAME%/INFO_FETCHER_STORE'}"></span>
		</div>
		
		<div class="row">
			<div>
				<label class="custom_checkbox" data-bind="css: {'checked': leaveMessagesOnServer}">
					<span class="icon"></span>
					<input type="checkbox" id="leave_messages_on_server" data-bind="checked: leaveMessagesOnServer, enable: isEnabled" />
				</label>
				<label for="leave_messages_on_server" data-bind="i18n: {'key': '%MODULENAME%/LABEL_LEAVE_MESSAGES_ON_SERVER'}"></label>
			</div>
		</div>
		<div class="row">
			<span class="link" data-bind="i18n: {'key': '%MODULENAME%/ACTION_REMOVE_FETCHER'}, 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'}, click: save, visible: isSaving()"></span>
	</div>
</div>
