Commit 5b7584bb by Mathieu Poisbeau

GlobalParameter: add WORDPRESS_URL param to deal with the WP Api

parent 5df85678
......@@ -639,6 +639,10 @@ App\Entity\GlobalParameter:
name: "USE_PAYZEN"
value: 'true'
mandatory: 1
gp16:
name: "WORDPRESS_URL"
value: ''
mandatory: 0
App\Entity\Siege:
siege_1:
......
......@@ -29,6 +29,7 @@ class GlobalParameter
const MAP_ZOOM = 'MAP_ZOOM';
const USE_PAYZEN = 'USE_PAYZEN';
const APP_TITLE = 'APP_TITLE';
const WORDPRESS_URL = 'WORDPRESS_URL';
/**
* @ORM\Id()
......
......@@ -18,6 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\Email as EmailConstraint;
use Symfony\Component\Validator\Constraints\Type as TypeConstraint;
use Symfony\Component\Validator\Constraints\Regex as RegexConstraint;
use Symfony\Component\Validator\Constraints\Url as UrlConstraint;
class GlobalConfigurationFormType extends AbstractType
{
......@@ -134,6 +135,15 @@ class GlobalConfigurationFormType extends AbstractType
],
'help' => 'Si cette option est activée (true), les utilisateurs pourront cotiser et acheter de la monnaie locale par CB sur l\'application.'
))
->add('wordpressurl', GlobalParameterType::class, array(
'label' => "URL du site Wordpress :",
'name_param' => GlobalParameter::WORDPRESS_URL,
'_placeholder' => 'https://mon-wordpress-mlcc.fr',
'constraints_param' => [
new UrlConstraint(['message' => 'URL invalide !'])
],
'help' => "Si une URL Wordpress est renseignée, la synchronisation des prestataires (de Kohinos vers Wordpress) pourra se faire."
))
;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment