<commit_before><?
/**
 * @category	Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 * @copyright   Copyright (C) 2011 - 2012 <NAME> and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */
?>

<script src="media://js/koowa.js" />
<script src="media://users/js/users.js" />
<style src="media://css/koowa.css" />

<?= @helper('behavior.validator') ?>

<script type="text/javascript">
    window.addEvent('domready', function() {
        ComUsers.Form.addValidator('passwordLength');
    });
</script>

<ktml:module position="toolbar">
    <?= @helper('toolbar.render', array('toolbar' => $toolbar))?>
</ktml:module>

<form action="" method="post" id="user-form" class="-koowa-form">
	<input type="hidden" name="enabled" value="<?= $this->getObject('user')->getId() == $user->id ? 1 : 0 ?>" />
	<input type="hidden" name="send_email" value="0" />
	
	<div class="main">
		<div class="title">
			<input class="required" type="text" id="name" name="name" value="<?= $user->name ?>" placeholder="<?= @text('Name') ?>" />
		</div>
		
		<div class="scrollable">
			<fieldset>
				<legend><?= @text('General') ?></legend>
				<div>
				    <label for="email"><?= @text('E-Mail') ?></label>
				    <div>
				        <input class="required validate-email" type="email" id="email" name="email" value="<?= $user->email ?>" />
				    </div>
				</div>
				<div>
				    <label for="params[timezone]"><?= @text('Time Zone') ?></label>
				    <div>
				        <?= @helper('com:extensions.listbox.timezones',
				            array('name' => 'params[timezone]', 'selected' => $user->params->get('timezone'), 'deselect' => true, 'attribs' => array('class' => 'select-timezone', 'style' => 'width:220px'))) ?>
				    </div>
				</div>
			</fieldset>
			<fieldset>
				<legend><?= @text('Password') ?></legend>
				<div>
				    <label for="password"><?= @text('Password') ?></label>
				    <div>
				        <input class="passwordLength:<?=$params->get('password_length', 6);?>" id="password" type="password" name="password" maxlength="100" />
				        <?=@helper('com:users.form.password');?>
				    </div>
				</div>
				<div>
				    <label for="password_verify"><?= @text('Verify Password') ?></label>
				    <div>
				        <input class="validate-match matchInput:'password' matchName:'password'" type="password" id="password_verify" name="password_verify" maxlength="100" />
				    </div>
				</div>
			    <? if (!$user->isNew()): ?>
				<div>
				    <div>
				        <label class="checkbox" for="password_change">
				            <input type="checkbox" id="password_change" name="password_change" />
				            <?= @text('Require a change of password in the next sign in') ?>
				        </label>
				    </div><commit_msg>Added custom validator.<commit_after><?
/**
 * @category	Nooku
 * @package     Nooku_Server
 * @subpackage  Users
 * @copyright   Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */
?>

<script src="media://js/koowa.js" />
<script src="media://users/js/users.js" />
<style src="media://css/koowa.css" />

<?= @helper('behavior.validator') ?>

<script type="text/javascript">
    window.addEvent('domready', function() {
        ComUsers.Form.addValidators(['passwordLength','passwordVerify']);
    });
</script>

<ktml:module position="toolbar">
    <?= @helper('toolbar.render', array('toolbar' => $toolbar))?>
</ktml:module>

<form action="" method="post" id="user-form" class="-koowa-form">
	<input type="hidden" name="enabled" value="<?= $this->getObject('user')->getId() == $user->id ? 1 : 0 ?>" />
	<input type="hidden" name="send_email" value="0" />
	
	<div class="main">
		<div class="title">
			<input class="required" type="text" id="name" name="name" value="<?= $user->name ?>" placeholder="<?= @text('Name') ?>" />
		</div>
		
		<div class="scrollable">
			<fieldset>
				<legend><?= @text('General') ?></legend>
				<div>
				    <label for="email"><?= @text('E-Mail') ?></label>
				    <div>
				        <input class="required validate-email" type="email" id="email" name="email" value="<?= $user->email ?>" />
				    </div>
				</div>
				<div>
				    <label for="params[timezone]"><?= @text('Time Zone') ?></label>
				    <div>
				        <?= @helper('com:extensions.listbox.timezones',
				            array('name' => 'params[timezone]', 'selected' => $user->params->get('timezone'), 'deselect' => true, 'attribs' => array('class' => 'select-timezone', 'style' => 'width:220px'))) ?>
				    </div>
				</div>
			</fieldset>
			<fieldset>
				<legend><?= @text('Password') ?></legend>
				<div>
				    <label for="password"><?= @text('Password') ?></label>
				    <div>
				        <input class="passwordLength:<?=$params->get('password_length', 6);?>" id="password" type="password" name="password" maxlength="100" />
				        <?=@helper('com:users.form.password');?>
				    </div>
				</div>
				<div>
				    <label for="password_verify"><?= @text('Verify Password') ?></label>
				    <div>
				        <input class="passwordVerify matchInput:'password' matchName:'password'" type="password" id="password_verify" name="password_verify" maxlength="100" />
				    </div>
				</div>
			    <? if (!$user->isNew()): ?>
				<div>
				    <div>
				        <label class="checkbox" for="password_change">
				            <input type="checkbox" id="password_change" name="password_change" />
				            <?= @text('Require a change of password in the next sign in') ?>
				        </label>
				    </div>
{'fraction_non_alphanumeric': 0.22653097034567468, 'fraction_numerical': 0.007720652746095806, 'mean_word_length': 3.1788856304985336, 'pattern_counts': {'":': 0, '<': 152, '<?xml version=': 0, '>': 184, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7060606', 'n_tokens_mistral': 2149, 'n_tokens_neox': 1848, 'n_words': 354}