[freeside-commits] freeside/httemplate/elements table-grid.html, 1.1, 1.2 select-table.html, 1.3, 1.4

Ivan,,, ivan at wavetail.420.am
Sat Jun 24 09:41:47 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail:/tmp/cvs-serv19993/httemplate/elements

Modified Files:
	table-grid.html select-table.html 
Log Message:
Add the ability to link customer service definition fields to inventory
  classes, with an "automatic/manual" flag.  Add the ability for the web
  interface to maintain these links.  Start prettying up the service def.
  edit in preparation for Bigger Changes.


Index: select-table.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/select-table.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- select-table.html	19 Jun 2006 02:33:52 -0000	1.3
+++ select-table.html	24 Jun 2006 16:41:45 -0000	1.4
@@ -8,11 +8,15 @@
   # 'value'    => 'current_value',
   #
   ##opt
-  # 'empty_label' => '', #better specify it though, the default might change
-  # 'hashref'     => {},
-  # 'extra_sql'   => '',
-  # 'records'     => \@records, #instead of hashref
-  # 'pre_options' => [ 'value' => 'option' ], #before normal options
+  # 'empty_label'  => '', #better specify it though, the default might change
+  # 'hashref'      => {},
+  # 'extra_sql'    => '',
+  # 'records'      => \@records, #instead of hashref
+  # 'pre_options'  => [ 'value' => 'option' ], #before normal options
+  # 'element_name' => '', #HTML element name, defaults to the name of
+  #                       # the primary key column
+  # 'element_etc'  => '', #additional attributes (i.e. "DISABLED") for the
+  #                       #<SELECT> element
 
   my( %opt ) = @_;
 
@@ -37,7 +41,7 @@
 
 %>
 
-<SELECT NAME="<%= $key %>">
+<SELECT NAME="<%= $opt{'element_name'} || $key %>" <%= $opt{'element_etc'} %>>
 
   <% while ( @pre_options ) { %>
     <OPTION VALUE="<%= shift(@pre_options) %>"><%= shift(@pre_options) %>

Index: table-grid.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/table-grid.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- table-grid.html	22 Dec 2005 04:01:17 -0000	1.1
+++ table-grid.html	24 Jun 2006 16:41:45 -0000	1.2
@@ -1,8 +1,14 @@
+<%
+  my %opt = @_;
+  $opt{cellspacing} ||= 0;
+  $opt{cellpadding} ||= 0;
+
+%>
 <STYLE TYPE="text/css">
 .grid table { border: solid; empty-cells: show }
 .grid TH { padding-left: 3px; padding-right: 3px; border: 1px solid #dddddd; border-bottom: dashed 1px black; border-right: none }
 .grid TD { padding-left: 3px; padding-right: 3px; empty-cells: show; border: 1px solid #cccccc; border-bottom: none; border-right: none }
 </STYLE>
 
-<TABLE CLASS="grid" CELLSPACING=0 CELLPADDING=0 BORDER=1 BORDERCOLOR="#000000" STYLE="border: solid 1px black; empty-cells: show">
+<TABLE CLASS="grid" CELLSPACING=<%= $opt{cellspacing} %> CELLPADDING=<%= $opt{cellpadding} %> BORDER=1 BORDERCOLOR="#000000" STYLE="border: solid 1px black; empty-cells: show">
 



More information about the freeside-commits mailing list