Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
$header(formurl,breadcrumbs,shortcuts)$

$if(error)$<div class="error"><p>$error$</p></div>$endif$

<form method="post" action='$formurl$/person.new' id="person_new" class="person">
<input type="hidden" name="q" value='$q;format="url"$'/>
<input type="hidden" name="a" value="$auth$" />

<h2>New person</h2>

<label for='first_name'>
<span class='question'>First name</span>
<span class='answer'><input type="text" name="first_name" id="first_name" value='$first_name;format="html"$' /></span>
</label>

<label for='last_name'>
<span class='question'>Last name</span>
<span class='answer'><input type="text" name="last_name" id="last_name" value='$last_name;format="html"$' /></span>
</label>

<label for='email'>
<span class='question'>Email</span>
<span class='answer'><input type="text" name="email" id="email" value='$email;format="html"$' /></span>
</label>

<label for='expiry'>
<span class='question'>Expiry</span>
<span class='answer'><input type="text" name="expiry" placeholder="dd/mm/yyyy hh:mmAM" id="expiry" value='$expiry;format="html"$' /></span>
</label>

<label for='username'>
<span class='question'>$if(ldap_enabled)$LDAP $endif$Username</span>
<span class='answer'>
	<input type="text" name="username" id="username" value='$username;format="html"$' />
$if(ldap_enabled)$
<br/>If you do not specify an LDAP username, an email will be sent
to the user enabling them to nominate a password to use with this site.
$endif$
</span>
</label>

<br/><br/>

<h3>Administrative Roles</h3>

$roles:{r|
	$if(!r.role.internal)$
<label for='role_$r.role.role$' class="custom">
	<span class='question'>$r.role.name;format="html"$</span>
	<span class='answer'><input type="checkbox" name="role_$r.role.role$" id="role_$r.role.role$" value="true" $if(r.selected)$ checked="checked"$endif$ /> $r.role.description;format="html"$</span>
</label>
	$endif$
}$

$if(has_custom_role)$
<br/><br/>
$endif$

$roles:{r|
	$if(r.role.internal)$
<label for='role_$r.role.role$' class="internal">
	<span class='question'>$r.role.name;format="html"$</span>
	<span class='answer'><input type="checkbox" name="role_$r.role.role$" id="role_$r.role.role$" value="true" $if(r.selected)$ checked="checked"$endif$ /> $r.role.description;format="html"$</span>
</label>
	$endif$
}$



<div class='submit'>
	<input type="submit" value="Create"/>
</div>

</form>
 
<script type="text/javascript">
document.getElementById('first_name').focus();
</script>

$footer()$
New to GrepCode? Check out our FAQ X