Last edited one year ago
by Demo writer

Onboarding.form: Difference between revisions

(Created page with "{ "lang": "json", "form_name": "Onboarding", "title": "Onboarding checklist", "showTitle": false, "showFormName": false, "buttonsFloat": false, "ca...")
 
No edit summary
Line 21: Line 21:
     },
     },
     "show_target_afterAction": false,
     "show_target_afterAction": false,
    "listeners": {
        "beforeSubmitData": "jscb:function( data ) {\nvar dfd = $.Deferred();\n        var total = 0;\n\tvar checked = 0;\n\tvar items = this.getItems();\n  for( var name in data ) {\n  \tif ( !name.startsWith( 'onboard_item' ) ) {\n    \tcontinue;\n    }\n    total++;\n    if ( data[name].done === true ) {\n    \tchecked++;\n    }\n  }\ndata.progress = ( 100 * checked ) / total;\n  dfd.resolve( data );\n\nreturn dfd.promise();\n  \n}"
    },
     "items": [
     "items": [
         {
         {
Line 44: Line 41:
             "widgetCustomProps": [],
             "widgetCustomProps": [],
             "type": "label"
             "type": "label"
        },
        {
            "name": "progress",
            "label": "Progress",
            "help": "",
            "noLayout": true,
            "widget_classes": [],
            "showOn": [
                "create",
                "edit",
                "view"
            ],
            "editableOn": [
                "create",
                "edit"
            ],
            "style": "width: 100%; margin-left: auto; margin-right: auto;\nmargin-bottom: 40px;",
            "widget_listeners": [],
            "widgetCustomProps": {
                "widget_progress": "0"
            },
            "type": "progress_bar"
         },
         },
         {
         {

Revision as of 13:10, 12 April 2023