Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Commit

Permalink
Replace genemu_form on sh_form (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
aivus committed Jan 14, 2018
1 parent cb029be commit 706202c
Show file tree
Hide file tree
Showing 33 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Controller/Base64Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function setContainer(ContainerInterface $container = null)
public function refreshCaptchaAction()
{
$captcha = $this->container->get('genemu.gd.captcha');
$options = $this->container->get('session')->get('genemu_form.captcha.options', array());
$options = $this->container->get('session')->get('sh_form.captcha.options', array());
$captcha->setOptions($options);
$datas = preg_split('([;,]{1})', substr($captcha->getBase64(), 5));

Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/SHFormExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class SHFormExtension extends Extension
{
/**
* Responds to the genemu_form configuration parameter.
* Responds to the sh_form configuration parameter.
*
* @param array $configs
* @param ContainerBuilder $container
Expand Down
6 changes: 3 additions & 3 deletions Form/Core/Validator/ReCaptchaValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ public function validate(FormEvent $event)

if (empty($this->options['code'])) {
if (empty($datas['challenge']) || empty($datas['response'])) {
$error = 'genemu_form.recaptcha.incorrect-captcha-sol';
$error = 'sh_form.recaptcha.incorrect-captcha-sol';
} elseif (true !== ($answer = $this->check($datas, $form->getConfig()->getAttribute('option_validator')))) {
$error = 'genemu_form.recaptcha.unable-to-check-the-captcha-from-the-server';
$error = 'sh_form.recaptcha.unable-to-check-the-captcha-from-the-server';
}
} elseif ($this->options['code'] != $datas['response']) {
$error = 'genemu_form.recaptcha.incorrect-captcha-sol';
$error = 'sh_form.recaptcha.incorrect-captcha-sol';
}

if (!empty($error)) {
Expand Down
2 changes: 1 addition & 1 deletion Gd/Type/Captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(Session $session, $secret)
{
$this->session = $session;
$this->secret = $secret;
$this->key = 'genemu_form.captcha';
$this->key = 'sh_form.captcha';
}

public function setOptions(array $options)
Expand Down
2 changes: 1 addition & 1 deletion Resources/config/routing/image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">

<route id="genemu_form_image" path="/genemu_change_image">
<route id="sh_form_image" path="/genemu_change_image">
<default key="_controller">SHFormBundle:Image:change</default>
</route>

Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/captcha_gd/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
captcha:
enabled: true
width: 100
Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/captcha_gd/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
captcha: ~
```
Expand Down Expand Up @@ -69,7 +69,7 @@ You can define a static code for your test environment :
``` yml
# app/config/config_test.yml
genemu_form:
sh_form:
captcha:
code: 1234
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/autocomplete/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
autocompleter:
mongodb: true
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/autocomplete/mongodb_ajax.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
autocompleter:
mongodb: true
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/autocomplete/propel.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
autocompleter:
doctrine: false
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/autocomplete/propel_ajax.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
autocompleter:
doctrine: false
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/autocomplete/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
autocomplete: ~
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/datepicker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
date: ~
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/file/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
file:
enabled: true
cancel_img: '/bundles/genemuform/images/cancel.png'
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/file/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
file:
swf: /uploadify/uploadify.swf
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/image/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
image:
enabled: true
selected: 'large'
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/image/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
image: ~
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/select2/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ By default, just use the default configuration of select2.
### Configuration example:
``` yml
# app/config/config.yml
genemu_form:
sh_form:
select2:
enabled: true
configs:
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/select2/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Enable it in your app configuration :
``` yml
# app/config/config.yml
genemu_form:
sh_form:
select2: ~
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/tinymce/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
tinymce:
enabled: true
theme: advanced
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/tinymce/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
tinymce: ~
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/jquery/tinymce/jquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
tinymce:
script_url: '/tinymce/tiny_mce.js'
```
Expand Down
4 changes: 2 additions & 2 deletions Resources/doc/recaptcha/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

``` yml
# app/config/config.yml
genemu_form:
sh_form:
recaptcha:
public_key: `your public key is required`
private_key: `your private key is required`
Expand All @@ -16,7 +16,7 @@ You can define a static code for your test environment:
``` yml
# app/config/config_test.yml
genemu_form:
sh_form:
recaptcha:
validation:
code: 1234
Expand Down
4 changes: 2 additions & 2 deletions Resources/translations/validators.de.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: Der angegebene Captcha ist nicht korrekt.
invalid-site-private-key: Der 'private key' ist nicht korrekt.
unable-to-check-the-captcha-from-the-server: Captcha vom Server zu überprüfen.
unable-to-check-the-captcha-from-the-server: Captcha vom Server zu überprüfen.
2 changes: 1 addition & 1 deletion Resources/translations/validators.en.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: The captcha is invalid.
invalid-site-private-key: The private key is invalid.
Expand Down
2 changes: 1 addition & 1 deletion Resources/translations/validators.es.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: El captcha no es válido.
invalid-site-private-key: La clave privada no es válida.
Expand Down
2 changes: 1 addition & 1 deletion Resources/translations/validators.fr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The captcha is invalid.: Le captcha est invalide.

genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: "Le captcha n'est pas valide."
invalid-site-private-key: La clé privée est invalide.
Expand Down
2 changes: 1 addition & 1 deletion Resources/translations/validators.it.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: Il captcha non è valido
invalid-site-private-key: La chiave privata non è valida.
Expand Down
2 changes: 1 addition & 1 deletion Resources/translations/validators.lt.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: Įvestas kodas neteisingas.
invalid-site-private-key: Neteisingas privatus raktas.
Expand Down
2 changes: 1 addition & 1 deletion Resources/translations/validators.pl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: Wprowadzony kod jest nieprawidłowy
invalid-site-private-key: Prywatny klucz jest nieprawidłowy.
Expand Down
2 changes: 1 addition & 1 deletion Resources/translations/validators.ru.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: Текст с картинки введен неверно.
invalid-site-private-key: Секретный ключ задан неверно.
Expand Down
2 changes: 1 addition & 1 deletion Resources/translations/validators.sl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
genemu_form:
sh_form:
recaptcha:
incorrect-captcha-sol: Koda ni vnesena pravilno.
invalid-site-private-key: Privatni ključ ni pravilen.
Expand Down
2 changes: 1 addition & 1 deletion Resources/views/Form/jquery_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@
$.ajax({
type: 'POST',
url: '{{ path('genemu_form_image') }}',
url: '{{ path('sh_form_image') }}',
data: $data,
dataType: 'json',
success: function(data) {
Expand Down

0 comments on commit 706202c

Please sign in to comment.