service dependencies: part_pkg_restrict / part_pkg_restrict_soft, RT#33685
[freeside.git] / httemplate / edit / elements / edit.html
index 4d5beee..76df820 100644 (file)
@@ -118,6 +118,8 @@ Example:
     # display, no <FORM>, no hidden fields for table name or primary key, no
     # display of primary key, no submit button, no html_foot, no footer)
     'embed' => $object, #need to pass the object
+    'tablenum' => 4, #need to specify a table number when using multiple
+                     #embedded edits on a page (and m2 stuff)
 
     #don't show the primary key label and value
     'no_pkey_display' => 1,
@@ -130,6 +132,9 @@ Example:
 
     'html_init'   => '', #after the header/menubar
 
+    'form_init'   => '', #after html_init, error and the opening <FORM>, but
+                         #before any other form contents
+
     #string or coderef of additional HTML to add before </TABLE>
     'html_table_bottom' => '',
 
@@ -242,6 +247,14 @@ Example:
   <INPUT TYPE="hidden" NAME="svcdb" VALUE="<% $table %>">
   <INPUT TYPE="hidden" NAME="<% $pkey %>" VALUE="<% $clone ? '' : $object->$pkey() %>">
 
+  <% defined($opt{'form_init'}) 
+        ? ( ref($opt{'form_init'})
+              ? &{$opt{'form_init'}}()
+              : $opt{'form_init'}
+          )
+        : ''
+  %>
+
 %   unless ( $opt{'no_pkey_display'} ) {
 
       <FONT SIZE="+1"><B>
@@ -256,7 +269,7 @@ Example:
 
 % }
 
-% my $tablenum = 0;
+% my $tablenum = $opt{'tablenum'} || 0;
 <TABLE ID="TableNumber<% $tablenum++ %>" BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
 
 % my $g_row = 0;