Closed (duplicate)
Project:
Mailchimp
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
1 Aug 2008 at 16:32 UTC
Updated:
22 Aug 2009 at 08:24 UTC
We wanted to be able to theme and position and the check box on the registration page. At present there are no classes attached. I made the following changes to the module:
Original
line 143:
foreach ($lists as $list) {
if ( variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) !== 'required' ) {
$list_form['chimpmail_list_'. $list['id']] = array(
'#type' => 'checkbox',
'#title' => $list["name"],
'#default_value' => variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) == 'optout' ? true : false,
'#description' => variable_get( 'mailchimp_list_'. $list['id'] .'_description', '' ),
);
}
}
if( $list_form ) {
$form['chimpmail_lists'] = array(
'#type' => 'fieldset',
'#title' => t('Newsletter subscriptions'),
'#weight' => 5,
'#collapsible' => false,
to...
foreach ($lists as $list) {
if ( variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) !== 'required' ) {
$list_form['chimpmail_list_'. $list['id']] = array(
'#type' => 'checkbox',
'#title' => $list["name"],
'#default_value' => variable_get( 'mailchimp_list_'. $list['id'] .'_listtype', '' ) == 'optout' ? true : false,
'#description' => variable_get( 'mailchimp_list_'. $list['id'] .'_description', '' ),
'#prefix' => '<div class="mailchimp-sub-check">',
'#suffix' => '</div>',
);
}
}
if( $list_form ) {
$form['chimpmail_lists'] = array(
'#type' => 'fieldset',
'#title' => t('Newsletter subscriptions'),
'#weight' => 5,
'#collapsible' => false,
'#prefix' => '<div class="mailchimp-form">',
'#suffix' => '</div>',
So basically just adding #prefix and #suffix to the fieldset and the checkbox. Would be great to slip these, and maybe some others, into the next release to enable theming.
Cheers,
Neil
Comments
Comment #1
levelos commentedput in some classes in the most recent committ, hopefully enough to manipulate what you need. Duplicate of #427980: Add class to fieldset on registration page