-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RTM] allow selection of which interest groups should be mandatory #19
Conversation
If you think this is too much out of scope of this extension, any user could alternatively achieve something like that via hook, if implemented. public function modifyMailChimpForm(\Haste\Form\Form $objForm, \Oneup\Contao\MailChimpBundle\Module\ModuleSubscribe $objModule)
{
$objForm->getWidget('SALUTATION')->mandatory = true;
} |
I think we should go for a feature release. |
@@ -66,9 +68,11 @@ | |||
$GLOBALS['TL_DCA']['tl_module']['fields']['mailchimpMandatoryInterests'] = [ | |||
'label' => &$GLOBALS['TL_LANG']['tl_module']['mailchimpMandatoryInterests'], | |||
'inputType' => 'checkbox', | |||
'options_callback' => ['Oneup\Contao\MailChimpBundle\EventListener\DcaListener', 'onLoadInterests'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok to use Oneup\Contao\MailChimpBundle\EventListener\DcaListener::class
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's the way to go, didn't think of that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @fritzmg who's gonna change? you or me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me :) sorry, haven't had time yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
b951914
to
b67a959
Compare
Thank you! |
mailchimpMandatoryInterests
now has anoptions_callback
that loads the interest groups from the MailChimp list.'submitOnChange' => true
and'includeBlankOption' => true
toeval
ofmailchimpList
.Careful: this changes the usage of the
mailchimpMandatoryInterests
field. While previously it was a simple boolean, now it contains a blob of serialized groups that should be mandatory. Technically this would need to be released as a major version - though may be you can release it as a feature version, sincemailchimpMandatoryInterests
was only recently introduced...