groups_managesubgroups.smarty 3.39 KB
<h2>{i18n arg_name=$edit_group->getName()}Manage Sub-Groups in #name#{/i18n}</h2>

{$context->oPage->requireJSResource('thirdpartyjs/OptionTransfer.js')}
{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Base.js')}
{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/Iter.js')}
{$context->oPage->requireJSResource('thirdpartyjs/MochiKit/DOM.js')}

<p class="descriptiveText">{i18n}Groups may contain other groups, allowing for a convenient way to build tree's of users and efficiently assign security privileges.{/i18n}</p>

<form action="{$smarty.server.PHP_SELF}" method="POST" id="usergroupform">
   <input type="hidden" name="action" value="updateGroupMembers" />
   <input type="hidden" name="group_id" value="{$edit_group->getId()}" />
   <!-- erk. FIXME clean up and remove OptionTransfer.js. -->
   
   <input type="hidden" name="groupAdded" />
   <input type="hidden" name="groupRemoved" />
   
   
   <fieldset>
      <legend>{i18n arg_name=$edit_group->getName()}Change Sub-Groups in #name#{/i18n}</legend>
      <p class="descriptiveText">{i18n}Select the groups from the left-hand list that you would like to add to this group and then click the <strong>right pointing arrows</strong>. Once you have added all the groups that you require, press <strong>save changes</strong>. Only groups that are logically capable of being included in this group will be available to be added.{/i18n}</p>

<table border="0" width="600">
   <thead>
      <tr>
         <th>{i18n}Available Groups{/i18n}</th>
         <th>&nbsp;</th>
         <th>{i18n}Assigned Groups{/i18n}</th>
      </tr>
   </thead>
   <tbody>
      <tr>
         <td valign="top" width="1%">
           <select name="groupSelect" size="10" multiple="multiple">
               {foreach item=oGroup from=$unused_groups}
               <option value="{$oGroup->getId()}" ondblclick="optGroup.transferRight()">{$oGroup->getName()}</option>
               {/foreach}
           </select>
         </td>
         <td align="center">
            <input name="right" style="width: 60px;" value="&raquo;" onclick="optGroup.transferRight()" type="button"><br /><br />
            <input name="left" style="width: 60px;" value="&laquo;" onclick="optGroup.transferLeft()" type="button">
         </td>
         <td valign="top" width="1%">
            <select name="chosenGroups" size="10" multiple="multiple">
               {foreach item=oGroup from=$group_members}
               <option value="{$oGroup->getId()}" ondblclick="optGroup.transferRight()">{$oGroup->getName()}</option>
               {/foreach}
               
            </select>
         </td>
      </tr>
      <tr>
         <td><label for="ug-filter">{i18n}Filter{/i18n}</label>
            <input name="filterUG" id="ug-filter" onkeyup="optGroup.sortSelectMatch(groupSelect, this.value)" onchange="optGroup.sortSelectMatch(groupSelect, this.value)" type="text">
         </td>
         <td>&nbsp;</td>
         <td><label for="og-filter">{i18n}Filter{/i18n}</label>
            <input name="filterOG" id="og-filter" onkeyup="optGroup.sortSelectMatch(chosenGroups, this.value)" onchange="optGroup.sortSelectMatch(chosenGroups, this.value)" type="text">
         </td>
      </tr>
</tbody></table>

      <div class="form_actions">
         <input type="submit" value="{i18n}save changes{/i18n}" />
         <a href="{addQS}action=main{/addQS}" class="ktCancelLink">{i18n}Cancel{/i18n}</a>
      </div>
   </fieldset>
   </form>