public static function getForm() { $form = new \Ip\Form(); $form->addClass('ipsConfigForm'); $form->setAjaxSubmit(0); $field = new FieldOptionTextLang(array('optionName' => 'Config.websiteTitle', 'name' => 'websiteTitle', 'label' => __('Website title', 'Ip-admin', false), 'hint' => __('Used as a sender name in emails and as default website logo.', 'Ip-admin'))); $field->addClass('ipsAutoSave'); $form->addField($field); $field = new FieldOptionTextLang(array('optionName' => 'Config.websiteEmail', 'name' => 'websiteEmail', 'value' => ipGetOptionLang('Config.websiteEmail'), 'label' => __('Website email', 'Ip-admin', false), 'hint' => __('Email address used as a sender to send emails on behalf of the website.', 'Ip-admin'))); $field->addValidator('Email'); $field->addClass('ipsAutoSave'); $form->addField($field); return $form; }
public static function getForm() { $form = new \Ip\Form(); $form->addClass('ipsConfigForm'); $form->setAjaxSubmit(0); $field = new FieldOptionTextLang(array('optionName' => 'Config.websiteTitle', 'name' => 'websiteTitle', 'label' => __('Website title', 'Ip-admin', false), 'hint' => __('Used as a sender name in emails and as default website logo.', 'Ip-admin'))); $field->addClass('ipsAutoSave'); $form->addField($field); $field = new FieldOptionTextLang(array('optionName' => 'Config.websiteEmail', 'name' => 'websiteEmail', 'value' => ipGetOptionLang('Config.websiteEmail'), 'label' => __('Website email', 'Ip-admin', false), 'hint' => __('Email address used as a sender to send emails on behalf of the website.', 'Ip-admin'))); $field->addValidator('Email'); $field->addClass('ipsAutoSave'); $form->addField($field); $field = new \Ip\Form\Field\Text(array('name' => 'gmapsApiKey', 'value' => ipGetOption('Config.gmapsApiKey'), 'label' => __('Google Maps API key', 'Ip-admin', false), 'note' => __('You must provide Google Maps API key for Map widget to work.', 'Ip-admin', false) . ' <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank">' . __('Follow instructions.', 'Ip-admin', false) . '</a>')); $field->addClass('ipsAutoSave'); $field->addAttribute('data-fieldid', $field->getName()); $field->addAttribute('id', $field->getName()); $field->addAttribute('data-fieldname', $field->getName()); $form->addField($field); return $form; }