/** * Init contact data form. * * @param int $a_mode Edit Mode */ public function initContactDataForm() { global $lng, $ilCtrl; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $this->form = new ilPropertyFormGUI(); // name $ti = new ilTextInputGUI($lng->txt("name"), "inst_name"); $ti->setMaxLength(64); $ti->setSize(30); $ti->setRequired(true); $this->form->addItem($ti); // description $ti = new ilTextInputGUI($lng->txt("client_info"), "inst_info"); $ti->setMaxLength(64); $ti->setSize(30); $this->form->addItem($ti); // institution $ti = new ilTextInputGUI($lng->txt("client_institution"), "inst_institution"); $ti->setMaxLength(64); $ti->setSize(30); $this->form->addItem($ti); // contact data $sh = new ilFormSectionHeaderGUI(); $sh->setTitle($lng->txt("contact_data")); $this->form->addItem($sh); // first name $ti = new ilTextInputGUI($lng->txt("firstname"), "admin_firstname"); $ti->setMaxLength(64); $ti->setSize(30); $ti->setRequired(true); $this->form->addItem($ti); // last name $ti = new ilTextInputGUI($lng->txt("lastname"), "admin_lastname"); $ti->setMaxLength(64); $ti->setSize(30); $ti->setRequired(true); $this->form->addItem($ti); $fs = array("title" => array("max" => 64, "size" => 30), "position" => array("max" => 64, "size" => 30), "institution" => array("max" => 200, "size" => 30), "street" => array("max" => 64, "size" => 30), "zipcode" => array("max" => 10, "size" => 5), "city" => array("max" => 64, "size" => 30), "country" => array("max" => 64, "size" => 30), "phone" => array("max" => 64, "size" => 30)); foreach ($fs as $f => $op) { // field $ti = new ilTextInputGUI($lng->txt($f), "admin_" . $f); $ti->setMaxLength($op["max"]); $ti->setSize($op["size"]); $ti->setInfo($lng->txt("")); $this->form->addItem($ti); } // email $ti = new ilEmailInputGUI($lng->txt("email"), "admin_email"); $ti->setRequired(true); $this->form->addItem($ti); $this->form->addCommandButton("saveContact", $lng->txt("save")); $this->form->setTitle($lng->txt("client_data")); $this->form->setFormAction("setup.php?cmd=gateway"); }
/** * Init contact information form. */ public function initContactInformationForm() { global $lng, $ilSetting; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $this->form = new ilPropertyFormGUI(); // first name $ti = new ilTextInputGUI($this->lng->txt("firstname"), "admin_firstname"); $ti->setMaxLength(64); $ti->setSize(40); $ti->setRequired(true); $ti->setValue($ilSetting->get("admin_firstname")); $this->form->addItem($ti); // last name $ti = new ilTextInputGUI($this->lng->txt("lastname"), "admin_lastname"); $ti->setMaxLength(64); $ti->setSize(40); $ti->setRequired(true); $ti->setValue($ilSetting->get("admin_lastname")); $this->form->addItem($ti); // title $ti = new ilTextInputGUI($this->lng->txt("title"), "admin_title"); $ti->setMaxLength(64); $ti->setSize(40); $ti->setValue($ilSetting->get("admin_title")); $this->form->addItem($ti); // position $ti = new ilTextInputGUI($this->lng->txt("position"), "admin_position"); $ti->setMaxLength(64); $ti->setSize(40); $ti->setValue($ilSetting->get("admin_position")); $this->form->addItem($ti); // institution $ti = new ilTextInputGUI($this->lng->txt("institution"), "admin_institution"); $ti->setMaxLength(200); $ti->setSize(40); $ti->setValue($ilSetting->get("admin_institution")); $this->form->addItem($ti); // street $ti = new ilTextInputGUI($this->lng->txt("street"), "admin_street"); $ti->setMaxLength(64); $ti->setSize(40); //$ti->setRequired(true); $ti->setValue($ilSetting->get("admin_street")); $this->form->addItem($ti); // zip code $ti = new ilTextInputGUI($this->lng->txt("zipcode"), "admin_zipcode"); $ti->setMaxLength(10); $ti->setSize(5); //$ti->setRequired(true); $ti->setValue($ilSetting->get("admin_zipcode")); $this->form->addItem($ti); // city $ti = new ilTextInputGUI($this->lng->txt("city"), "admin_city"); $ti->setMaxLength(64); $ti->setSize(40); //$ti->setRequired(true); $ti->setValue($ilSetting->get("admin_city")); $this->form->addItem($ti); // country $ti = new ilTextInputGUI($this->lng->txt("country"), "admin_country"); $ti->setMaxLength(64); $ti->setSize(40); //$ti->setRequired(true); $ti->setValue($ilSetting->get("admin_country")); $this->form->addItem($ti); // phone $ti = new ilTextInputGUI($this->lng->txt("phone"), "admin_phone"); $ti->setMaxLength(64); $ti->setSize(40); //$ti->setRequired(true); $ti->setValue($ilSetting->get("admin_phone")); $this->form->addItem($ti); // email $ti = new ilEmailInputGUI($this->lng->txt("email"), "admin_email"); $ti->setMaxLength(64); $ti->setSize(40); $ti->setRequired(true); $ti->allowRFC822(true); $ti->setValue($ilSetting->get("admin_email")); $this->form->addItem($ti); // feedback recipient $ti = new ilEmailInputGUI($this->lng->txt("feedback_recipient"), "feedback_recipient"); $ti->setInfo(sprintf($this->lng->txt("feedback_recipient_info"), $this->lng->txt("contact_sysadmin"))); $ti->setMaxLength(64); $ti->setSize(40); $ti->setRequired(true); $ti->allowRFC822(true); $ti->setValue($ilSetting->get("feedback_recipient")); $this->form->addItem($ti); // error recipient $ti = new ilEmailInputGUI($this->lng->txt("error_recipient"), "error_recipient"); $ti->setMaxLength(64); $ti->setSize(40); $ti->allowRFC822(true); $ti->setValue($ilSetting->get("error_recipient")); $this->form->addItem($ti); $this->form->addCommandButton("saveContactInformation", $lng->txt("save")); $this->form->setTitle($lng->txt("contact_data")); $this->form->setFormAction($this->ctrl->getFormAction($this)); }
protected function initExternalRaterForm($appr_id) { include_once "Services/User/classes/class.ilUserUtil.php"; include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, "addExternalRater")); $form->setTitle($this->lng->txt("survey_360_add_external_rater") . ": " . ilUserUtil::getNamePresentation($appr_id)); $email = new ilEmailInputGUI($this->lng->txt("email"), "email"); $email->setRequired(true); $form->addItem($email); $lname = new ilTextInputGUI($this->lng->txt("lastname"), "lname"); $lname->setSize(30); $form->addItem($lname); $fname = new ilTextInputGUI($this->lng->txt("firstname"), "fname"); $fname->setSize(30); $form->addItem($fname); $form->addCommandButton("addExternalRater", $this->lng->txt("save")); $form->addCommandButton("editRaters", $this->lng->txt("cancel")); return $form; }