Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

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

<h2>$group.name;format="html"$ roles</h2>

<div><form method="post" action='$formurl$/group.edit' id="group_edit">
<input type="hidden" name="uuid" value="$uuid$"/>
<input type="hidden" name="a" value="$auth$" />

<p>The following roles are associated with this account:</p>

<ul class="current_roles chevron">
$current_resource_based_roles:{r|
<li>
	<span>$r.name;format="html"$</span> &mdash; $r.resource;format="html"$ <a class="delete" href='$formurl$/person.edit?deleterole=$r.role;format="url"$&amp;resource=$r.uid;format="url"$'>Delete</a>
</li>
}$
<li>
$if(role_to_add)$
	<input name="add_role" type="hidden" value='$role_to_add;format="html"$' />
	<select name="role_resource">
$possible_resource_based_roles:{r|
		<option value='$r.key;format="html"$'>$role_to_add_name$ ($r.value;format="html"$)</option>}$
	</select>
$else$
	<select name="add_role">
$rr:{r|
		<option value='$r.role;format="html"$'>$r.name;format="html"$</option>}$
	</select>
$endif$
	<input type="submit" value="Save"/>
</li>
</ul>

</form></div>

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