@@ -890,7 +890,7 @@ element to the select.
890890
891891### actions
892892
893- *actions* behaves the same as fieldset, but can only handle buttons as chidren .
893+ *actions* behaves the same as fieldset, but can only handle buttons and submits as children .
894894` ` ` javascript
895895{
896896 type: " actions" ,
@@ -913,15 +913,15 @@ We can change this with ```style``` attribute:
913913}
914914` ` `
915915
916- ### button
916+ ### button and submit
917917
918- *button* can have a ` ` ` onClick` ` ` attribute that either, as in JSON Form, is a function *or* a
918+ *button* and *submit* can have a ` ` ` onClick` ` ` attribute that either a function *or* a
919919string with an angular expression, as with ng-click. The expression is evaluated in the parent scope of
920920the ` ` ` sf- schema` ` ` directive.
921921
922922` ` ` javascript
923923[
924- { type: ' button ' , title: ' Ok' , onClick : function (){ ... } }
924+ { type: ' submit ' , title: ' Ok' , onClick : function (){ ... } }
925925 { type: ' button' , title: ' Cancel' , onClick: " cancel()" }
926926[
927927` ` `
@@ -930,11 +930,24 @@ The submit and other buttons have btn-default as default.
930930We can change this with ` ` ` style` ` ` attribute:
931931` ` ` javascript
932932[
933- { type: ' button ' , style: ' btn-warning' , title: ' Ok' , onClick : function (){ ... } }
933+ { type: ' submit ' , style: ' btn-warning' , title: ' Ok' , onClick : function (){ ... } }
934934 { type: ' button' , style: ' btn-danger' , title: ' Cancel' , onClick: " cancel()" }
935935[
936936` ` `
937937
938+ A *button* can also have optional icon classes:
939+ ` ` ` javascript
940+ [
941+ {
942+ type: ' button' ,
943+ title: ' Cancel' ,
944+ icon: ' glyphicon glyphicon-icon-exclamation-sign'
945+ onClick: " cancel()"
946+ }
947+ [
948+ ` ` `
949+
950+
938951### radios and radiobuttons
939952Both type *radios* and *radiobuttons* work the same way.
940953They take a ` titleMap` and renders ordinary radio buttons or bootstrap 3 buttons
0 commit comments