Skip to content

Instantly share code, notes, and snippets.

@kadzany
Last active May 7, 2018 04:10
Show Gist options
  • Save kadzany/ed2f956def127196e12bb9a33218039d to your computer and use it in GitHub Desktop.
Save kadzany/ed2f956def127196e12bb9a33218039d to your computer and use it in GitHub Desktop.
Form JSON format containing table
{
"key": "userProfile",
"translationKey": "%WMS.Inbound.ASN.userProfile.formTitle%",
"formType" : "generated",
"menuId": "WM-01",
"roles": [
"SysAdmin",
"Managers",
"Users"
],
"grid": {
"key": "userList",
"roleActionKey": "editTable",
"columns": [
{
"colKey": "firstName",
"colHeader": "%WMS.Inbound.ASN.userProfile.firstName%"
},
{
"colKey": "dateOfBirth",
"colHeader": "%WMS.Inbound.ASN.userProfile.dateOfBirth%"
},
{
"colKey": "hasIdCard",
"colHeader": "%WMS.Inbound.ASN.userProfile.hasIdCard%"
},
{
"colKey": "addressDistrict",
"colHeader": "%WMS.Inbound.ASN.userProfile.addressDistrict%"
}
]
},
"fields": [
{
"order": 0,
"key": "userId",
"inputType": "hidden",
"inputSettings": {}
},
{
"order": 1,
"key": "firstName",
"translationKey": "%WMS.Inbound.ASN.userProfile.firstName%",
"roleActionKey": "WM-000012",
"importance": "high",
"inputType": "textbox",
"inputSettings": {
"required": true,
"minLength": "2",
"maxLength": "15"
}
},
{
"order": 2,
"key": "dateOfBirth",
"translationKey": "%WMS.Inbound.ASN.userProfile.dateOfBirth%",
"roleActionKey": "WM-000012",
"importance": "standart",
"inputType": "datepicker",
"inputSettings": {
"required": true,
"maxDate": "today"
}
},
{
"order": 3,
"key": "hasIdCard",
"translationKey": "%WMS.Inbound.ASN.userProfile.hasIdCard%",
"roleActionKey": "editField",
"importance": "standart",
"inputType": "checkbox",
"inputSettings": {
"required": true
}
},
{
"order": 4,
"key": "addressDistrict",
"translationKey": "%WMS.Inbound.ASN.userProfile.addressDistrict%",
"roleActionKey": "WM-000012",
"importance": "standart",
"inputType": "combobox",
"inputSettings": {
"required": false,
"dataSourceUrl": "/relative-path/to/api/getting-data/endpoint",
"defaultValue": ""
}
}
],
"buttons": [
{
"order": 0,
"key": "saveData",
"translationKey": "%WMS.Inbound.ASN.userProfile.saveData%",
"roleActionKey": "WM-000013",
"inputType": "saveButton",
"inputSettings": {
"apiEndpointUrl": "/relative-path/to/api/save-data/endpoint"
}
},
{
"order": 1,
"key": "cancel",
"translationKey": "%WMS.Inbound.ASN.userProfile.cancel%",
"roleActionKey": "WM-000014",
"inputType": "cancelButton",
"inputSettings": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment