Ignore:
Timestamp:
Nov 16, 2009, 1:26:06 AM (15 years ago)
Author:
LucMorizur
Message:

[Event Cats] Duplication management, add table and begin $_POST analysis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/template/duplication.tpl

    r4263 r4276  
    1212
    1313{* <!-- Duplication configuration parameters --> *}
    14 <form class = "titrePage" name = "ec_duplic_conf">
     14<form action = "" method = "post" class = "titrePage" name = "ec_duplic_conf">
    1515  <fieldset>
    1616    <legend>{'ec_duplication_config'|@translate}</legend>
     
    2222        <td>
    2323          <label for = "ec_dup_conf_none_id">
    24             <input type = "radio" name = "ec_dup_conf" id = "ec_dup_conf_none_id" />
     24            <input type = "radio" name = "ec_dup_conf[]" value = "none" id = "ec_dup_conf_none_id" />
    2525            {'ec_dup_allowance_none'|@translate}
    2626          </label><br>
    2727          <label for = "ec_dup_conf_group_id">
    28             <input type = "radio" name = "ec_dup_conf" id = "ec_dup_conf_group_id" />
     28            <input type = "radio" name = "ec_dup_conf[]" value = "group" id = "ec_dup_conf_group_id" />
    2929            {'ec_dup_allowance_group'|@translate}
    30           </label><br> {* <!--
    31           <label for = "ec_dup_conf_gen_id">
    32             <input type = "radio" name = "ec_dup_conf" id = "ec_dup_conf_gen_id" />
    33             {'ec_dup_allowance_gen'|@translate}
    34           </label><br> --> *}
     30          </label><br>
    3531          <label for = "ec_dup_conf_all_id">
    36             <input type = "radio" name = "ec_dup_conf" id = "ec_dup_conf_all_id" />
     32            <input type = "radio" name = "ec_dup_conf[]" value = "all" id = "ec_dup_conf_all_id" />
    3733            {'ec_dup_allowance_all'|@translate}
    3834          </label>
     
    4642{* <!-- Duplication settings by groups / types / user ids --> *}
    4743<form action = "" method = "post" name = "ec_duplic_set" id="categoryPermissions">
    48 
     44 
    4945  <h4>{'Groups'|@translate}</h4>
    50 
     46 
    5147  <fieldset>
    5248    <legend>{'ec_duplic_ok'|@translate}</legend>
    5349    <ul>
    54       {foreach from=$group_granted_ids item=id}
     50      {foreach from=$groups_granted_ids item=id}
    5551      <li><label><input type = "checkbox" name = "deny_groups[]" value = "{$id}" /> {$all_groups[$id]}</label></li>
    5652      {/foreach}
     
    5854    <input class = "submit" type = "submit" name = "deny_groups_submit" value = "{'ec_dup_grp_ok_sbmt_lbl'|@translate}" />
    5955  </fieldset>
    60 
     56 
    6157  <fieldset>
    6258    <legend>{'ec_duplic_nok'|@translate}</legend>
    6359    <ul>
    64       {foreach from=$group_denied_ids item=id}
     60      {foreach from=$groups_denied_ids item=id}
    6561      <li><label><input type = "checkbox" name = "grant_groups[]" value = "{$id}"> {$all_groups[$id]}</label></li>
    6662      {/foreach}
     
    6864    <input class = "submit" type = "submit" name = "grant_groups_submit" value = "{'ec_dup_grp_nok_sbmt_lbl'|@translate}" />
    6965  </fieldset>
    70 
     66 
    7167  <h4>{'ec_dup_types'|@translate}</h4>
    72 
     68 
    7369  <fieldset>
    7470    <legend>{'ec_duplic_ok'|@translate}</legend>
    7571    <ul>
    76       <li><label><input type = "checkbox" name = "ec_dup_types_generic_ok" value = "ec_dup_types_generic_ok_id" /> {'user_status_generic'|@translate}</label></li>
     72      {if $ec_gen_granted}
     73      <li><label><input type = "checkbox" name = "deny_generic" {* id = "ec_dup_types_generic_nok_id" *} /> {'user_status_generic'|@translate}</label></li>
    7774      <br />
    78       <li><label><input type = "checkbox" name = "ec_dup_types_contacts_ok" value = "ec_dup_types_contacts_ok_id" /> {'Level 1'|@translate}</label></li>
    79       <li><label><input type = "checkbox" name = "ec_dup_types_friends_ok" value = "ec_dup_types_friends_ok_id" /> {'Level 2'|@translate}</label></li>
    80       <li><label><input type = "checkbox" name = "ec_dup_types_family_ok" value = "ec_dup_types_family_ok_id" /> {'Level 4'|@translate}</label></li>
     75      {/if}
     76      {foreach from=$types_granted_ids item=id}
     77        <li><label><input type = "checkbox" name = "deny_types[]" value = "{$id}" /> {$all_types[$id]}</label></li>
     78      {/foreach}
    8179    </ul>
    82     <input class = "submit" type = "submit" name = "deny_users_submit" value = "{'ec_dup_typ_sbmt_lbl'|@translate}" />
     80    <input class = "submit" type = "submit" name = "deny_types_submit" value = "{'ec_dup_typ_sbmt_nok_lbl'|@translate}" />
    8381  </fieldset>
    84 
     82 
     83  <fieldset>
     84    <legend>{'ec_duplic_nok'|@translate}</legend>
     85    <ul>
     86      {if !$ec_gen_granted}
     87      <li><label><input type = "checkbox" name = "grant_generic" {* id = "ec_dup_types_generic_ok_id" *} /> {'user_status_generic'|@translate}</label></li>
     88      <br />
     89      {/if}
     90      {foreach from=$types_denied_ids item=id}
     91        <li><label><input type = "checkbox" name = "grant_types[]" value = "{$id}" /> {$all_types[$id]}</label></li>
     92      {/foreach}
     93    </ul>
     94    <input class = "submit" type = "submit" name = "grant_types_submit" value = "{'ec_dup_typ_sbmt_ok_lbl'|@translate}" />
     95  </fieldset>
     96 
    8597  <h4>{'Users'|@translate}</h4>
    86 
     98 
    8799  <fieldset>
    88100    <legend>{'ec_duplic_ok'|@translate}</legend>
    89101    <ul>
    90       {foreach from=$user_granted_direct_ids item=id}
     102      {foreach from=$users_granted_direct_ids item=id}
    91103      <li><label><input type = "checkbox" name = "deny_users[]" value = "{$id}" /> {$all_users[$id]}</label></li>
    92104      {/foreach}
     
    94106    <input class = "submit" type = "submit" name = "deny_users_submit" value = "{'ec_dup_usr_ok_sbmt_lbl'|@translate}" />
    95107  </fieldset>
    96 
     108 
    97109  <fieldset>
    98110    <legend>{'ec_duplic_ok_groups'|@translate}</legend>
     
    105117    {/if}
    106118  </fieldset>
    107 
     119 
    108120  <fieldset>
    109121    <legend>{'ec_duplic_nok'|@translate}</legend>
    110122    <ul>
    111       {foreach from=$user_denied_ids item=id}
     123      {foreach from=$users_denied_ids item=id}
    112124      <li><label><input type = "checkbox" name = "grant_users[]" value = "{$id}"> {$all_users[$id]}</label></li>
    113125      {/foreach}
     
    115127    <input class = "submit" type = "submit" name = "grant_users_submit" value = "{'ec_dup_usr_nok_sbmt_lbl'|@translate}" />
    116128  </fieldset>
    117 
     129 
    118130</form>
    119131
Note: See TracChangeset for help on using the changeset viewer.