Hello there
First of all, thanks for this brilliant piece of code.
I'm trying to add a new field to establish a cancel time by group of users. I took a look at
http://php.brickhost.com/forums/index.php?topic=11112.0, but it is no the same problem.
I added the field to DB, and got it appearing in the admin page, but i cannot get the dialog form to change the value of the field. I tried copying the one named "renameDialog" in manage_groups.tpl, and adding proper code for Commands.php and DataConstant.php, but I'm loosing something, for sure.
manage_groups.tpl
<div id="cancelTimeDialog" class="dialog" style="display:none;" title="{translate key=CancelHours}">
<form id="cancelTimeForm" method="post">
<label>{translate key=Hours}<br/> <input type="text" class="textbox required" {formname key=CANCEL_TIME} /></label>
<button type="button" class="button save">{html_image src="disk-black.png"} {translate key=Change}</button>
<button type="button" class="button cancel">{html_image src="slash.png"} {translate key=Cancel}</button>
</form>
</div>
Commands.php
class UpdateCancelTime extends SqlCommand
{
public function __construct($groupId, $cancelTime)
{
parent::__construct(Queries::UPDATE_CANCEL_TIME);
$this->AddParameter(new Parameter(ParameterNames::GROUP_ID, $groupId));
$this->AddParameter(new Parameter(ParameterNames::CANCEL_TIME, $cancelTime));
}
}
DataConstant.php
const UPDATE_CANCEL_TIME =
'UPDATE groups
SET autocancel_time = @canceltime
WHERE group_id = @groupid';
Anyone can help, please?