[racktables-users] Re: Change numbering order in rack (bis)

  • From: Rémi Bouhl <rbouhl@xxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Tue, 16 Feb 2010 13:35:34 +0100

Denis Ovsienko a écrit :
>>  Is that in compliance with the spec? Is someone working on this feature?
>>  Is my idea acceptable?
>>  
>>  I am ready to try to write it, if I am sure that it won't make things
>>  difficult in the future.
> 
> If you could send a finished, working patch for this feature, that would help 
> a lot.
> 
I'm working on it.

What is done:
- displaying down to up, or up to down number.
I've just added that in renderRack function (from interface.php:
echo "<tr><th>".($i + ($up_to_down * ($rackData['height'] - 2*$i +
1)))."</th>";

$up_to_down as to be set to 0 or 1. 0 makes the indice going from 1 to
max, and 1 makes it going from max to 1.

- addind a "up_to_down" entry in 'Rack' table, in database. OK;
- adding a checkbox for "up_to_down" in function renderNewRackForm,
that's OK.

My trouble is for "connecting" interface to database, while addind a new
rack. I don't understand where the code goes when submitting the new
rack form.

Can someone tell me where, in the code, the values submitted in new rack
form are going to the database?

Thanks.
Rémi.

Other related posts: