Merge pull request #781 from nlegoff/fix1570_bis

[3.8] Fix #1570 Remove accept tou link if there are no TOU
This commit is contained in:
Romain Neutron
2013-11-12 11:16:53 -08:00
6 changed files with 151 additions and 35 deletions

View File

@@ -58,14 +58,16 @@ class PhraseaRegisterForm extends AbstractType
),
));
$builder->add('accept-tou', 'checkbox', array(
'label' => _('Terms of Use'),
'mapped' => false,
"constraints" => array(
new Assert\True(array(
"message" => _("Please accept the Terms and conditions in order to register.")
))),
));
if ($this->app->hasTermsOfUse()) {
$builder->add('accept-tou', 'checkbox', array(
'label' => _('Terms of Use'),
'mapped' => false,
"constraints" => array(
new Assert\True(array(
"message" => _("Please accept the Terms and conditions in order to register.")
))),
));
}
$builder->add('provider-id', 'hidden');