Changeset 160


Ignore:
Timestamp:
05/22/09 17:41:54 (15 years ago)
Author:
nanardon
Message:
  • manage date field, add expire field in user form
Location:
LATMOS-Accounts-Web
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller.pm

    r104 r160  
    3232=cut  
    3333 
    34 sub end : ActionClass('RenderView') {} 
     34sub end : ActionClass('RenderView') { 
     35    my ($self, $c) = @_; 
     36    $c->model('Accounts')->db->rollback; 
     37} 
    3538 
    3639=head1 AUTHOR 
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm

    r151 r160  
    3535    st => [ 'Etat' ], 
    3636    title => [ 'Fonction' ], 
     37    expire => [ 'Expire le', 'date' ], 
     38    st => [ 'État (US)' ] 
    3739}; 
    3840 
     
    5860            postalCode 
    5961            l 
     62            st 
    6063            physicalDeliveryOfficeName 
    6164        ) ], 
     
    6871            department 
    6972            title 
     73            expire 
    7074        ) ], 
    7175    }, 
     
    7781            postOfficeBox 
    7882            postalCode 
     83            st 
    7984            l 
    8085        ) ], 
     
    180185            $self->attr_raw_value($attr) 
    181186        ); 
     187        /^date$/ and do { 
     188            my ($date, $time) = split(/ /, $self->attr_raw_value($attr)); 
     189            if ($date =~ /^(\d+)-(\d+)-(\d+)$/) { 
     190                $date = "$3/$2/$1"; 
     191            } 
     192            my $html = "\n" . q{<SCRIPT LANGUAGE="JavaScript" ID="js13"> 
     193            var cal13 = new CalendarPopup(); 
     194            </SCRIPT>} . "\n"; 
     195            $html .= sprintf( 
     196                '<input type="text" name="%s" value="%s">', 
     197                $attr, 
     198                $self->escape($date) 
     199            ); 
     200            $html .= q{<DIV ID="testdiv1" STYLE="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;"></DIV>}; 
     201            $html .= qq{ 
     202            <A HREF="#" 
     203                onClick="cal13.select(document.forms[0].$attr,'anchor13','dd/MM/yyyy');return false;" 
     204                TITLE="cal13.select(document.forms[0].$attr,'anchor13','dd/MM/yyyy'); return false;" 
     205                NAME="anchor13" ID="anchor13"> 
     206                <img src="} . $self->{c}->uri_for(qw(/static icons view-calendar-day.png)) 
     207                . qq{" style="ref"></A>} . "\n"; 
     208            return $html; 
     209        }; 
    182210        /^select(-\w+)?:([^:]+)(?::(.*))?$/ and do { 
    183211            my $options = $1 || ''; 
  • LATMOS-Accounts-Web/root/html/includes/header.tt

    r151 r160  
    77<link rel="icon" href="[%- c.uri_for('/static', 'images', 'favicon.ico') -%]" type="image/x-icon"> 
    88 
    9 <!-- 
    109<script language="JavaScript" src="[% c.uri_for('/static', 'js', 'CalendarPopup.js') %]"></SCRIPT> 
    11 --> 
    1210 
    1311</head> 
  • LATMOS-Accounts-Web/root/static/style.css

    r123 r160  
    11img { 
    22    border: none; 
     3    vertical-align: middle; 
    34} 
    45 
Note: See TracChangeset for help on using the changeset viewer.