When the number of tables value is set to zero, and then the node is edited, the code sets the number of tables back to the default of 18. I believe this is related to the following code in reservation_form():

  $form['tables'] = array (
    '#type' => 'textfield',
    '#title' => t('Number of tables'),
    '#default_value' => ($node->tables ? $node->tables : 18)
  );

When the value of $node->tables is zero, then it is reset to the default of 18. If the user only wants chair rows, and no tables, this is a problem. I think the default of 18 should only be set when a new node is created, not when an existing one is edited.

CommentFileSizeAuthor
#1 reservation.fix_.patch844 bytestwowheeler

Comments

twowheeler’s picture

StatusFileSize
new844 bytes

A patch fixing this issue is attached.

maulwuff’s picture

Status: Active » Needs work

thanks for the patch. It seems to me, that this patch would take out the default 18 on new nodes, too.

maulwuff’s picture

Status: Needs work » Fixed

fixed on next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.