Nick,
I used your guide and successfully added two fields: deliveredby (CHAR(10)) and returnedby (CHAR(10)). I have also successfully integrated their placement into the reserve.template file when a reservation is modified, as shown here
if ($res->type == RES_TYPE_MODIFY) {
print_deliveredby($res->get_deliveredby(), $res->type); // Prints out delivered by box
print_returnedby($res->get_returnedby(), $res->type); // Prints out the returned by box
}
function print_deliveredby($deliveredby, $type) {
?>
<div id="deliv">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr class="tableBorder">
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td colspan="2" class="cellColor"><h5 align="center"><?php echo translate('Delivery status')?></h5></td>
</tr>
<tr>
<td class="formNames" style="text-align: left;"><?php echo translate('Delivered by')?></td>
<td class="cellColor" style="text-align: center;">
<?php
if ($type == RES_TYPE_ADD || $type == RES_TYPE_MODIFY || $type == RES_TYPE_APPROVE) {
echo '<input type="text" name="deliveredby" class="textbox" size="10" value="' . $deliveredby . '"/>';
}
else {
echo (!empty($deliveredby) ? CmnFns::html_activate_links($deliveredby) : translate('N/A'));
}
?>
</td>
</tr>
<?php
}
/**
* Print out the reservation returnedby box to add/edit one
*/
function print_returnedby($returnedby, $type) {
?>
<tr>
<td class="formNames" style="text-align: left;"><?php echo translate('Returned by')?></td>
<td class="cellColor" style="text-align: center;">
<?php
if ($type == RES_TYPE_ADD || $type == RES_TYPE_MODIFY) {
echo '<input type="text" name="returnedby" class="textbox" size="10" value="' . $returnedby . '"/>';
}
else {
echo (!empty($returnedby) ? CmnFns::html_activate_links($returnedby) : translate('N/A'));
}
?>
</td>
</tr>
</table>
</td>
</table>
</div>
<?php
}
In my previous post I requested assistance regarding strikethrough text, however I have found that including the deliveredby and returnedby text within the reservation cell should be sufficient. What I am curious to know now is there a way to change the cell bgcolor when deliveredby and returnedby text is found. In other words before equipment has been delivered the cell shows with the predesignated blue bg color. When equipment has been delivered (and now has deliveredby data) the reservation's cell bg color would be changed to a red. And lastly when the equipment has been returned (and now has returnedby data) the reservation's cell bg color would be changed to a green.
I know this is alot to ask for, and I am quite sure that you are a busy busy man, but any assistance would be much appreciated.