Closed (fixed)
Project:
Submit Again
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Jun 2008 at 09:04 UTC
Updated:
15 Aug 2008 at 12:25 UTC
Hi
Thanks for the module. I've modified it sightly so it is compatible with 5.x
Two changes:
Comment submitagain_form_node_type_form_alter function, as it has no effect in 5.x.
Modify submitagain_form_alter like this:
function submitagain_form_alter($form_id, &$form) {
if (strpos($form_id, '_node_form') && !isset($form['nid']['#value'])) {
if (variable_get('submitagain_'. $form['type']['#value'], false)) {
$form['submit_again'] = array(
'#type' => 'submit',
'#value' => t('Save and create another'),
'#weight' => 41,
'#submit' => array('node_form_submit')
);
$form['#theme'] = 'submitagain_node_form';
}
}
if (isset($form['identity']['type'])) {
$form['submission']['submitagain'] = array (
'#type' => 'checkbox',
'#title' => t('Submit Again?'),
'#default_value' => variable_get('submitagain_' . $form['#node_type']->type, false),
'#description' => t('Enable this checkbox if you want to provide a "Save and create another" button for your users.')
);
}
}
Hope it helps!!!
Comments
Comment #1
deekayen commentedIt looks like you backported 6.x, but there is already a 5.x. Does that mean 5.x isn't working for you?
Comment #2
pcambraYeah, now there is a 5.x but when i posted my issue a month and half ago, there wasn't
Is CCK issue fixed? (cck custom fields weren't submited, are they now?)
Thanks
Comment #3
pcambraHi!
5.x version is CCK compatible, tested!
Thanks!!!
Comment #4
deekayen commentedComment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.