sfynx-project/tool-captcha-bundle

This Bundle provides a secure captcha to add in form.

v2.8.0 2016-05-27 13:11 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:39:55 UTC


README

Parameters configuration

parameter.yml :

parameters:

    sfynx_captcha_form_options:
        root_pictures: '@@SfynxCaptchaBundle/Resources/public'
        captcha_pictures:
            - ['Sfynx', '/img/captcha/logo-sfynx.png']
            - ['Pi-groupe', '/img/captcha/pigroupe.jpg']

routing.yml :

    SfynxCaptchaBundle:
        resource: "@SfynxCaptchaBundle/Resources/config/routing.yml"
        prefix:   /

Twig

    
     {% form_theme form with ['SfynxCaptchaBundle:Form:captcha.html.twig'] %}

Css/js

    
    {% stylesheets filter='css_url_rewrite, ?yui_css'
    '@SfynxCaptchaBundle/Resources/public/css/sfynx-captcha.css' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
    {% endstylesheets %}


    {% javascripts filter='?yui_js'
        '@SfynxCaptchaBundle/Resources/public/js/sfynx-captcha.js'
    %}
    <script type="text/javascript" src="{{ asset_url }}"></script>
    {% endjavascripts %}