Changeset 2890 for alternc/trunk/bureau/admin/trash_dateselect.php
- Timestamp:
- 03/27/11 15:00:19 (2 years ago)
- File:
-
- 1 edited
-
alternc/trunk/bureau/admin/trash_dateselect.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
alternc/trunk/bureau/admin/trash_dateselect.php
r2842 r2890 29 29 */ 30 30 require_once("../class/config.php"); 31 32 $istrash=false; 33 if (! is_null($res['trash_info']) && $res['trash_info']->is_trash ) { 34 $istrash=true; 35 } 31 36 ?> 37 38 <p> 39 <input type="radio" name="istrash" id="istrash0" class="inc" value="0"<?php cbox(!$istrash); ?> onclick="hide('trash_expire_picker');"><label for="istrash0"><?php __("No"); ?></label> 40 <input type="radio" name="istrash" id="istrash1" class="inc" value="1"<?php cbox($istrash); ?> onclick="show('trash_expire_picker');"><label for="istrash1"><?php __("Yes"); ?></label> 41 </p> 32 42 33 43 <div id="trash_expire_picker"> 34 44 <table> 35 45 <tbody> 36 <tr>37 <td>38 <input type="radio" name="trash_type_expiration" value="no_exp" id="no_exp" checked="checked" onclick="trash_exp_none();">39 </td><td>40 <label for="no_exp"><?php echo __("No auto-deletion date"); ?></label>41 </td>42 </tr>43 46 <tr> 44 47 <td valign="top"> … … 58 61 </td> 59 62 </tr><tr> 60 <td valign= top>61 <input type="radio" name="trash_type_expiration" value="trash_at_x" id="trash_at_x" onclick="trash_exp_at_activate();">63 <td valign="top"> 64 <input type="radio" name="trash_type_expiration" value="trash_at_x" id="trash_at_x" checked="checked" onclick="trash_exp_at_activate();"> 62 65 </td><td> 63 66 <label for="trash_at_x"><?php __('Delete this email the following day,<br/>enter the date using DD/MM/YYYY format');?></label><br/> 64 <input id="trash_datepicker" name="trash_datepicker" type="text" size="10" value="<?php echo strftime("%d/%m/%Y",mktime() + (3600*24*7));?>" /> 67 <input id="trash_datepicker" name="trash_datepicker" type="text" size="10" value="<?php 68 if ($istrash) { 69 echo $res['trash_info']->human_display(); 70 } else { 71 echo strftime("%d/%m/%Y",mktime() + (3600*24*7)); 72 } 73 ?>" /> 65 74 </td> 66 75 </tr> 67 76 </tbody> 68 77 </table> 78 <br /> 79 <span style="color: red;"><?php __("All this account information will be deleted at expiration");?></span> 80 69 81 </div> 70 82 … … 73 85 $("#trash_datepicker").datepicker({ minDate: '+1d'}); // We can't give an anterior date 74 86 $("#trash_datepicker").datepicker( "option", "dateFormat", "dd/mm/yy" ); // format of the date 75 $("#trash_datepicker").datepicker( "option", "defaultDate", "+7d" ); // format of the date 76 // I let Vinci make de translation wrapper for jquery and jquery_ui, he have a better view than me 77 trash_exp_none(); 87 // FIXME : I let Benjamin make de translation wrapper for jquery and jquery_ui, he have a better view than me 88 trash_exp_at_activate(); 78 89 }); 79 90 80 function trash_exp_none() {81 $('#trash_datepicker').attr('disabled', 'disabled');82 $('#trash_exp_in_value').attr('disabled', true);83 $('#trash_exp_in_unit').attr('disabled', true);84 }85 86 91 function trash_exp_at_activate() { 87 92 $('#trash_datepicker').removeAttr('disabled'); … … 95 100 } 96 101 102 <?php if (!$istrash) { ?> 103 hide('trash_expire_picker'); 104 <?php } ?> 105 97 106 </script> 98 107
Note: See TracChangeset
for help on using the changeset viewer.
