Programmatic table support. Enhances several tables with highlightable and clickable rows and
cleans up the existing table row highlight and click code.
This commit is contained in:
@@ -4,27 +4,39 @@ require_once(BASE."include/util.php");
|
||||
/*********************/
|
||||
/* Edit Account Form */
|
||||
/*********************/
|
||||
|
||||
// returns an array of TableRow instances
|
||||
function GetEditAccountFormRows($sUserEmail)
|
||||
{
|
||||
$aTableRows = array();
|
||||
|
||||
$oTableRow = new TableRow();
|
||||
$oTableRow->AddTextCell(" Email Address");
|
||||
$oTableRow->AddTextCell('<input type="text" name="sUserEmail" '.
|
||||
'value="'.$sUserEmail.'">');
|
||||
$aTableRows[] = $oTableRow;
|
||||
|
||||
$oTableRow = new TableRow();
|
||||
$oTableRow->AddTextCell(" Password");
|
||||
$oTableRow->AddTextCell('<input type="password" name="sUserPassword">');
|
||||
$aTableRows[] = $oTableRow;
|
||||
|
||||
$oTableRow = new TableRow();
|
||||
$oTableRow->AddTextCell(" Password (again)");
|
||||
$oTableRow->AddTextCell('<input type="password" name="sUserPassword2">');
|
||||
$aTableRows[] = $oTableRow;
|
||||
|
||||
$oTableRow = new TableRow();
|
||||
$oTableRow->AddTextCell(" Real Name");
|
||||
$oTableRow->AddTextCell('<input type="text" name="sUserRealname" value="'.$sUserRealname.'">');
|
||||
$aTableRows[] = $oTableRow;
|
||||
|
||||
$oTableRow = new TableRow();
|
||||
$oTableRow->AddTextCell(" ");
|
||||
$oTableRow->AddTextCell(" ");
|
||||
$aTableRows[] = $oTableRow;
|
||||
|
||||
return $aTableRows;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!-- start of edit account form -->
|
||||
<tr>
|
||||
<td> Email Address </td>
|
||||
<td> <input type="text" name="sUserEmail" value="<?php echo $sUserEmail; ?>"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Password </td>
|
||||
<td> <input type="password" name="sUserPassword"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Password (again) </td>
|
||||
<td> <input type="password" name="sUserPassword2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> Real Name </td>
|
||||
<td> <input type="text" name="sUserRealname" value="<?php echo $sUserRealname; ?>"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=2> </td>
|
||||
</tr>
|
||||
|
||||
<!-- end of edit account form -->
|
||||
|
||||
Reference in New Issue
Block a user