Changeset 118


Ignore:
Timestamp:
05/17/09 15:19:38 (15 years ago)
Author:
nanardon
Message:
  • address form
Location:
LATMOS-Accounts-Web
Files:
3 edited

Legend:

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

    r117 r118  
    3434    $c->stash->{username} = $username; 
    3535    $c->stash->{user} = $base->get_object('user', $username); 
    36     $c->stash->{form} = $subform || ''; 
     36    $c->stash->{subform} = $subform; 
    3737 
    38     if ($c->stash->{user}) { 
    39         $c->model('AttrForms', 'user' . $c->stash->{form}, $c->stash->{user})->set_attrs; 
     38    for ($subform) { 
     39        # Exceptions... 
     40        # /^$/ $c->stash->{template} =  
     41 
     42        $c->stash->{form} = $c->model('AttrForms', 'user' . $c->stash->{subform}, $c->stash->{user}); 
     43        $c->stash->{form}->set_attrs; 
    4044    } 
    41  
    4245} 
    4346 
  • LATMOS-Accounts-Web/root/html/includes/form.tt

    r117 r118  
    11<!-- $Id$ --> 
    2 [% form = c.model('AttrForms', form_name, form_object) %] 
    32[% FOREACH attr =  form.attributes %] 
    43[% IF loop.first %] 
  • LATMOS-Accounts-Web/root/html/users/default.tt

    r117 r118  
    44[% ELSE %] 
    55     
    6 <div> 
    7     <img src="[% c.uri_for('/static', 'icons', 'user-properties.png') %]" 
    8     alt="[% "User " _ username %]" style="float: left"> 
    9     [% username | html %]<br> 
    10     [% user.get_c_field('sn') | html %] 
    11     [% user.get_c_field('givenName') | html %]  
    12     <div style="clear: both"></div> 
    13 </div> 
     6<div class=objectform> 
     7[% INCLUDE 'users/user_menu.tt' %] 
    148 
    159[% INCLUDE 'includes/form.tt' 
    16     form_object = user 
    17     form_uri = c.uri_for(username, form) 
    18     form_name = 'user' _ form %] 
     10    form = form 
     11    form_uri = c.uri_for(username, subform) %] 
    1912[% END %] 
     13</div> 
Note: See TracChangeset for help on using the changeset viewer.