protected function buildForm()
 {
     parent::buildForm();
     $this->formBuilder->remove("auto_login")->remove("phone")->remove("cellphone")->remove("company")->remove("address1")->remove("address2")->remove("address3")->remove("city")->remove("zipcode")->remove("country")->remove("state")->remove("password")->remove("password_confirm");
     $customerCanChangeEmail = ConfigQuery::read("customer_change_email");
     $emailConfirmation = ConfigQuery::read("customer_confirm_email");
     if (!$customerCanChangeEmail) {
         $currentOptions = $this->formBuilder->get("email")->getOptions();
         $currentOptions["constraints"] = [];
         $currentOptions["required"] = false;
         $this->formBuilder->remove("email")->add("email", "text", $currentOptions);
     }
     if ($this->formBuilder->has("email_confirm") && !($customerCanChangeEmail && $emailConfirmation)) {
         $this->formBuilder->remove("email_confirm");
     }
 }
Beispiel #2
0
 public function buildForm()
 {
     parent::buildForm();
     $this->formBuilder->remove('password_confirm')->remove('agreed')->add('lang', 'integer', ['constraints' => [new NotBlank()]]);
 }
 protected function buildForm()
 {
     parent::buildForm();
     $this->formBuilder->remove("auto_login")->remove("phone")->remove("cellphone")->remove("company")->remove("address1")->remove("address2")->remove("address3")->remove("city")->remove("zipcode")->remove("country")->remove("password")->remove("password_confirm");
 }