{namespace neos=Neos\Neos\ViewHelpers}
<div class="neos-row-fluid neos-module-container">
	<fieldset class="neos-span5">
		<legend>{neos:backend.translate(source: 'Modules', id: 'users.account')}</legend>
		<div class="neos-control-group">
			<label class="neos-control-label">{neos:backend.translate(source: 'Modules', id: 'users.username')}</label>
			<div class="neos-controls">
				<span class="neos-span12 neos-uneditable-input" title="{neos:backend.translate(source: 'Modules', id: 'users.usernameCannotBeChanged')}">{account.accountIdentifier}</span>
			</div>
		</div>

		<div class="neos-control-group{f:validation.ifHasErrors(for: 'password', then: ' neos-error')}">
			<label class="neos-control-label" for="password[0]">{neos:backend.translate(id: 'password')}</label>
			<div class="neos-controls">
				<f:form.password name="password[0]" id="password[0]" class="neos-span12" />
			</div>
		</div>

		<div class="neos-control-group{f:validation.ifHasErrors(for: 'password', then: ' neos-error')}">
			<label class="neos-control-label" for="password[1]">{neos:backend.translate(source: 'Modules', id: 'users.repeatPassword')}</label>
			<div class="neos-controls">
				<f:form.password name="password[1]" id="password[1]" class="neos-span12" />
				<f:render partial="Module/Shared/FieldValidationResults" arguments="{fieldname: 'password'}"/>
			</div>
		</div>

		<f:if condition="{showRoles}">
			<div class="neos-control-group">
				<label class="neos-control-label">{neos:backend.translate(source: 'Modules', id: 'users.roles')}</label>
				<f:for each="{availableRoles}" as="role" iteration="rolesIteration">
					<div class="neos-controls">
						<label for="roles-{rolesIteration.cycle}" class="neos-checkbox" title="{role.packageKey}" data-neos-toggle="tooltip" data-placement="right">
							<f:form.checkbox name="roleIdentifiers" multiple="true" value="{role.identifier}" id="roles-{rolesIteration.cycle}" checked="{f:security.ifHasRole(role: role, account: account, then: true, else: false)}"/><span></span>
							{role.name}
						</label>
					</div>
				</f:for>
			</div>
		</f:if>
	</fieldset>
</div>
