summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorMitch Jackson <mitch@freeside.biz>2018-01-11 20:05:34 -0600
committerMitch Jackson <mitch@freeside.biz>2018-01-11 20:05:34 -0600
commit69e481a4a9191b9912d6bb8202627a5dc75f74ce (patch)
tree85604b29a5ce712824472778f488e69d0b0be1c5 /httemplate/edit
parent77daf007ef522ae71041d9b094643cf868d8ecce (diff)
rt# 74031 implement svc_realestate
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/process/realestate_location.html14
-rw-r--r--httemplate/edit/process/realestate_unit.html13
-rw-r--r--httemplate/edit/realestate_location.html72
-rw-r--r--httemplate/edit/realestate_unit.html48
4 files changed, 147 insertions, 0 deletions
diff --git a/httemplate/edit/process/realestate_location.html b/httemplate/edit/process/realestate_location.html
new file mode 100644
index 0000000..ab5cf23
--- /dev/null
+++ b/httemplate/edit/process/realestate_location.html
@@ -0,0 +1,14 @@
+<% include( 'elements/process.html',
+ table => 'realestate_location',
+ viewall_dir => 'browse',
+ )
+%>
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+die "access denied"
+ unless $curuser->access_right('Edit inventory')
+ || $curuser->access_right('Edit global inventory')
+ || $curuser->access_right('Configuration');
+
+</%init>
diff --git a/httemplate/edit/process/realestate_unit.html b/httemplate/edit/process/realestate_unit.html
new file mode 100644
index 0000000..ba9b5dc
--- /dev/null
+++ b/httemplate/edit/process/realestate_unit.html
@@ -0,0 +1,13 @@
+<& elements/process.html,
+ 'table' => 'realestate_unit',
+ 'viewall_dir' => 'browse',
+&>
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+die("access denied")
+ unless $curuser->access_right('Edit inventory')
+ || $curuser->access_right('Edit global inventory')
+ || $curuser->access_right('Configuration');
+
+</%init>
diff --git a/httemplate/edit/realestate_location.html b/httemplate/edit/realestate_location.html
new file mode 100644
index 0000000..34344e9
--- /dev/null
+++ b/httemplate/edit/realestate_location.html
@@ -0,0 +1,72 @@
+<% include( 'elements/edit.html',
+ 'name_singular' => 'Real Estate Location',
+ 'table' => 'realestate_location',
+
+ 'labels' => {
+ realestatelocnum => 'Location',
+ location_title => "Location",
+ address1 => "Address",
+ address2 => "Address",
+ city => "City",
+ state => "State",
+ zip => "Zip-Code",
+ disabled => "Disabled",
+ },
+ 'fields' => [
+ { field => 'realestatelocnum', type => 'hidden' },
+
+ { field => 'location_title',
+ type=>'text',
+ size => 40,
+ maxlength => 80,
+ },
+ { field => 'address1',
+ type=>'text',
+ size => 40,
+ maxlength => 80,
+ },
+ { field => 'address2',
+ type=>'text',
+ size => 40,
+ maxlength => 80,
+ },
+ { field => 'city',
+ type=>'text',
+ size => 40,
+ maxlength => 80,
+ },
+ { field => 'state',
+ type=>'text',
+ size => 40,
+ maxlength => 80,
+ },
+ { field => 'zip',
+ type=>'text',
+ size => 5,
+ maxlength => 5,
+ },
+
+ { field => 'agentnum',
+ type => 'select-agent',
+ value => 1,
+ },
+ { field => 'disabled',
+ type=>'checkbox',
+ value=>'Y'
+ },
+ ],
+
+ 'viewall_dir' => 'browse',
+ 'agent_virt' => 1,
+)
+%>
+
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+die("access denied")
+ unless $curuser->access_right('Edit inventory')
+ || $curuser->access_right('Edit global inventory')
+ || $curuser->access_right('Configuration');
+
+</%init>
diff --git a/httemplate/edit/realestate_unit.html b/httemplate/edit/realestate_unit.html
new file mode 100644
index 0000000..a7ca72d
--- /dev/null
+++ b/httemplate/edit/realestate_unit.html
@@ -0,0 +1,48 @@
+<% include( 'elements/edit.html',
+ 'name_singular' => 'Real Estate Unit',
+ 'table' => 'realestate_unit',
+
+ 'labels' => {
+ realestatenum => 'Ref No',
+ unit_title => 'Unit Title',
+ agentnum => 'Agent',
+ realestatelocnum => 'Location',
+ },
+ 'fields' => [
+ { field => 'realestatenum', type => 'hidden' },
+
+ { field => 'unit_title',
+ type=>'text',
+ size => 40,
+ },
+ { field => 'realestatelocnum',
+ type => 'select-realestate_location',
+
+ # possible todo:
+ # I'd like to have this field disabled for editing on existing records,
+ # and only show the full selectbox for new records.
+
+ },
+ { field => 'agentnum',
+ type => 'select-agent',
+ },
+ { field => 'disabled',
+ type=>'checkbox',
+ value=>'Y'
+ },
+ ],
+
+ 'viewall_dir' => 'browse',
+ 'agent_virt' => 1,
+)
+%>
+
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+die("access denied")
+ unless $curuser->access_right('Edit inventory')
+ || $curuser->access_right('Edit global inventory')
+ || $curuser->access_right('Configuration');
+
+</%init>