summaryrefslogtreecommitdiff
path: root/httemplate/elements/auto-table.html
diff options
context:
space:
mode:
authormark <mark>2011-02-11 23:59:29 +0000
committermark <mark>2011-02-11 23:59:29 +0000
commit6a10d16ff4e806357abab206254aa38c80a749d3 (patch)
tree94dfb9705ba9d5aa8b3b0d1d96be6ba460115404 /httemplate/elements/auto-table.html
parentca2b8a8c99585a4619eb657f2c7fca12a7304249 (diff)
rate selection by CDR type, RT#10991
Diffstat (limited to 'httemplate/elements/auto-table.html')
-rw-r--r--httemplate/elements/auto-table.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/httemplate/elements/auto-table.html b/httemplate/elements/auto-table.html
index 9c7dfd09a..49222745a 100644
--- a/httemplate/elements/auto-table.html
+++ b/httemplate/elements/auto-table.html
@@ -51,7 +51,9 @@ Values will be passed through as "mytable_id1", etc.
<TR>
% my $col = 0;
% for ( $col = 0; $col < scalar @fields; $col++ ) {
-% my $id = $prefix . $fields[$col] . $row;
+% my $id = $prefix . $fields[$col];
+% # don't suffix rownum in the final, blank row
+% $id .= $row if $row < (scalar @data) - 1;
<TD>
% my @o = @{ $select[$col] };
% if( @o ) {
@@ -117,7 +119,10 @@ $val eq $data[$row][$col] ? ' SELECTED' : ''%>><% shift @o %></OPTION>
var row = <% $prefix %>table.insertRow(-1);
var cells = <% $prefix %>_blank.cells;
for (i=0; i<cells.length; i++) {
- row.appendChild(cells[i].cloneNode(true));
+ var node = row.appendChild(cells[i].cloneNode(true));
+ var input = node.children[0];
+ input.id = input.id + row.sectionRowIndex;
+ input.name = input.name + row.sectionRowIndex;
}
<% $prefix %>rownum++;
}