Closed (fixed)
Project:
Recipe
Version:
master
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2007 at 18:13 UTC
Updated:
13 Feb 2010 at 15:00 UTC
i would like to keep the number of portions just like in the html but not the form to allow changing the quantity
is it possible the remove the box easily?
thanks,
pht3k
Comments
Comment #1
2222a commentedI too favor removing this feature, but having it as an option will serve both sides. For me it's not needed and take up precious real estate on top. People can easily double or tripple in their own...
----------------------
Summary
Yield 2
Source Jeff the Master
Prep Time 45 minutes
Description
blah blah
------------------------
This IMO is better and already shows when we try to comment on it.
Comment #2
physiotek commentedanyone?
Comment #3
marble commentedI think you'll have to modify theme_node_recipe (or override it in your theme), as there is no setting for it. Does adding "$yield_form=FALSE;" as the first line of that function do what you wanted?
Comment #4
physiotek commentedyes it works
thanks a lot!
pht3k
Comment #5
2222a commentedI did it the gangsta way :-) just # it out.
Line 1473 or so:
//* removed ['custom_yield_container'] from two places
function recipe_custom_yield_form($node) {
$form = array(
'#type' => 'fieldset',
'#collapsible' => FALSE,
'#collapsed' => FALSE
);
$form['custom_yield'] = array(
'#type' => 'textfield',
'#default_value' => $node->yield,
'#size' => 2,
'#maxlength' => 4
);
# $form['custom_yield_container']['submit'] = array(
# '#type' => 'submit',
# '#value' => t('Change')
# );
# $form['custom_yield_container']['halve'] = array(
# '#type' => 'submit',
# '#value' => t('Halve')
# );
# $form['custom_yield_container']['double'] = array(
# '#type' => 'submit',
# '#value' => t('Double')
# );
return $form;
}
/**
Controls the output of the rendered index list.
Comment #6
scottprive commentedQuick patch for you guys.. I'm checking it in against HEAD (D6).
If you're on an older version and you don't want to install the dev/HEAD version, here's the patch. Obviously this will not apply cleanly to an older version,
but you can easily copy and paste the new lines to where they go in your recipe.module file..
Index: recipe.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/recipe/recipe.module,v
retrieving revision 1.87
diff -r1.87 recipe.module
3a4
>
467a469,476
> $form['recipe_hide_summary'] = array(
> '#type' => 'radios',
> '#title' => t('Hide Summary'),
> '#default_value' => variable_get('recipe_hide_summary', 0),
> '#options' => array(t('Disabled'), t('Enabled')),
> '#description' => t('Hides or shows the Summary/Yield form.'),
> '#required' => FALSE,
> );
1560c1569,1574
< $output .= '
';
---
> if (variable_get('recipe_hide_summary',0) == 0) {
> $output .= '
';
> }
> else {
> $output .= '
';
> }
Comment #7
scottprive commentedchecked into head
Comment #8
scottprive commentedunassigning, anyone can verify this...