<td><?php echo $LangUI->_('Liquid/Solid'); ?> </td> <td> <?php echo DBUtils::arrayselect($liqsol, 'ingredient_solid', 'size=1', $ingredient_solid); ?> </td> </tr> <tr> <td><?php echo $LangUI->_('Location in Store'); ?> </td> <td> <?php echo DBUtils::arrayselect($locations, 'ingredient_loc', 'size=1', $ingredient_loc); ?> </td> </tr> </table> <br/> <input type="button" value="<?php echo $ingredient_id ? $LangUI->_('Update Ingredient') : $LangUI->_('Add Ingredient'); ?> " class="button" onclick="SaveIngredient()"> <br /> </form> </div>
// default starting out value (nothing selected) if ($i >= $n) { $ingredient_id = 0; $ingredient_name = ""; $ingredient_qual = ""; $ingredient_quant = ""; $ingredient_unit = ""; $ingredient_optional = ""; //just to make sure } echo "<tr>"; echo '<td><div class="ui-state-default ui-corner-all" title="Delete"><span class="ui-icon ui-icon-trash"></span></div></td>'; echo '<td><div class="ui-state-default ui-corner-all" title="Order Ingredient"><span class="ui-icon ui-icon-arrow-4"></span></div></td>'; echo '<td align=left><input type=text size=4 autocomplete="off" onchange="JavaScript:fractionConvert(this);" id="ingredientQuantity_' . $i . '" name="ingredientQuantity_' . $i . '" value="' . $ingredient_quant . '"></td>'; echo '<td align=left>'; echo DBUtils::arrayselect($localUnits, 'ingredientUnit_' . $i, 'size=1', $ingredient_unit); echo "</td>\n"; echo '<td><input type="text" id="ingredientQualifier_' . $i . '" name="ingredientQualifier_' . $i . '" value="' . $ingredient_qual . '" maxlength=32 size="20"></td>'; echo '<td align=left>'; echo "<div class=\"ui-widget\"><input id=\"ingredientAuto_{$i}\" name=\"ingredientAuto_{$i}\" value=\"{$ingredient_name}\"/></div>"; echo "<input type=\"hidden\" id=\"ingredientId_{$i}\" name=\"ingredientId_{$i}\" value=\"{$ingredient_id}\">\n"; echo "</td>\n"; echo '<td align="center"><input type="checkbox" id="ingredientOptional_' . $i . '" name="ingredientOptional_' . $i . '" value="checked" ' . $ingredient_optional . '></td>'; echo "</tr>\n"; if ($i < $n) { $ingredients->MoveNext(); } } ?> </tbody> </table>
$meal = $MPObj->mealplanItems[$dbDate][$i]['meal']; $servings = $MPObj->mealplanItems[$dbDate][$i]['servings']; $recipe_id = $MPObj->mealplanItems[$dbDate][$i]['id']; $recipe_name = $MPObj->mealplanItems[$dbDate][$i]['name']; } else { // It is a new one, give it blank values $meal = NULL; $servings = $defaultServings; $recipe_id = NULL; $recipe_name = NULL; } echo "<tr>\n"; echo '<td align="center">'; echo '<input type="checkbox" name="delete_' . $i . '" value="yes"></td>'; echo '<td align="center">'; echo DBUtils::arrayselect($mealList, 'meal_id_' . $i, 'size=1', $meal, true); echo "</td><td align=\"center\">\n"; echo '<input type="text" autocomplete="off" name="servings_' . $i . '" value=' . $servings . ' size=3>'; echo '</td><td align="center">'; echo '<input type="text" autocomplete="off" name="repeat_' . $i . '" value=1 size=3> ' . $LangUI->_('Day(s)'); echo '</td><td align="center">'; echo "<div class=\"ui-widget\"><input id=\"recipeAuto_{$i}\" name=\"recipeAuto_{$i}\"value=\"{$recipe_name}\"/></div>"; echo "<input type=\"hidden\" id=\"recipeId_{$i}\" name=\"recipeId_{$i}\" value=\"{$recipe_id}\">\n"; echo "</td></tr>\n"; } ?> </table> <p> <input type="button" id="saveMealPlanButton" value="<?php echo $LangUI->_('Save'); ?>
?> "> </td> <td align="left"> <input type="text" size="4" autocomplete="off" name="ingredient_quantity_<?php echo $iterator; ?> " value="<?php echo $ingObj->quantity; ?> "> </td> <td align="left"> <?php echo DBUtils::arrayselect($localUnits, 'ingredient_units_' . $iterator, 'size=1', $ingObj->unitMap); ?> </td> <td align="left"> <input type="text" size="20" name="ingredient_qualifier_<?php echo $iterator; ?> " value="<?php echo $ingObj->qualifier; ?> "> </td> <td width="50%" align="center"> <a href="./index.php?m=ingredients&a=view&ingredient_id=<?php echo $ingObj->getID() . '">' . $ingObj->name; ?>
<tr> <th><?php echo $LangUI->_('Section Name'); ?> </th> </tr> <tbody class="content"> <?php for ($i = 0; $i < count($locations); $i++) { $selected = 0; echo "<tr>"; echo "<td style='width: 200px;'>"; if ($i < count($store_layout)) { $selected = $store_layout[$i]; } echo DBUtils::arrayselect($locations, 'section_' . $i, 'size=1', $selected); echo "</td>"; echo "</tr>"; } ?> </tbody> <tr> <th> <input type="button" id="saveLayoutButton" value="<?php echo $LangUI->_("Save Layout"); ?> " class="button"> </th> </tr> </table> </form>