Revision 322

Date:
2013/04/28 20:22:40
Author:
ahitrov
Revision Log:
Очистка дат
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/comps/contenido/components/inputs/date.msn

     
    13 13 my $months = $m->comp('/contenido/components/get_months.msn');
    14 14 my @years = map { $_ => $_ } (1940 .. $localtime[5] + 5);
    15 15
    16 if ($prop->{allow_null}) {
    16 if ( ref $prop && exists $prop->{attr} && $prop->{allow_null}) {
    17 17 unshift @days, '', '';
    18 18 unshift @$months, '', '';
    19 19 unshift @years, '', '';
     
    45 45 }
    46 46 //-->
    47 47 </script>
    48 % if ( $prop->{allow_null} ) {
    49 &nbsp; <span style="padding-left:20px;"><a href="javascript:void(0)" onclick="set_<% $prop->{attr} %>_clear()" style="color:red;">Очистить!</a></span>
    50 <script type="text/javascript">
    51 <!--
    52 function set_<% $prop->{attr} %>_clear () {
    53 document.forms['form'].elements['<% $prop->{attr} %>_day'].value = '';
    54 document.forms['form'].elements['<% $prop->{attr} %>_month'].value = '';
    55 document.forms['form'].elements['<% $prop->{attr} %>_year'].value = '';
    56 }
    57 //-->
    58 </script>
    59 % }
    48 60 % }