summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSylvie Greverend <sylvieg@users.sourceforge.net>2006-03-29 15:35:40 +0000
committerSylvie Greverend <sylvieg@users.sourceforge.net>2006-03-29 15:35:40 +0000
commit1295e608037bcdf06f4e6d10dd03a29845b02779 (patch)
treef412fbfe86b617906aae163a65489a4924a5c744 /templates
parent62f36b107acbfe51ee02eb9d72aa6d2c07759cec (diff)
downloadusers-1295e608037bcdf06f4e6d10dd03a29845b02779.tar.gz
users-1295e608037bcdf06f4e6d10dd03a29845b02779.tar.bz2
users-1295e608037bcdf06f4e6d10dd03a29845b02779.zip
user can choose group at registration time from a closed list
Diffstat (limited to 'templates')
-rw-r--r--templates/admin_login.tpl15
-rw-r--r--templates/register.tpl20
2 files changed, 35 insertions, 0 deletions
diff --git a/templates/admin_login.tpl b/templates/admin_login.tpl
index 8330253..fc83286 100644
--- a/templates/admin_login.tpl
+++ b/templates/admin_login.tpl
@@ -55,6 +55,21 @@
{/forminput}
</div>
+ <div class="row">
+ {formlabel label="Groups choice at registration" for="registration_group_choice"}
+ {forminput}
+ <select name="registration_group_choice[]" multiple="multiple" size="5">
+ <option value="">&nbsp;</option>
+ {foreach key=g item=gr from=$groupList}
+ {if $gr.group_id ne -1}
+ <option value="{$gr.group_id}" {if $gr.registration_choice eq 'y'} selected="selected"{/if}>{$gr.group_name|truncate:"52":" ..."}</option>
+ {/if}
+ {/foreach}
+ </select>
+ {formhelp note="A user will be able to select one of the selected group at registration. If you select the default group (Registered), he will not be obliged to select a group."}
+ {/forminput}
+ </div>
+
<div class="row submit">
<input type="submit" name="loginprefs" value="{tr}Change preferences{/tr}" />
</div>
diff --git a/templates/register.tpl b/templates/register.tpl
index 29e71e7..8736ce4 100644
--- a/templates/register.tpl
+++ b/templates/register.tpl
@@ -179,6 +179,26 @@
</div>
{/if}
+ {if $groupList}
+ <hr />
+ {formlabel label="Group" for="group"}
+ {forminput}
+ {foreach item=gr from=$groupList name=group}
+ <input type="radio" name="group" value="{$gr.group_id|escape}"{if ($reg.group eq '' and $smarty.foreach.group.last) or $reg.group eq $gr.group_id} checked="checked"{/if}>
+ {if $gr.is_default eq "y"}
+ {tr}None{/tr}
+ {elseif $gr.group_desc}
+ {$gr.group_desc}
+ {else}
+ {$gr.group_name}
+ {/if}
+ </input>
+ {if !$smarty.foreach.group.last}<br />{/if}
+ {/foreach}
+ {formhelp note="Choose the group you belong to."}
+ {/forminput}
+ {/if}
+
<div class="row submit">
<input type="submit" name="register" value="{tr}Register{/tr}" />
</div>