Hi there,
I think the preparation time select would be more flexible in a textfield, it is very easy to do :
line 141 replace
$form['preptime'] = array(
'#type' => 'select',
'#title' => t("Preparation time"),
'#default_value' => $node->preptime,
'#options' => array (5 => t('5 minutes'), 10 => t('10 minutes'), 15 => t('15 minutes'), 20 => t('20 minutes'), 30 => t('30 minutes'), 45 => t('45 minutes'), 60 => t('1 hour'), 90 => t('1 1/2 hours'), 120 => t('2 hours'), 150 => t('2 1/2 hours'), 180 => t('3 hours'), 210 => t('3 1/2 hours'), 240 => t('4 hours'), 300 => t('5 hours'), 360 => t('6 hours')),
'#description' => t("How long does this recipe take to prepare (i.e. elapsed time)"),
);
by
$form['preptime'] = array(
'#type' => 'textfield',
'#title' => t("Preparation time"),
'#default_value' => $node->preptime,
'#description' => t("How long does this recipe take to prepare (i.e. elapsed time)"),
);
You have to change the preptime field type in your database to make a varchar instead of an int
ALTER TABLE `recipe` CHANGE `preptime` `preptime` VARCHAR( 64 ) NOT NULL
I'm sorry I don't make a patch because I have some others hacks in my recipe module.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | recipe.module_2.patch | 53.87 KB | zmove |
Comments
Comment #1
zmove commentedIt's a little harder and I make modifications to add an operator box in the module see this thread for more informations.
So the folowing file contain the last release of the recipe module with these 2 modifications.
You have to alter the database for the operator modification, just add an operator varchar(10) to the recipe_node_ingredient.
Sorry to not create a full patch, but my deadline is in 2 days^^'
Comment #2
jvandervort commentedRecipe 5.x branch moved to unsupported.