Further updates.

This commit is contained in:
Gregory McLean 2011-09-09 08:28:13 -04:00
parent e2a705dda7
commit 2ccb30cd8d
1 changed files with 11 additions and 4 deletions

View File

@ -15,7 +15,7 @@ Ultimately, the GregwarCaptchaBundle files should be downloaded to the
You can accomplish this several ways, depending on your personal preference. You can accomplish this several ways, depending on your personal preference.
The first method is the standard Symfony2 method. The first method is the standard Symfony2 method.
**Using the vendors script ** ***Using the vendors script***
Add the following lines to your `deps` file: Add the following lines to your `deps` file:
@ -32,6 +32,7 @@ $ php bin/vendors install
``` ```
***Using submodules*** ***Using submodules***
If you prefer instead to use git submodules, then run the following: If you prefer instead to use git submodules, then run the following:
``` bash ``` bash
@ -69,6 +70,9 @@ public function registerBundles()
} }
``` ```
Configuration
=============
Add the following configuration to your `app/config/config.yml`: Add the following configuration to your `app/config/config.yml`:
gregwar_captcha: ~ gregwar_captcha: ~
@ -91,13 +95,16 @@ with route and subrequests.
Form theming Form theming
============ ============
If you want to put the image in an other way, you can form theme `captcha_bundle` (this The widget support the standard symfony theming, see the [documentation](http://symfony.com/doc/current/book/forms.html#form-theming) for details on how to accomplish this.
is the default behavior) :
The default rendering is:
```html ```html
{% block captcha_widget %} {% block captcha_widget %}
<img src="{{ captcha_code }}" title="captcha" width="120" height="40" /> {% spaceless %}
<img src="{{ captcha_code }}" title="captcha" width="{{ captcha_width }}" height="{{ captcha_height }}" />
{{ form_widget(form) }} {{ form_widget(form) }}
{% spaceless %}
{% endblock %} {% endblock %}
``` ```