@@ -107,6 +107,9 @@ |
||
107 | 107 | return $return; |
108 | 108 | } |
109 | 109 | |
110 | + /** |
|
111 | + * @param string $name |
|
112 | + */ |
|
110 | 113 | private function nameToVariable($name) |
111 | 114 | { |
112 | 115 |
@@ -48,16 +48,16 @@ |
||
48 | 48 | if ($ctEntity > 0 && $request->getMethod() == 'GET' && is_numeric($number) && $number < 5) { |
49 | 49 | $message = 'gestock.install.st'.$number.'.yet_exist'; |
50 | 50 | } |
51 | - $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl('gs_install_st'.$number),]); |
|
51 | + $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl('gs_install_st'.$number), ]); |
|
52 | 52 | if ($entityName === 'Staff\Group') { |
53 | 53 | $this->addRolesAction($form, $entityNew); |
54 | 54 | } |
55 | 55 | if (is_int($number)) { |
56 | - $return = ['message' => $message, 'form' => $form->createView(),]; |
|
56 | + $return = ['message' => $message, 'form' => $form->createView(), ]; |
|
57 | 57 | } else { |
58 | 58 | $return = ['message' => $message, |
59 | 59 | $this->nameToVariable($entityName) => $entityNew, |
60 | - 'form' => $form->createView(),]; |
|
60 | + 'form' => $form->createView(), ]; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | if ($form->handleRequest($request)->isValid()) { |
@@ -37,25 +37,25 @@ |
||
37 | 37 | public function buildForm(FormBuilderInterface $builder, array $options) |
38 | 38 | { |
39 | 39 | $builder |
40 | - ->add('name', TextType::class, ['label' => 'gestock.settings.company.name',]) |
|
41 | - ->add('status', TextType::class, ['label' => 'gestock.settings.company.status',]) |
|
42 | - ->add('address', TextType::class, ['label' => 'gestock.address',]) |
|
43 | - ->add('zipcode', TextType::class, ['label' => 'gestock.zipcode',]) |
|
40 | + ->add('name', TextType::class, ['label' => 'gestock.settings.company.name', ]) |
|
41 | + ->add('status', TextType::class, ['label' => 'gestock.settings.company.status', ]) |
|
42 | + ->add('address', TextType::class, ['label' => 'gestock.address', ]) |
|
43 | + ->add('zipcode', TextType::class, ['label' => 'gestock.zipcode', ]) |
|
44 | 44 | ->add('town', TextType::class, ['label' => 'gestock.town', 'attr' => [ |
45 | 45 | 'onBlur' => 'this.value=this.value.toUpperCase();', |
46 | 46 | 'onFocus' => 'this.value=this.value.toUpperCase();', |
47 | - 'onKeyup' => 'this.value=this.value.toUpperCase();',]]) |
|
47 | + 'onKeyup' => 'this.value=this.value.toUpperCase();', ]]) |
|
48 | 48 | ->add('phone', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
49 | - 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',], |
|
50 | - 'preferred_country_choices' => ['FR',], 'label' => 'gestock.phone',]) |
|
49 | + 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ], |
|
50 | + 'preferred_country_choices' => ['FR', ], 'label' => 'gestock.phone', ]) |
|
51 | 51 | ->add('fax', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
52 | - 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',], |
|
53 | - 'preferred_country_choices' => ['FR',], 'label' => 'gestock.fax',]) |
|
54 | - ->add('mail', EmailType::class, ['trim' => true, 'label' => 'gestock.mail',]) |
|
55 | - ->add('contact', TextType::class, ['label' => 'gestock.contact',]) |
|
52 | + 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ], |
|
53 | + 'preferred_country_choices' => ['FR', ], 'label' => 'gestock.fax', ]) |
|
54 | + ->add('mail', EmailType::class, ['trim' => true, 'label' => 'gestock.mail', ]) |
|
55 | + ->add('contact', TextType::class, ['label' => 'gestock.contact', ]) |
|
56 | 56 | ->add('gsm', PhoneNumberType::class, ['default_region' => 'FR', 'format' => PhoneNumberFormat::NATIONAL, |
57 | - 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT',], |
|
58 | - 'preferred_country_choices' => ['FR',], 'label' => 'gestock.gsm',]) |
|
57 | + 'widget' => PhoneNumberType::WIDGET_COUNTRY_CHOICE, 'country_choices' => ['FR', 'GB', 'DE', 'IT', ], |
|
58 | + 'preferred_country_choices' => ['FR', ], 'label' => 'gestock.gsm', ]) |
|
59 | 59 | ->addEventSubscriber(new AddSaveEditFieldSubscriber()) |
60 | 60 | ; |
61 | 61 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | EntityType::class, |
43 | 43 | array( |
44 | 44 | 'class' => 'AppBundle:Settings\Supplier', |
45 | - 'query_builder' => function (EntityRepository $er) { |
|
45 | + 'query_builder' => function(EntityRepository $er) { |
|
46 | 46 | return $er->createQueryBuilder('s') |
47 | 47 | ->where('s.active = 1'); |
48 | 48 | }, |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'label' => 'title', |
54 | 54 | 'translation_domain' => 'gs_suppliers', |
55 | 55 | 'empty_data' => null, |
56 | - 'attr' => ['class' => 'form-control', 'readonly' => true,], |
|
56 | + 'attr' => ['class' => 'form-control', 'readonly' => true, ], |
|
57 | 57 | ) |
58 | 58 | ) |
59 | 59 | ->add( |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'format' => 'EEEE dd MMMM yyyy', |
68 | 68 | 'html5' => false, |
69 | 69 | 'input' => 'datetime', |
70 | - 'attr' => ['class' => 'form-control', 'readonly' => true,], |
|
70 | + 'attr' => ['class' => 'form-control', 'readonly' => true, ], |
|
71 | 71 | ) |
72 | 72 | ) |
73 | 73 | ->add( |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'format' => 'EEEE dd MMMM yyyy', |
82 | 82 | 'html5' => false, |
83 | 83 | 'input' => 'datetime', |
84 | - 'attr' => ['class' => 'form-control', 'readonly' => true,], |
|
84 | + 'attr' => ['class' => 'form-control', 'readonly' => true, ], |
|
85 | 85 | ) |
86 | 86 | ) |
87 | 87 | ->add( |