rt# 74031 Implement forms for editing real estate inventory
[freeside.git] / httemplate / edit / realestate_location.html
diff --git a/httemplate/edit/realestate_location.html b/httemplate/edit/realestate_location.html
new file mode 100644 (file)
index 0000000..254e57f
--- /dev/null
@@ -0,0 +1,71 @@
+<% 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',
+    },
+    { 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>