I tried using a table for the receipt entry, which seems like it should work, but really doesn't. I'll check it in for future reference, but I'll be reverting just afterwards
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@384 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -170,38 +170,49 @@ function addPaymentSource(flash) {
|
|||||||
?>
|
?>
|
||||||
'</DIV>' +
|
'</DIV>' +
|
||||||
|
|
||||||
'<DIV ID="payment-amount-div-%{id}" CLASS="input text required">' +
|
'<TABLE ID="payment-table-%{id}">' +
|
||||||
' <LABEL FOR="payment-amount-%{id}">Amount</LABEL>' +
|
'<TR ID="payment-amount-div-%{id}">' +
|
||||||
' <INPUT TYPE="text" SIZE="20"' +
|
' <TD>Amount</TD>' +
|
||||||
' NAME="data[Entry][%{id}][amount]"' +
|
' <TD>' +
|
||||||
' ID="payment-amount-%{id}" />' +
|
' <SPAN CLASS="input text required">' +
|
||||||
'</DIV>' +
|
' <INPUT TYPE="text" SIZE="20"' +
|
||||||
|
' NAME="data[Entry][%{id}][amount]"' +
|
||||||
|
' ID="payment-amount-%{id}" />' +
|
||||||
|
' </SPAN>' +
|
||||||
|
' </TD>' +
|
||||||
|
'</TR>' +
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
foreach ($paymentTypes AS $type) {
|
foreach ($paymentTypes AS $type) {
|
||||||
$type = $type['TenderType'];
|
$type = $type['TenderType'];
|
||||||
$div = '<DIV';
|
|
||||||
$div .= ' ID="payment-type-div-%{id}-'.$type['id'].'"';
|
|
||||||
$div .= ' CLASS="payment-type-div-%{id}"';
|
|
||||||
if ($type['id'] != $defaultType)
|
|
||||||
$div .= ' STYLE="display:none;"';
|
|
||||||
$div .= '>';
|
|
||||||
|
|
||||||
for ($i=1; $i<=4; ++$i) {
|
for ($i=1; $i<=4; ++$i) {
|
||||||
if (!empty($type["data{$i}_name"])) {
|
if (!empty($type["data{$i}_name"])) {
|
||||||
$div .= '<DIV CLASS="input text required">';
|
$div = '<TR';
|
||||||
$div .= ' <LABEL FOR="payment-data'.$i.'-%{id}">'.$type["data{$i}_name"].'</LABEL>';
|
$div .= ' ID="payment-type-div-%{id}-'.$type['id'].'"';
|
||||||
$div .= ' <INPUT TYPE="text" SIZE="20" NAME="data[Entry][%{id}][type]['.$type['id'].'][data'.$i.']"';
|
$div .= ' CLASS="payment-type-div-%{id}"';
|
||||||
$div .= ' ID="payment-data'.$i.'-%{id}" />';
|
if ($type['id'] != $defaultType)
|
||||||
$div .= '</DIV>';
|
$div .= ' STYLE="display:none;"';
|
||||||
|
$div .= '>';
|
||||||
|
|
||||||
|
$div .= ' <TD>'.$type["data{$i}_name"].'</TD>';
|
||||||
|
$div .= ' <TD>';
|
||||||
|
$div .= ' <SPAN CLASS="input text required">';
|
||||||
|
$div .= ' <INPUT TYPE="text" SIZE="20"';
|
||||||
|
$div .= ' NAME="data[Entry][%{id}][type]['.$type['id'].'][data'.$i.']"';
|
||||||
|
$div .= ' ID="payment-data'.$i.'-%{id}" />';
|
||||||
|
$div .= ' </SPAN>';
|
||||||
|
$div .= ' </TD>';
|
||||||
|
|
||||||
|
$div .= '</TR>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$div .= '</DIV>';
|
|
||||||
echo "'$div' +\n";
|
echo "'$div' +\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
'</TABLE>' +
|
||||||
'</FIELDSET>'
|
'</FIELDSET>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user