@@ -890,7 +890,7 @@ element to the select.
890
890
891
891
### actions
892
892
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 .
894
894
` ` ` javascript
895
895
{
896
896
type: " actions" ,
@@ -913,15 +913,15 @@ We can change this with ```style``` attribute:
913
913
}
914
914
` ` `
915
915
916
- ### button
916
+ ### button and submit
917
917
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
919
919
string with an angular expression, as with ng-click. The expression is evaluated in the parent scope of
920
920
the ` ` ` sf- schema` ` ` directive.
921
921
922
922
` ` ` javascript
923
923
[
924
- { type: ' button ' , title: ' Ok' , onClick : function (){ ... } }
924
+ { type: ' submit ' , title: ' Ok' , onClick : function (){ ... } }
925
925
{ type: ' button' , title: ' Cancel' , onClick: " cancel()" }
926
926
[
927
927
` ` `
@@ -930,11 +930,24 @@ The submit and other buttons have btn-default as default.
930
930
We can change this with ` ` ` style` ` ` attribute:
931
931
` ` ` javascript
932
932
[
933
- { type: ' button ' , style: ' btn-warning' , title: ' Ok' , onClick : function (){ ... } }
933
+ { type: ' submit ' , style: ' btn-warning' , title: ' Ok' , onClick : function (){ ... } }
934
934
{ type: ' button' , style: ' btn-danger' , title: ' Cancel' , onClick: " cancel()" }
935
935
[
936
936
` ` `
937
937
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
+
938
951
### radios and radiobuttons
939
952
Both type *radios* and *radiobuttons* work the same way.
940
953
They take a ` titleMap` and renders ordinary radio buttons or bootstrap 3 buttons
0 commit comments