@@ -29,7 +29,7 @@ abstract protected function _getFieldIdentifier($prefix,$name="");
2929 abstract public function setValueFunction ($ index ,$ callback );
3030 abstract protected function _getFieldName ($ index );
3131 abstract protected function _getFieldCaption ($ index );
32- abstract protected function _buttonAsSubmit (&$ button ,$ event ,$ url ,$ responseElement =NULL );
32+ abstract protected function _buttonAsSubmit (&$ button ,$ event ,$ url ,$ responseElement =NULL , $ parameters = NULL );
3333
3434 /**
3535 * @param HtmlFormField $element
@@ -44,6 +44,8 @@ protected function _applyAttributes($element,&$attributes,$index){
4444 }
4545 }
4646 unset($ attributes ["rules " ]);
47+ unset($ attributes ["ajax " ]);
48+ unset($ attributes ["visibleHover " ]);
4749 $ element ->fromArray ($ attributes );
4850 }
4951
@@ -234,9 +236,9 @@ public function fieldAs($index,$type,$attributes=NULL){
234236 }
235237
236238 public function fieldAsSubmit ($ index ,$ cssStyle =NULL ,$ url =NULL ,$ responseElement =NULL ,$ attributes =NULL ){
237- return $ this ->_fieldAs (function ($ id ,$ name ,$ value ,$ caption ) use ($ url ,$ responseElement ,$ cssStyle ){
239+ return $ this ->_fieldAs (function ($ id ,$ name ,$ value ,$ caption ) use ($ url ,$ responseElement ,$ cssStyle, $ attributes ){
238240 $ button =new HtmlButton ($ id ,$ value ,$ cssStyle );
239- $ this ->_buttonAsSubmit ($ button ,"click " ,$ url ,$ responseElement );
241+ $ this ->_buttonAsSubmit ($ button ,"click " ,$ url ,$ responseElement, $ attributes [ " ajax " ] );
240242 return $ button ;
241243 }, $ index ,$ attributes ,"submit " );
242244 }
0 commit comments