Moved Terms aggrement from account to order, display terms and conditions

This commit is contained in:
Julien Chanséaume
2014-07-29 14:08:47 +02:00
committed by Julien Chanseaume
parent 9410881da9
commit 160ccaa4ff
10 changed files with 141 additions and 48 deletions

View File

@@ -86,17 +86,8 @@ class CustomerCreateForm extends AddressCreateForm
"for" => "newsletter"
),
"required" => false
))
// Add terms & conditions
->add("agreed", "checkbox", array(
"constraints" => array(
new Constraints\True(array("message" => Translator::getInstance()->trans("Please accept the Terms and conditions in order to register.")))
),
"label"=>"Test",
"label_attr" => array(
"for" => "agreed"
)
));
}
public function verifyPasswordField($value, ExecutionContextInterface $context)

View File

@@ -43,9 +43,7 @@ class CustomerProfileUpdateForm extends CustomerCreateForm
->remove("country")
// Remove Login Information
->remove("password")
->remove("password_confirm")
// Remove Terms & conditions
->remove("agreed");
->remove("password_confirm");
}
/**

View File

@@ -50,6 +50,16 @@ class OrderPayment extends FirewallForm
)
))
)
))
// Add terms & conditions
->add("agreed", "checkbox", array(
"constraints" => array(
new Constraints\True(array("message" => Translator::getInstance()->trans("Please accept the Terms and conditions in order to register.")))
),
"label"=>"Agreed",
"label_attr" => array(
"for" => "agreed"
)
));
}