1111use Ajax \semantic \html \modules \HtmlProgress ;
1212use Ajax \semantic \html \modules \HtmlRating ;
1313use Ajax \semantic \html \elements \HtmlHeader ;
14+ use Ajax \semantic \html \collections \form \HtmlFormCheckbox ;
15+ use Ajax \semantic \html \collections \form \HtmlFormInput ;
16+ use Ajax \semantic \html \collections \form \HtmlFormDropdown ;
1417/**
1518 * @author jc
1619 * @property InstanceViewer $_instanceViewer
@@ -121,8 +124,7 @@ public function fieldAsRadio($index,$attributes=NULL){
121124
122125 public function fieldAsInput ($ index ,$ attributes =NULL ){
123126 return $ this ->_fieldAs (function ($ id ,$ name ,$ value ){
124- $ input = new HtmlInput ($ id ,"text " ,$ value );
125- //TODO check getField
127+ $ input = new HtmlFormInput ($ id ,"" ,"text " ,$ value );
126128 $ input ->setName ($ name );
127129 return $ input ;
128130 }, $ index ,$ attributes ,"input " );
@@ -138,7 +140,7 @@ public function fieldAsHidden($index,$attributes=NULL){
138140
139141 public function fieldAsCheckbox ($ index ,$ attributes =NULL ){
140142 return $ this ->_fieldAs (function ($ id ,$ name ,$ value ){
141- $ input =new HtmlCheckbox ($ id ,"" ,$ this ->_instanceViewer ->getIdentifier ());
143+ $ input =new HtmlFormCheckbox ($ id ,NULL ,$ this ->_instanceViewer ->getIdentifier ());
142144 $ input ->setChecked (JString::isBooleanTrue ($ value ));
143145 $ input ->getField ()->setProperty ("name " , $ name );
144146 return $ input ;
@@ -147,7 +149,8 @@ public function fieldAsCheckbox($index,$attributes=NULL){
147149
148150 public function fieldAsDropDown ($ index ,$ elements =[],$ multiple =false ,$ attributes =NULL ){
149151 return $ this ->_fieldAs (function ($ id ,$ name ,$ value ) use ($ elements ,$ multiple ){
150- $ dd =new HtmlDropdown ($ id ,$ value ,$ elements );
152+ //$dd=new HtmlDropdown($id,$value,$elements);
153+ $ dd =new HtmlFormDropdown ($ id ,$ elements ,NULL ,$ value );
151154 $ dd ->asSelect ($ name ,$ multiple );
152155 return $ dd ;
153156 }, $ index ,$ attributes ,"dd " );
0 commit comments