diff options
Diffstat (limited to 'httemplate/edit/quotation_pkg_detail.html')
-rw-r--r-- | httemplate/edit/quotation_pkg_detail.html | 70 |
1 files changed, 6 insertions, 64 deletions
diff --git a/httemplate/edit/quotation_pkg_detail.html b/httemplate/edit/quotation_pkg_detail.html index ae09b9c..036bffd 100644 --- a/httemplate/edit/quotation_pkg_detail.html +++ b/httemplate/edit/quotation_pkg_detail.html @@ -1,9 +1,4 @@ -<% include("/elements/header-popup.html", $title, '', - ( $cgi->param('error') ? '' : 'onload="addRow()"' ), - ) -%> - -%# <% include('/elements/error.html') %> +<& /elements/header-popup.html, $title &> <FORM ACTION="process/quotation_pkg_detail.html" NAME="DetailForm" ID="DetailForm" METHOD="POST"> @@ -35,17 +30,11 @@ </TD> </TR> -% my $row = 0; -% for ( @details ) { - - <TR> - <TD ALIGN="right"><% $row ? '' : 'Detail' %></TD> - <TD> - <INPUT TYPE="text" NAME="detail<% $row %>" SIZE="60" MAXLENGTH="65" VALUE="<% $_ |h %>" rownum="<% $row++ %>" onkeyup="possiblyAddRow" onchange="possiblyAddrow"> - </TD> - </TR> - -% } +<& elements/detail-table.html, + id => 'DetailTable', + details => \@details, + label => 'Details', + &> </TABLE> @@ -54,53 +43,6 @@ </FORM> -<SCRIPT TYPE="text/javascript"> -% # abject false laziness with edit/cust_pkg_detail.html - - var rownum = <% $row %>; - - function possiblyAddRow() { - if ( ( rownum - this.getAttribute('rownum') ) == 1 ) { - addRow(); - } - } - - function addRow() { - - var table = document.getElementById('DetailTable'); - var tablebody = table.getElementsByTagName('tbody').item(0); - - var row = document.createElement('TR'); - - var empty_cell = document.createElement('TD'); - if (!rownum) { - empty_cell.innerHTML = 'Detail:' - empty_cell.style.textAlign = 'right'; - } - row.appendChild(empty_cell); - - var detail_cell = document.createElement('TD'); - - var detail_input = document.createElement('INPUT'); - detail_input.setAttribute('name', 'detail'+rownum); - detail_input.setAttribute('id', 'detail'+rownum); - detail_input.setAttribute('size', 60); - detail_input.setAttribute('maxLength', 65); - detail_input.setAttribute('rownum', rownum); - detail_input.onkeyup = possiblyAddRow; - detail_input.onchange = possiblyAddRow; - detail_cell.appendChild(detail_input); - - row.appendChild(detail_cell); - - tablebody.appendChild(row); - - rownum++; - - } - -</SCRIPT> - </BODY> </HTML> <%init> |