rt# 74031 Implement forms for editing real estate inventory
[freeside.git] / httemplate / edit / realestate_unit.html
1 <% include( 'elements/edit.html',
2  'name_singular' => 'Real Estate Unit',
3  'table'  => 'realestate_unit',
4
5  'labels' => {
6     realestatenum  => 'Ref No',
7     unit_title => 'Unit Title',
8     agentnum => 'Agent',
9     realestatelocnum => 'Location',
10   },
11   'fields' => [
12     { field => 'realestatenum', type => 'hidden' },
13     { field => 'custnum', type => 'hidden' },
14
15     { field => 'unit_title',
16       type=>'text',
17       size => 40,
18     },
19     { field => 'realestatelocnum',
20       type => 'select-realestate_location',
21
22       # possible todo:
23       # I'd like to have this field disabled for editing on existing records,
24       # and only show the full selectbox for new records.
25
26     },
27     { field => 'agentnum',
28       type => 'select-agent',
29     },
30     { field => 'disabled',
31       type=>'checkbox',
32       value=>'Y'
33     },
34   ],
35
36  'viewall_dir' => 'browse',
37  'agent_virt' => 1,
38 )
39 %>
40
41 <%init>
42
43 my $curuser = $FS::CurrentUser::CurrentUser;
44 die("access denied")
45   unless $curuser->access_right('Edit inventory')
46       || $curuser->access_right('Edit global inventory')
47       || $curuser->access_right('Configuration');
48
49 </%init>