Ignore:
Timestamp:
03/27/11 15:00:19 (3 years ago)
Author:
benjamin
Message:

mise en forme bien meilleure du systeme de mail temporaire. Remplacement par un radio 'est-ce un email temporaire' OUI/NON

File:
1 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/admin/trash_dateselect.php

    r2842 r2890  
    2929*/ 
    3030require_once("../class/config.php"); 
     31 
     32$istrash=false; 
     33if (! is_null($res['trash_info']) && $res['trash_info']->is_trash ) { 
     34  $istrash=true; 
     35} 
    3136?> 
     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> 
    3242 
    3343<div id="trash_expire_picker"> 
    3444    <table> 
    3545        <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> 
    4346            <tr> 
    4447                <td valign="top"> 
     
    5861                </td> 
    5962            </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();">  
    6265                </td><td> 
    6366                    <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  
     68if ($istrash) { 
     69  echo $res['trash_info']->human_display(); 
     70} else { 
     71  echo strftime("%d/%m/%Y",mktime() + (3600*24*7)); 
     72} 
     73?>" /> 
    6574                </td> 
    6675            </tr> 
    6776        </tbody> 
    6877    </table> 
     78<br /> 
     79   <span style="color: red;"><?php __("All this account information will be deleted at expiration");?></span> 
     80 
    6981</div> 
    7082 
     
    7385        $("#trash_datepicker").datepicker({ minDate: '+1d'}); // We can't give an anterior date 
    7486        $("#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(); 
    7889    }); 
    7990     
    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  
    8691    function trash_exp_at_activate() { 
    8792        $('#trash_datepicker').removeAttr('disabled'); 
     
    95100    } 
    96101 
     102<?php if (!$istrash) { ?> 
     103  hide('trash_expire_picker');  
     104  <?php } ?> 
     105 
    97106</script> 
    98107 
Note: See TracChangeset for help on using the changeset viewer.