Changeset 372


Ignore:
Timestamp:
08/18/09 19:55:47 (15 years ago)
Author:
nanardon
Message:
  • add create address form (no action at time, code will come)
Location:
LATMOS-Accounts-Web
Files:
1 added
3 edited

Legend:

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

    r368 r372  
    8787                $c->stash->{form}->set_attrs; 
    8888            } else { 
     89                $c->stash->{form} = $c->model('AttrForms', 'address', 'address', 
     90                    $base); 
    8991                $c->stash->{template} = 'users/addresses.tt'; 
    9092            } 
  • LATMOS-Accounts-Web/root/html/users/address.tt

    r364 r372  
    99<div id="oform"> 
    1010<form action="[% c.uri_for(username, subform, address.id) %]" method="POST"> 
    11 <table border="1"> 
    12 <tr> 
    13     <th>[% form.attr_label('site') %]</th> 
    14     <td>[% form.attr_field('site') %]</td> 
    15 </tr> 
    16 <tr> 
    17     <th>[% form.attr_label('description') %]</th> 
    18     <td>[% form.attr_field('description') %]</td> 
    19 </tr> 
    20 <tr> 
    21     <th>[% form.attr_label('isMainAddress') %]</th> 
    22     <td>[% form.attr_field('isMainAddress') %]</td> 
    23 </tr> 
    24 [% IF address.get_c_field('site') %] 
    25 [% fieldtype = 'label' %] 
    26 [% END %] 
    27 <tr> 
    28     <tr><th>[% form.attr_label('streetAddress') %]</th> 
    29     <td>[% form.attr_field('streetAddress', fieldtype) %]</td> 
    30 </tr> 
    31 <tr> 
    32     <tr><th>[% form.attr_label('postOfficeBox') %]</th> 
    33     <td>[% form.attr_field('postOfficeBox', fieldtype) %]</td> 
    34 </tr> 
    35 <tr> 
    36     <tr><th>[% form.attr_label('postalCode') %]</th> 
    37     <td>[% form.attr_field('postalCode', fieldtype) %]</td> 
    38 </tr> 
    39 <tr> 
    40     <tr><th>[% form.attr_label('l') %]</th> 
    41     <td>[% form.attr_field('l', fieldtype) %]</td> 
    42 </tr> 
    43 <tr> 
    44     <tr><th>[% form.attr_label('st') %]</th> 
    45     <td>[% form.attr_field('st', fieldtype) %]</td> 
    46 </tr> 
    47 <tr> 
    48     <tr><th>[% form.attr_label('co') %]</th> 
    49     <td>[% form.attr_field('co', fieldtype) %]</td> 
    50 </tr> 
    51 <tr> 
    52     <th>[% form.attr_label('physicalDeliveryOfficeName') %]</th> 
    53     <td>[% form.attr_field('physicalDeliveryOfficeName') %]</td> 
    54 </tr> 
    55 <tr> 
    56     <th>[% form.attr_label('telephoneNumber') %]</th> 
    57     <td>[% form.attr_field('telephoneNumber') %]</td> 
    58 </tr> 
    59 <tr> 
    60     <th></th> 
    61     <td>[% form.submit %]</td> 
    62 </tr> 
    63 </table> 
     11[% INCLUDE 'users/address_form.tt' %] 
    6412</form> 
    6513</div> 
  • LATMOS-Accounts-Web/root/html/users/addresses.tt

    r364 r372  
    1111<table border="1"> 
    1212[% FOREACH idaddress = user.get_c_field('otheraddress') %] 
    13 [% address = c.model('Accounts').db.get_object('address', idaddress) %] 
     13[% laddress = c.model('Accounts').db.get_object('address', idaddress) %] 
    1414<tr> 
    15     <td>[% IF address.get_c_field('isMainAddress') %]Main[% END %]</td> 
     15    <td>[% IF laddress.get_c_field('isMainAddress') %]Main[% END %]</td> 
    1616    <th><a href="[% c.uri_for(username, subform, idaddress) %]"> 
    17         [% address.get_c_field('l') || idaddress | html %] 
     17        [% laddress.get_c_field('l') || idaddress | html %] 
    1818    </a></th> 
    1919</tr> 
     
    2121</table> 
    2222</form> 
     23 
     24<form action="[% c.uri_for(username, subform) %]" method="POST"> 
     25[% INCLUDE 'users/address_form.tt' %] 
     26</form> 
     27 
    2328</div> 
    2429</div> 
Note: See TracChangeset for help on using the changeset viewer.