{
    "type": "Ext.form.Panel",
    "reference": {
        "name": "items",
        "type": "array"
    },
    "codeClass": null,
    "userConfig": {
        "bodyPadding": 10,
        "cls": [
            "formpanel"
        ],
        "container|align": "stretch",
        "designer|userAlias": "actividadesform",
        "designer|userClassName": "ActividadesForm",
        "flex": 1,
        "height": null,
        "initialTitle": "actividad",
        "itemId": null,
        "layout": "vbox",
        "title": null,
        "trackResetOnLoad": true,
        "width": null
    },
    "configAlternates": {
        "bodyPadding": "auto",
        "container|align": "string",
        "designer|userAlias": "string",
        "designer|userClassName": "string",
        "flex": "number",
        "height": "auto",
        "itemId": "string",
        "layout": "string",
        "title": "string",
        "width": "auto",
        "cls": "typedarray",
        "initialTitle": "string",
        "trackResetOnLoad": "boolean"
    },
    "name": "MyForm2",
    "designerId": "97804b88-8621-4c35-9050-1333382814b3",
    "customConfigs": [
        {
            "group": "(Custom Properties)",
            "name": "initialTitle",
            "type": "string"
        }
    ],
    "viewControllerInstanceId": "9572b353-4411-4f52-8023-6772b6229798",
    "viewModelInstanceId": "e243c575-f8da-47ad-8620-4c2e60e35ddc",
    "cn": [
        {
            "type": "Ext.form.field.Text",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "allowBlank": false,
                "blankText": "Este campo es obligatorio",
                "editable": false,
                "enableKeyEvents": true,
                "fieldLabel": "Código",
                "name": "codigo"
            },
            "configAlternates": {
                "allowBlank": "boolean",
                "blankText": "string",
                "editable": "boolean",
                "fieldLabel": "string",
                "name": "string",
                "enableKeyEvents": "boolean"
            },
            "name": "MyTextField5",
            "designerId": "80c98adb-93e3-4d9f-8f1b-991f3206bc7c"
        },
        {
            "type": "Ext.form.field.Text",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "allowBlank": false,
                "blankText": "Este campo es obligatorio",
                "enableKeyEvents": true,
                "fieldLabel": "Nombre*",
                "layout|flex": null,
                "name": "nombre"
            },
            "configAlternates": {
                "allowBlank": "boolean",
                "blankText": "string",
                "fieldLabel": "string",
                "layout|flex": "number",
                "name": "string",
                "enableKeyEvents": "boolean"
            },
            "name": "MyTextField",
            "designerId": "217bec27-e085-48cd-8eaa-29f85c424c1f"
        },
        {
            "type": "Ext.container.Container",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "container|align": "stretch",
                "layout": "hbox",
                "layout|flex": null,
                "margin": "10 0 10"
            },
            "configAlternates": {
                "container|align": "string",
                "layout": "string",
                "layout|flex": "number",
                "margin": "auto"
            },
            "name": "MyContainer",
            "designerId": "e1165870-107e-49fe-9478-d3ca79f36f65",
            "cn": [
                {
                    "type": "Ext.form.field.ComboBox",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "allowBlank": false,
                        "blankText": "Este campo es obligatorio",
                        "displayField": "descripcion",
                        "enableKeyEvents": true,
                        "fieldLabel": "Campaña*",
                        "forceSelection": true,
                        "itemId": "fieldPeriodo",
                        "layout|flex": null,
                        "name": "cod_periodo",
                        "queryMode": "local",
                        "store": "Campanias",
                        "valueField": "codigo",
                        "width": "80%"
                    },
                    "configAlternates": {
                        "allowBlank": "boolean",
                        "blankText": "string",
                        "displayField": "datafield",
                        "fieldLabel": "string",
                        "forceSelection": "boolean",
                        "itemId": "string",
                        "layout|flex": "number",
                        "name": "string",
                        "queryMode": "string",
                        "store": "store",
                        "valueField": "datafield",
                        "width": "auto",
                        "enableKeyEvents": "boolean"
                    },
                    "name": "MyComboBox8",
                    "designerId": "af47dfe7-2cf7-4d08-b02e-13c0dc010570"
                },
                {
                    "type": "Ext.button.Button",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "iconCls": "x-fa fa-plus",
                        "layout|flex": null,
                        "layout|margins": "",
                        "margin": "0 10",
                        "text": "",
                        "width": "10%"
                    },
                    "configAlternates": {
                        "iconCls": "string",
                        "layout|flex": "number",
                        "layout|margins": "string",
                        "margin": "auto",
                        "text": "string",
                        "width": "auto"
                    },
                    "name": "MyButton",
                    "designerId": "bf2904cb-ae13-40a5-a126-7497abb01d14",
                    "cn": [
                        {
                            "type": "fixedfunction",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "designer|params": [
                                    "button",
                                    "e"
                                ],
                                "fn": "handler",
                                "implHandler": [
                                    "var formWrapper = this.up('[cls=formpanel]');",
                                    "formWrapper.dropdownId = \"fieldPeriodo\";",
                                    "f_crud.openNestedForm('CampaniasPanel');"
                                ]
                            },
                            "configAlternates": {
                                "designer|params": "typedarray",
                                "fn": "string",
                                "implHandler": "code"
                            },
                            "name": "handler",
                            "designerId": "04964a86-feb9-40ae-bdb8-a1e55bc1ea63"
                        }
                    ]
                }
            ]
        },
        {
            "type": "Ext.form.field.Date",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "allowBlank": false,
                "altFormats": "",
                "blankText": "Este campo es obligatorio",
                "enableKeyEvents": true,
                "fieldLabel": "Desde*",
                "format": "d-m-Y",
                "invalidText": "{0} No es un formato valido de fecha - Deberia tener el formato {1}",
                "itemId": "desde",
                "layout|flex": null,
                "name": "desde"
            },
            "configAlternates": {
                "allowBlank": "boolean",
                "blankText": "string",
                "fieldLabel": "string",
                "invalidText": "string",
                "itemId": "string",
                "layout|flex": "number",
                "name": "string",
                "format": "string",
                "altFormats": "string",
                "enableKeyEvents": "boolean"
            },
            "name": "MyDateField",
            "designerId": "e1f219ad-67f3-446c-8a81-cda5a9a70650"
        },
        {
            "type": "Ext.form.field.Date",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "allowBlank": false,
                "blankText": "Este campo es obligatorio",
                "enableKeyEvents": true,
                "fieldLabel": "hasta*",
                "format": "d-m-Y",
                "invalidText": "{0} No es un formato valido de fecha - Deberia tener el formato {1}",
                "itemId": "hasta",
                "layout|flex": null,
                "name": "hasta"
            },
            "configAlternates": {
                "allowBlank": "boolean",
                "blankText": "string",
                "fieldLabel": "string",
                "invalidText": "string",
                "itemId": "string",
                "layout|flex": "number",
                "name": "string",
                "format": "string",
                "enableKeyEvents": "boolean"
            },
            "name": "MyDateField1",
            "designerId": "6bcf2a7f-5570-4359-8df3-c65e8f053c99"
        },
        {
            "type": "Ext.form.field.Display",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "cls": [
                    "warning-message"
                ],
                "fieldLabel": null,
                "itemId": "warning-message",
                "layout|flex": null,
                "value": ""
            },
            "configAlternates": {
                "cls": "typedarray",
                "fieldLabel": "string",
                "itemId": "string",
                "layout|flex": "number",
                "value": "string"
            },
            "name": "MyDisplayField",
            "designerId": "e582fb26-882a-4976-87c1-dfcfbb7f869b"
        },
        {
            "type": "Ext.container.Container",
            "reference": {
                "name": "dockedItems",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "container|align": "stretch",
                "container|pack": "center",
                "dock": "bottom",
                "layout": "hbox",
                "layout|flex": 1
            },
            "configAlternates": {
                "container|align": "string",
                "container|pack": "string",
                "dock": "string",
                "layout": "string",
                "layout|flex": "number"
            },
            "name": "MyContainer",
            "designerId": "2a123ff6-fce5-46a5-8309-1bf441bc45ba",
            "cn": [
                {
                    "type": "Ext.button.Button",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "iconCls": "x-fa fa-check",
                        "layout|flex": null,
                        "layout|margins": "",
                        "margin": 10,
                        "text": "Aceptar"
                    },
                    "configAlternates": {
                        "iconCls": "string",
                        "layout|flex": "number",
                        "layout|margins": "string",
                        "margin": "auto",
                        "text": "string"
                    },
                    "name": "MyButton3",
                    "designerId": "ce8f048e-c7ad-42aa-acaa-9fbec558a3ba",
                    "cn": [
                        {
                            "type": "fixedfunction",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "designer|params": [
                                    "button",
                                    "e"
                                ],
                                "fn": "handler",
                                "implHandler": [
                                    "var formWrapper = this.up(\"[cls=formpanel]\"),",
                                    "    desde = formWrapper.down(\"#desde\").value,",
                                    "    hasta = formWrapper.down(\"#hasta\").value,",
                                    "    warning = \"<b>Importante</b>: el valor del campo <i>Desde</i> debería ser antes que <i>Hasta</i>\";",
                                    "if(desde <= hasta){",
                                    "  formWrapper.down(\"[cls=warning-message]\").setValue(\"\");",
                                    "  if(formWrapper.getForm().isValid()) {",
                                    "    f_crud.save_form(formWrapper);",
                                    "  }",
                                    "}",
                                    "else {",
                                    "  formWrapper.down(\"[cls=warning-message]\").setValue(warning);",
                                    "}"
                                ]
                            },
                            "configAlternates": {
                                "designer|params": "typedarray",
                                "fn": "string",
                                "implHandler": "code"
                            },
                            "name": "handler",
                            "designerId": "b94b84df-c1fd-4d43-b03c-0755bb2afafb"
                        }
                    ]
                },
                {
                    "type": "Ext.button.Button",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "iconCls": "x-fa fa-remove",
                        "layout|flex": null,
                        "margin": 10,
                        "text": "Cancelar"
                    },
                    "configAlternates": {
                        "iconCls": "string",
                        "layout|flex": "number",
                        "margin": "auto",
                        "text": "string"
                    },
                    "name": "MyButton4",
                    "designerId": "745d1382-09f3-4440-9dbb-c75cfa5a7ee6",
                    "cn": [
                        {
                            "type": "fixedfunction",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "designer|params": [
                                    "button",
                                    "e"
                                ],
                                "fn": "handler",
                                "implHandler": [
                                    "f_crud.close_form(this.up(\"[cls=formpanel]\"));"
                                ]
                            },
                            "configAlternates": {
                                "designer|params": "typedarray",
                                "fn": "string",
                                "implHandler": "code"
                            },
                            "name": "handler",
                            "designerId": "91457055-452e-4b07-aaeb-1467613f1b64"
                        }
                    ]
                }
            ]
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onFormActivate",
                "implHandler": [
                    "f_crud.setFormTitle(component, true);"
                ],
                "name": "activate",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onFormActivate",
            "designerId": "2f439667-d3fa-4ce1-9d55-23cc9720cb0a"
        }
    ]
}