<commit_before><#import "../common/spring.ftl" as spring/>
<#include "../common/ngrinder_macros.ftl">
<#assign security=JspTaglibs["http://www.springframework.org/security/tags"] />
<form class="form-horizontal form-horizontal-left" id="user_form" name="user_form" method="POST">
<#if !(popover_place??)><#assign popover_place='bottom'/></#if>
<#if !(basePath??)><#assign basePath>${req.contextPath}/user</#assign></#if>
<#if !(allowRoleChange??)><#assign allowRoleChange=false/></#if>
<#if !(allowShareChange??)><#assign allowShareChange=false/></#if>
<#if !(allowPasswordChange??)><#assign allowPasswordChange=false/></#if>
<#if !(showPasswordByDefault??)><#assign showPasswordByDefault=false/><</#if>
<#if !(allowUserIdChange??)><#assign allowUserIdChange=false/></#if>
<#if !(userSecurityEnabled??)><#assign userSecurityEnabled=true/><</#if>
<#if !(newUser??)><#assign newUser=false/></#if>
<#if !(followers??)><#assign followers=[]/></#if>
	<fieldset>

	<@control_group name="userId" label_message_key="user.info.userId">
		<#assign userIdMsg>
			<@spring.message "user.info.warning.userId.intro"/> <@spring.message "common.form.rule.userId"/>
		</#assign>
		<#assign others><#if user?? && user.userId??>readonly</#if></#assign>
		<@input_append class="span4" name="userId" value="${(user.userId)!}" others=others
				data_content=userIdMsg data_placement='${popover_place}' message="user.info.userId"/>
		<input type="hidden" id="id" name="id" value="${(user.id)!}"/>
	</@control_group>

	<@control_group name="userName" label_message_key="user.info.name">
		<@input_append class="span4" name="userName" value="${(user.userName)!}"
			data_placement='${popover_place}' message="user.info.name"/>
	</@control_group>

	<#if allowRoleChange>
		<@control_group name="role" label_message_key="user.info.role">
			<select class="span4" name="role" id="role">
				<#list roleSet as role>
					<option value="${role}" <#if user?? && user.role==role>selected="selected"</#if>  >${role.fullName}</option>
				</#list>
			</select>
		</@control_group>
	</#if>

	<@control_group name="email" label_message_key="user.info.email">
		<@input_append class="span4" name="email" value="${(user.email)!}"
			data_placement='${popover_place}' message="user.info.email"/>
	</@control_group>

	<@control_group name="description" label_message_key="common.label.description">
		<textarea cols="30" id="description" name="description"
				  rows="3" title="Description" class="tx_area span4" style="resize: none;">${(user.description)!}</textarea>
	</@control_group>

	<@control_group name="mobilePhone" label_message_key="user.info.phone">
		<@input_append class="span4" name="mobilePhone" value="${(user.mobilePhone)!}"
			data_placement='${popover_place}' message="user.info.phone"/>
	</@control_group>

	<#if allowShareChange>
		<@control_group label_message_key="user.share.title">
			<select id="user_switch_select" name="followersStr" style="width:300px" multiple>
				<#include "switch_options.ftl">
			</select>
		</@control_group>
	</#if>

	<#if allowPasswordChange>
		<div class="control-group">
			<#if !showPasswordByDefault>
				<div class="accordion-heading">
					<a id="change_password_btn" class="pointer-cursor">
						<@spring.message "user.info.button.changePwd"/>
					</a>
				</div>
			</#if>
			<div id="user_password_section" <#if !showPasswordByDefault>style='display:none'</#if> >
				<div class="accordion-inner" style="padding:9px 0">
					<@control_group name="password" label_message_key="user.info.pwd">
						<@input_append class="span4" name="password" value="${(<PASSWORD>)!}"
							type="password" data_placement='${popover_place}'message="user.info.pwd"/>
					</@control_group>

					<@control_group name="confirmPassword" label_message_key="user.<KEY>">
						<@input_append class="span4" name="confirmPassword" value="${(<PASSWORD>)!}"
							type="password" data_placement="${popover_place}" message="user.info.cpwd"/>
					</@control_group>

				</div>
			</div>
		</div>
	</#if>
		<div class="control-group">
			<div class="controls pull-right">
				<a class="btn btn-success" id="save_user_btn">
				<@spring.message "user.info.button.saveUser"/></a>
			</div>
		</div>                                                                                     +
	</fieldset>
</form>
<script type="text/javascript">
	//@ sourceURL=/user/info
	$(document).ready(function () {
		$('#user_form').find('input[rel="popover"]').popover({ trigger: 'hover', container: '#user_form' });
		var allowUserIdChange = ${allowUserIdChange?string};
		var userSecurityEnabled = ${userSecurityEnabled?string};
		var allowPasswordChange = ${allowPasswordChange?string};
		$.validator.addMethod("userIdFmt", function (userId, element) {
			if (!allowUserIdChange) {
				 return true;
			}
			var rule = new RegExp(/^[a-zA-Z]{1}[a-zA-Z0-9_\.]{3,20}$/);
			if (!rule.test($.trim(userId))) {
				removeSuccess(element);
				return false;
			}
			return true;
		}, "<@spring.message 'user.info.userId.invalid'/>");<commit_msg>[NGRINDER-702]Review all java methods doc<commit_after><#import "../common/spring.ftl" as spring/>
<#include "../common/ngrinder_macros.ftl">
<#assign security=JspTaglibs["http://www.springframework.org/security/tags"] />
<form class="form-horizontal form-horizontal-left" id="user_form" name="user_form" method="POST">
<#if !(popover_place??)><#assign popover_place='bottom'/></#if>
<#if !(basePath??)><#assign basePath>${req.contextPath}/user</#assign></#if>
<#if !(allowRoleChange??)><#assign allowRoleChange=false/></#if>
<#if !(allowShareChange??)><#assign allowShareChange=false/></#if>
<#if !(allowPasswordChange??)><#assign allowPasswordChange=false/></#if>
<#if !(showPasswordByDefault??)><#assign showPasswordByDefault=false/><</#if>
<#if !(allowUserIdChange??)><#assign allowUserIdChange=false/></#if>
<#if !(userSecurityEnabled??)><#assign userSecurityEnabled=true/><</#if>
<#if !(newUser??)><#assign newUser=false/></#if>
<#if !(followers??)><#assign followers=[]/></#if>
	<fieldset>

	<@control_group name="userId" label_message_key="user.info.userId">
		<#assign userIdMsg>
			<@spring.message "user.info.warning.userId.intro"/> <@spring.message "common.form.rule.userId"/>
		</#assign>
		<#assign others><#if user?? && user.userId??>readonly</#if></#assign>
		<@input_append class="span4" name="userId" value="${(user.userId)!}" others=others
				data_content=userIdMsg data_placement='${popover_place}' message="user.info.userId"/>
		<input type="hidden" id="id" name="id" value="${(user.id)!}"/>
	</@control_group>

	<@control_group name="userName" label_message_key="user.info.name">
		<@input_append class="span4" name="userName" value="${(user.userName)!}"
			data_placement='${popover_place}' message="user.info.name"/>
	</@control_group>

	<#if allowRoleChange>
		<@control_group name="role" label_message_key="user.info.role">
			<select class="span4" name="role" id="role">
				<#list roleSet as role>
					<option value="${role}" <#if user?? && user.role==role>selected="selected"</#if>  >${role.fullName}</option>
				</#list>
			</select>
		</@control_group>
	</#if>

	<@control_group name="email" label_message_key="user.info.email">
		<@input_append class="span4" name="email" value="${(user.email)!}"
			data_placement='${popover_place}' message="user.info.email"/>
	</@control_group>

	<@control_group name="description" label_message_key="common.label.description">
		<textarea cols="30" id="description" name="description"
				  rows="3" title="Description" class="tx_area span4" style="resize: none;">${(user.description)!}</textarea>
	</@control_group>

	<@control_group name="mobilePhone" label_message_key="user.info.phone">
		<@input_append class="span4" name="mobilePhone" value="${(user.mobilePhone)!}"
			data_placement='${popover_place}' message="user.info.phone"/>
	</@control_group>

	<#if allowShareChange>
		<@control_group label_message_key="user.share.title">
			<select id="user_switch_select" name="followersStr" style="width:300px" multiple>
				<#include "switch_options.ftl">
			</select>
		</@control_group>
	</#if>

	<#if allowPasswordChange>
		<div class="control-group">
			<#if !showPasswordByDefault>
				<div class="accordion-heading">
					<a id="change_password_btn" class="pointer-cursor">
						<@spring.message "user.info.button.changePwd"/>
					</a>
				</div>
			</#if>
			<div id="user_password_section" <#if !showPasswordByDefault>style='display:none'</#if> >
				<div class="accordion-inner" style="padding:9px 0">
					<@control_group name="password" label_message_key="<PASSWORD>.info.<PASSWORD>">
						<@input_append class="span4" name="password" value="${(<PASSWORD>)!}"
							type="password" data_placement='${popover_place}'message="user.info.pwd"/>
					</@control_group>

					<@control_group name="confirmPassword" label_message_key="user.info.<PASSWORD>">
						<@input_append class="span4" name="confirmPassword" value="${(<PASSWORD>)!}"
							type="password" data_placement="${popover_place}" message="user.info.cpwd"/>
					</@control_group>

				</div>
			</div>
		</div>
	</#if>
		<div class="control-group">
			<div class="controls pull-right">
				<a class="btn btn-success" id="save_user_btn">
				<@spring.message "user.info.button.saveUser"/></a>
			</div>
		</div>
	</fieldset>
</form>
<script type="text/javascript">
	//@ sourceURL=/user/info
	$(document).ready(function () {
		$('#user_form').find('input[rel="popover"]').popover({ trigger: 'hover', container: '#user_form' });
		var allowUserIdChange = ${allowUserIdChange?string};
		var userSecurityEnabled = ${userSecurityEnabled?string};
		var allowPasswordChange = ${allowPasswordChange?string};
		$.validator.addMethod("userIdFmt", function (userId, element) {
			if (!allowUserIdChange) {
				 return true;
			}
			var rule = new RegExp(/^[a-zA-Z]{1}[a-zA-Z0-9_\.]{3,20}$/);
			if (!rule.test($.trim(userId))) {
				removeSuccess(element);
				return false;
			}
			return true;
		}, "<@spring.message 'user.info.userId.invalid'/>");
{'fraction_non_alphanumeric': 0.2088702427329937, 'fraction_numerical': 0.004694835680751174, 'mean_word_length': 5.595520421607378, 'pattern_counts': {'":': 0, '<': 243, '<?xml version=': 0, '>': 239, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1370926', 'n_tokens_mistral': 3756, 'n_tokens_neox': 3416, 'n_words': 517}