@@ -107,7 +107,7 @@ When creating a new form class add the following line to create the field:
107
107
public function buildForm(FormBuilder $builder, array $options)
108
108
{
109
109
// ...
110
- $builder->add('recaptcha', 'ewz_recaptcha' );
110
+ $builder->add('recaptcha', EWZRecaptchaType::class );
111
111
// ...
112
112
}
113
113
```
@@ -120,7 +120,7 @@ You can pass extra options to reCAPTCHA with the "attr > options" option:
120
120
public function buildForm(FormBuilder $builder, array $options)
121
121
{
122
122
// ...
123
- $builder->add('recaptcha', 'ewz_recaptcha' , array(
123
+ $builder->add('recaptcha', EWZRecaptchaType::class , array(
124
124
'attr' => array(
125
125
'options' => array(
126
126
'theme' => 'light',
@@ -157,7 +157,7 @@ use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrue as RecaptchaTrue;
157
157
public function buildForm(FormBuilder $builder, array $options)
158
158
{
159
159
// ...
160
- $builder->add('recaptcha', 'ewz_recaptcha' , array(
160
+ $builder->add('recaptcha', EWZRecaptchaType::class , array(
161
161
'attr' => array(
162
162
'options' => array(
163
163
'theme' => 'light',
@@ -213,7 +213,7 @@ using JavaScript:
213
213
<div id =" recaptcha-container" ></div >
214
214
<script type =" text/javascript" >
215
215
$ (document ).ready (function () {
216
- $ .getScript (" <?php echo \E WZ\B undle\R ecaptchaBundle\F orm\T ype\R ecaptchaType ::RECAPTCHA_API_JS_SERVER ?>" , function () {
216
+ $ .getScript (" <?php echo \E WZ\B undle\R ecaptchaBundle\F orm\T ype\E WZRecaptchaType ::RECAPTCHA_API_JS_SERVER ?>" , function () {
217
217
Recaptcha .create (" <?php echo $form['recaptcha']->get('public_key') ?>" , " recaptcha-container" , {
218
218
theme: " clean" ,
219
219
});
@@ -228,7 +228,7 @@ using JavaScript:
228
228
< div id= " recaptcha-container" >< / div>
229
229
< script type= " text/javascript" >
230
230
$ (document ).ready (function () {
231
- $ .getScript (" {{ constant('\\ EWZ\\ Bundle\\ RecaptchaBundle\\ Form\\ Type\\ RecaptchaType ::RECAPTCHA_API_JS_SERVER') }}" , function () {
231
+ $ .getScript (" {{ constant('\\ EWZ\\ Bundle\\ RecaptchaBundle\\ Form\\ Type\\ EWZRecaptchaType ::RECAPTCHA_API_JS_SERVER') }}" , function () {
232
232
Recaptcha .create (" {{ form.recaptcha.get('public_key') }}" , " recaptcha-container" , {
233
233
theme: " clean"
234
234
});
0 commit comments