Esempio n. 1
0
 /**
  * @param \Mautic\PluginBundle\Integration\Form|FormBuilder $builder
  * @param array                                             $data
  * @param string                                            $formArea
  */
 public function appendToForm(&$builder, $data, $formArea)
 {
     if ($formArea == 'features') {
         $name = strtolower($this->getName());
         if ($this->factory->serviceExists('mautic.form.type.social.' . $name)) {
             $builder->add('shareButton', 'socialmedia_' . $name, array('label' => 'mautic.integration.form.sharebutton', 'required' => false, 'data' => isset($data['shareButton']) ? $data['shareButton'] : array()));
         }
     }
 }
Esempio n. 2
0
 /**
  * @param \Mautic\PluginBundle\Integration\Form|FormBuilder $builder
  * @param array                                             $data
  * @param string                                            $formArea
  */
 public function appendToForm(&$builder, $data, $formArea)
 {
     if ($formArea == 'keys') {
         $builder->add('version', 'button_group', array('choices' => array('6' => '6.x/community', '7' => '7.x'), 'label' => 'mautic.sugarcrm.form.version', 'constraints' => array(new NotBlank(array('message' => 'mautic.core.value.required'))), 'required' => true));
     }
 }
Esempio n. 3
0
 /**
  * @param \Mautic\PluginBundle\Integration\Form|FormBuilder $builder
  * @param array                                             $data
  * @param string                                            $formArea
  */
 public function appendToForm(&$builder, $data, $formArea)
 {
     if ($formArea == 'features') {
         $builder->add('sandbox', 'choice', ['choices' => ['sandbox' => 'mautic.salesforce.sandbox'], 'expanded' => true, 'multiple' => true, 'label' => 'mautic.salesforce.form.sandbox', 'label_attr' => ['class' => 'control-label'], 'empty_value' => false, 'required' => false, 'attr' => ['onclick' => 'Mautic.postForm(mQuery(\'form[name="integration_details"]\'),\'\');']]);
         $builder->add('objects', 'choice', ['choices' => ['Lead' => 'mautic.salesforce.object.lead', 'Contact' => 'mautic.salesforce.object.contact', 'Activity' => 'mautic.salesforce.object.activity'], 'expanded' => true, 'multiple' => true, 'label' => 'mautic.salesforce.form.objects_to_pull_from', 'label_attr' => ['class' => ''], 'empty_value' => false, 'required' => false]);
         $builder->add('namespace', 'text', ['label' => 'mautic.salesforce.form.namespace_prefix', 'label_attr' => ['class' => 'control-label'], 'attr' => ['class' => 'form-control'], 'required' => false]);
     }
 }