AdditionalSection.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Client\EmailAccount\Sections;
  3. use ModulesGarden\Servers\ZimbraEmail\App\Traits\FormExtendedTrait;
  4. use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\Custom\Sections\FreeFieldsSection;
  5. use function ModulesGarden\Servers\ZimbraEmail\Core\Helper\di;
  6. use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Text;
  7. /**
  8. *
  9. * Created by PhpStorm.
  10. * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
  11. * Date: 12.11.19
  12. * Time: 13:42
  13. * Class AdditionalSection
  14. */
  15. class AdditionalSection extends FreeFieldsSection
  16. {
  17. protected $id = 'additionalSection';
  18. protected $name = 'additionalSection';
  19. use FormExtendedTrait;
  20. public function initContent()
  21. {
  22. $this->generateDoubleSection([new Text('company'), new Text('title')]);
  23. $field = new Text('phone');
  24. $field->setPlaceholder(di('lang')->absoluteT('phoneNumberPlaceholder'));
  25. $this->addField($field);
  26. $this->generateDoubleSection([new Text('home_phone'), new Text('mobile_phone')]);
  27. $this->generateDoubleSection([new Text('fax'), new Text('pager')]);
  28. $this->generateDoubleSection([new Text('country'), new Text('state')]);
  29. $this->generateDoubleSection([new Text('city'), new Text('street')]);
  30. $field = new Text('post_code');
  31. $this->addField($field);
  32. }
  33. }