Tony Air

Results 47 comments of Tony Air

@bummzack need to separate it from the other parts of our project, document it and test it separately and we will share it with open source community next week. Shipping-Costs...

@sanderha sure we work on it together)

Cool can we make it work with the other forms?

Well here's an example extension: ``` class ShopBootstrapFormEx extends Extension { public function updateForm(){ $fields = $this->owner->Fields(); BootstrapForm::apply_bootstrap_to_fieldlist($fields); $fields = $this->owner->Actions(); BootstrapForm::apply_bootstrap_to_fieldlist($fields); $this->owner->addExtraClass('form form-vertical'); } } ``` It will work...

That's what I do, but it's kinda dirty way that's why I offer to standardize this methods. Keeping backwards compatibility of course which can be removed in future.

well to treat forms differently I can create different extensions

well in this case let's add all methods directly to form objects. Because for an instance PaymentForm can't be extended this way and you need to extend CheckoutPage and every...

I think that it will solve everything with having "updateForm" methods for Form objects and "updateShopAccountForm" like methods for a specific places at Controllers. What do you think?

In case of option (2) it can be messy on child objects. For an instance PaymentForm extends CheckoutForm if you will use $this->extend('updateFormName', $form); you will need to repeat yourself...

that sounds reasonable there will be no repeated hooks so option (3) I think is the best, but in this case we shall keep updateShopAccountForm method. ShopAccountForm and OrderActionsForm shouldn't...