| 1 | {include file='include/autosize.inc.tpl'} |
|---|
| 2 | {include file='include/datepicker.inc.tpl'} |
|---|
| 3 | |
|---|
| 4 | {literal} |
|---|
| 5 | <script type="text/javascript"> |
|---|
| 6 | pwg_initialization_datepicker("#start_day", "#start_month", "#start_year", "#start_linked_date", null, null, null); |
|---|
| 7 | pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, null, null); |
|---|
| 8 | </script> |
|---|
| 9 | {/literal} |
|---|
| 10 | |
|---|
| 11 | <div class="titrePage"> |
|---|
| 12 | <h2>Concours</h2> |
|---|
| 13 | </div> |
|---|
| 14 | |
|---|
| 15 | <form method="post" action="" class="properties" ENCTYPE="multipart/form-data"> |
|---|
| 16 | |
|---|
| 17 | <fieldset> |
|---|
| 18 | <legend>{'concours_add'|@translate}</legend> |
|---|
| 19 | <table> |
|---|
| 20 | |
|---|
| 21 | <tr><td colspan="4"><br></td></tr> |
|---|
| 22 | |
|---|
| 23 | <tr> |
|---|
| 24 | <td><b>{'concours_id'|@translate} </b></td> |
|---|
| 25 | <td colspan="3">{$CONCOURS.ID}</td> |
|---|
| 26 | </tr> |
|---|
| 27 | {if (isset($action) && ($action == 'modify_crit' || $action == 'edit'))} |
|---|
| 28 | <tr> |
|---|
| 29 | <td><b>{'concours_name'|@translate} </b></td> |
|---|
| 30 | <td colspan="3">{$CONCOURS.NAME}</td> |
|---|
| 31 | </tr> |
|---|
| 32 | |
|---|
| 33 | <tr> |
|---|
| 34 | <td><b>{'concours_descr'|@translate} </b></td> |
|---|
| 35 | <td colspan="3">{$CONCOURS.DESCR}</td> |
|---|
| 36 | </tr> |
|---|
| 37 | |
|---|
| 38 | <tr> |
|---|
| 39 | <td> |
|---|
| 40 | <b>{'concours_date_from'|@translate}</b> |
|---|
| 41 | </td> |
|---|
| 42 | <td colspan="3"> |
|---|
| 43 | <b>{$START_DAY_SELECTED} / {$START_MONTH_SELECTED} / {$START_YEAR} - {$START_HOUR} : {$START_MIN}</b> |
|---|
| 44 | </td> |
|---|
| 45 | </tr> |
|---|
| 46 | <tr> |
|---|
| 47 | <td> |
|---|
| 48 | <b>{'concours_date_end'|@translate}</b> |
|---|
| 49 | </td> |
|---|
| 50 | <td colspan="3"> |
|---|
| 51 | <b>{$END_DAY_SELECTED} / {$END_MONTH_SELECTED} / {$END_YEAR} - {$END_HOUR} : {$END_MIN}</b> |
|---|
| 52 | </td> |
|---|
| 53 | </tr> |
|---|
| 54 | <tr> |
|---|
| 55 | <td><b>{'concours_method'|@translate} </b></td> |
|---|
| 56 | <td colspan = "3"> |
|---|
| 57 | <select name="concours_method" {if !isset($result_not_generated)}disabled="disabled"{/if}> |
|---|
| 58 | {foreach from=$concours_method item=concours_method} |
|---|
| 59 | <option value="{$concours_method.ID}" {$concours_method.SELECTED}>{$concours_method.NAME}</option> |
|---|
| 60 | {/foreach} |
|---|
| 61 | </select> |
|---|
| 62 | </td> |
|---|
| 63 | |
|---|
| 64 | </tr> |
|---|
| 65 | |
|---|
| 66 | <tr> |
|---|
| 67 | <td colspan="4"> |
|---|
| 68 | <b>{'concours_category_select'|@translate}</b> |
|---|
| 69 | <select name="cat_selection" disabled="disabled"> |
|---|
| 70 | {foreach from=$category_selection item=category_selection} |
|---|
| 71 | <option value="{$category_selection.ID}" {$category_selection.SELECTED}>{$category_selection.NAME}</option> |
|---|
| 72 | {/foreach} |
|---|
| 73 | </select> |
|---|
| 74 | </td> |
|---|
| 75 | </tr> |
|---|
| 76 | {else} |
|---|
| 77 | <tr> |
|---|
| 78 | <td><b>{'concours_name'|@translate} </b></td> |
|---|
| 79 | <td colspan="3"><input type="text" size="50" maxlength="50" value="{$CONCOURS.NAME}" name="concours_name"/></td> |
|---|
| 80 | </tr> |
|---|
| 81 | |
|---|
| 82 | <tr><td colspan="4"><br></td></tr> |
|---|
| 83 | |
|---|
| 84 | <tr> |
|---|
| 85 | <td><b>{'concours_descr'|@translate} </b></td> |
|---|
| 86 | <td colspan="3"><input type="text" size="65" maxlength="255" value="{$CONCOURS.DESCR}" name="concours_descr"/></td> |
|---|
| 87 | </tr> |
|---|
| 88 | |
|---|
| 89 | <tr><td colspan="4"><br></td></tr> |
|---|
| 90 | |
|---|
| 91 | {if isset($group_perm)} |
|---|
| 92 | <tr><td colspan="4"><br></td></tr> |
|---|
| 93 | <tr> |
|---|
| 94 | <td><b>{'concours_authorized_group'|@translate} </b></td> |
|---|
| 95 | <td colspan="3">{$group_perm.GROUPSELECTION}</td> |
|---|
| 96 | </tr> |
|---|
| 97 | {/if} |
|---|
| 98 | <TR> |
|---|
| 99 | <TD colspan="4"> |
|---|
| 100 | <input type="checkbox" name="guest" {$CONCOURS.GUEST}/> {'concours_allow_guest'|@translate} |
|---|
| 101 | <br/> |
|---|
| 102 | </TD> |
|---|
| 103 | </TR> |
|---|
| 104 | |
|---|
| 105 | <tr><td colspan="4"><br></td></tr> |
|---|
| 106 | <tr> |
|---|
| 107 | <td colspan="4"><b><i><u>{'concours_activation_date'|@translate}</u></i></b></td> |
|---|
| 108 | </tr> |
|---|
| 109 | |
|---|
| 110 | <tr> |
|---|
| 111 | <td> |
|---|
| 112 | <b>{'concours_date_from'|@translate}</b> |
|---|
| 113 | </td> |
|---|
| 114 | <td> |
|---|
| 115 | <select id="start_day" name="start_day"> |
|---|
| 116 | <option value="0">--</option> |
|---|
| 117 | {section name=day start=1 loop=32} |
|---|
| 118 | <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option> |
|---|
| 119 | {/section} |
|---|
| 120 | </select> |
|---|
| 121 | <select id="start_month" name="start_month"> |
|---|
| 122 | {html_options options=$month_list selected=$START_MONTH_SELECTED} |
|---|
| 123 | </select> |
|---|
| 124 | <input id="start_year" name="start_year" value="{$START_YEAR}" type="text" size="4" maxlength="4" > |
|---|
| 125 | <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled"/> |
|---|
| 126 | </td> |
|---|
| 127 | <td align="right"> |
|---|
| 128 | <b>{'concours_hour_from'|@translate}</b> |
|---|
| 129 | </td> |
|---|
| 130 | <td> |
|---|
| 131 | <select id="start_hour" name="start_hour"> |
|---|
| 132 | {section name=hour start=0 loop=24} |
|---|
| 133 | <option value="{$smarty.section.hour.index}" {if $smarty.section.hour.index==$START_HOUR}selected="selected"{/if}>{$smarty.section.hour.index}</option> |
|---|
| 134 | {/section} |
|---|
| 135 | </select> |
|---|
| 136 | <select id="start_min" name="start_min"> |
|---|
| 137 | {section name=min start=0 loop=60} |
|---|
| 138 | <option value="{$smarty.section.min.index}" {if $smarty.section.min.index==$START_MIN}selected="selected"{/if}>{$smarty.section.min.index}</option> |
|---|
| 139 | {/section} |
|---|
| 140 | </select> |
|---|
| 141 | </td> |
|---|
| 142 | </tr> |
|---|
| 143 | <tr> |
|---|
| 144 | <td> |
|---|
| 145 | <b>{'concours_date_end'|@translate}</b></li> |
|---|
| 146 | </td> |
|---|
| 147 | <td> |
|---|
| 148 | <select id="end_day" name="end_day"> |
|---|
| 149 | <option value="0">--</option> |
|---|
| 150 | {section name=day start=1 loop=32} |
|---|
| 151 | <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option> |
|---|
| 152 | {/section} |
|---|
| 153 | </select> |
|---|
| 154 | <select id="end_month" name="end_month"> |
|---|
| 155 | {html_options options=$month_list selected=$END_MONTH_SELECTED} |
|---|
| 156 | </select> |
|---|
| 157 | <input id="end_year" name="end_year" value="{$END_YEAR}" type="text" size="4" maxlength="4" > |
|---|
| 158 | <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled"/> |
|---|
| 159 | </td> |
|---|
| 160 | <td align="right"> |
|---|
| 161 | <b>{'concours_hour_to'|@translate}</b> |
|---|
| 162 | </td> |
|---|
| 163 | <td> |
|---|
| 164 | <select id="end_hour" name="end_hour"> |
|---|
| 165 | {section name=hour start=0 loop=24} |
|---|
| 166 | <option value="{$smarty.section.hour.index}" {if $smarty.section.hour.index==$END_HOUR}selected="selected"{/if}>{$smarty.section.hour.index}</option> |
|---|
| 167 | {/section} |
|---|
| 168 | </select> |
|---|
| 169 | <select id="end_min" name="end_min"> |
|---|
| 170 | {section name=min start=0 loop=60} |
|---|
| 171 | <option value="{$smarty.section.min.index}" {if $smarty.section.min.index==$END_MIN}selected="selected"{/if}>{$smarty.section.min.index}</option> |
|---|
| 172 | {/section} |
|---|
| 173 | </select> |
|---|
| 174 | </td> |
|---|
| 175 | |
|---|
| 176 | </tr> |
|---|
| 177 | |
|---|
| 178 | <tr> |
|---|
| 179 | <td><b>{'concours_method'|@translate} </b></td> |
|---|
| 180 | <td colspan = "3"> |
|---|
| 181 | <select name="concours_method"> |
|---|
| 182 | {foreach from=$concours_method item=concours_method} |
|---|
| 183 | <option value="{$concours_method.ID}" {$concours_method.SELECTED}>{$concours_method.NAME}</option> |
|---|
| 184 | {/foreach} |
|---|
| 185 | </select> |
|---|
| 186 | </td> |
|---|
| 187 | |
|---|
| 188 | </tr> |
|---|
| 189 | <tr><td colspan="4"><br></td></tr> |
|---|
| 190 | |
|---|
| 191 | <tr> |
|---|
| 192 | <td colspan="4"> |
|---|
| 193 | <b>{'concours_category_select'|@translate}</b> |
|---|
| 194 | <select name="cat_selection"> |
|---|
| 195 | {foreach from=$category_selection item=category_selection} |
|---|
| 196 | <option value="{$category_selection.ID}" {$category_selection.SELECTED}>{$category_selection.NAME}</option> |
|---|
| 197 | {/foreach} |
|---|
| 198 | </select> |
|---|
| 199 | </td> |
|---|
| 200 | </tr> |
|---|
| 201 | {/if} |
|---|
| 202 | </table> |
|---|
| 203 | </fieldset> |
|---|
| 204 | {if (isset($action) && ($action == 'modify_crit' || $action == 'edit'))} |
|---|
| 205 | <fieldset> |
|---|
| 206 | <legend>{'concours_criterias'|@translate}</legend> |
|---|
| 207 | <table border="1"> |
|---|
| 208 | <tr> |
|---|
| 209 | <td><b>{'concours_id'|@translate}</b></td> |
|---|
| 210 | <td><b>{'concours_name'|@translate}</b></td> |
|---|
| 211 | <td width="50%"><b>{'concours_descr'|@translate}</b></td> |
|---|
| 212 | <td><b>{'concours_min_value'|@translate}</b></td> |
|---|
| 213 | <td><b>{'concours_max_value'|@translate}</b></td> |
|---|
| 214 | <td><b>{'concours_coef'|@translate}</b></td> |
|---|
| 215 | {if $action != 'edit'} |
|---|
| 216 | <td width="10%"><b>{'concours_actions'|@translate}</b></td> |
|---|
| 217 | {/if} |
|---|
| 218 | </tr> |
|---|
| 219 | {foreach from=$concours_criteria item=concours_criteria} |
|---|
| 220 | <tr> |
|---|
| 221 | <td>{$concours_criteria.id}</td> |
|---|
| 222 | <td> |
|---|
| 223 | {if $concours_criteria.level == 1} |
|---|
| 224 | <b>{$concours_criteria.name}</b> |
|---|
| 225 | {else} |
|---|
| 226 | <i>{$concours_criteria.name}</i> |
|---|
| 227 | {/if} |
|---|
| 228 | </td> |
|---|
| 229 | <td>{$concours_criteria.lib}</td> |
|---|
| 230 | {if !$concours_criteria.nosub} |
|---|
| 231 | <td colspan="3"> </td> |
|---|
| 232 | {else} |
|---|
| 233 | <td>{$concours_criteria.min}</td> |
|---|
| 234 | <td>{$concours_criteria.max}</td> |
|---|
| 235 | <td>{$concours_criteria.pond}</td> |
|---|
| 236 | {/if} |
|---|
| 237 | {if $action != 'edit'} |
|---|
| 238 | <td> |
|---|
| 239 | {if isset($concours_criteria.U_EDIT)} |
|---|
| 240 | <a href="{$concours_criteria.U_EDIT}" title="{'criteria_edit'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'criteria_edit'|@translate}"/></a> |
|---|
| 241 | |
|---|
| 242 | {/if} |
|---|
| 243 | {if isset($concours_criteria.U_DELETE)} |
|---|
| 244 | <a href="{$concours_criteria.U_DELETE}" title="{'criteria_delete'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/delete.png" class="button" alt="{'criteria_delete'|@translate}" /></a> |
|---|
| 245 | {/if} |
|---|
| 246 | {if $concours_criteria.level == 1} |
|---|
| 247 | <a href="{$concours_criteria.U_ADD}" title="{'subcriteria_add'|@translate}" ><img src="{$IMG_URL}add.png" class="button" alt="{'subcriteria_add'|@translate}" /></a> |
|---|
| 248 | {/if} |
|---|
| 249 | </td> |
|---|
| 250 | {/if} |
|---|
| 251 | </tr> |
|---|
| 252 | {/foreach} |
|---|
| 253 | </table> |
|---|
| 254 | {if $action != 'edit'} |
|---|
| 255 | <p><input type="submit" name="add" value="{'concours_add_criteria'|@translate}" /> |
|---|
| 256 | {/if} |
|---|
| 257 | |
|---|
| 258 | |
|---|
| 259 | </fieldset> |
|---|
| 260 | {/if} |
|---|
| 261 | <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /></p> |
|---|
| 262 | </form> |
|---|