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

2222a’s picture

Category: support » feature

I 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.

physiotek’s picture

anyone?

marble’s picture

I 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?

physiotek’s picture

yes it works

thanks a lot!
pht3k

2222a’s picture

I 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.

scottprive’s picture

Title: remove yield » Admin option to hide the Yield Summary
Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: Unassigned » scottprive
Status: Active » Postponed

Quick 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 .= '

'. theme('box', t('Summary'), $summary ) .'

';
---
> if (variable_get('recipe_hide_summary',0) == 0) {
> $output .= '

'. theme('box', t('Summary'), $summary ) .'

';
> }
> else {
> $output .= '

'. theme('box', t('Summary'), $summary ) .'

';
> }

scottprive’s picture

Status: Postponed » Fixed

checked into head

scottprive’s picture

Version: 6.x-1.x-dev » master
Assigned: scottprive » Unassigned

unassigning, anyone can verify this...

Status: Fixed » Closed (fixed)

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