{ "widgettype": "VBox", "options": { "width": "100%", "height": "100%", "padding": "20px" }, "subwidgets": [ { "widgettype": "Text", "options": { "text": "Add New Service", "fontSize": "24px", "fontWeight": "bold", "marginBottom": "20px", "color": "#F8FAFC" } }, { "widgettype": "Form", "id": "add-service-form", "options": { "fields": [ { "name": "name", "label": "Service Name", "uitype": "str", "required": true, "placeholder": "Enter service name" }, { "name": "url", "label": "Service URL", "uitype": "str", "required": true, "placeholder": "http://localhost:8080" }, { "name": "description", "label": "Description", "uitype": "str", "placeholder": "Optional description" } ] } }, { "widgettype": "HBox", "options": { "width": "100%", "height": "auto", "marginTop": "20px", "gap": "10px" }, "subwidgets": [ { "widgettype": "Button", "options": { "icon": "fa fa-plus", "bgcolor": "#22C55E", "color": "#FFFFFF", "border": "none", "borderRadius": "6px", "padding": "10px 20px", "label": "Add Service" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "registerfunction", "target": "app.main-content", "rfname": "add_service", "params": { "form_data": "{{ 'add-service-form'.data }}" } } ] }, { "widgettype": "Button", "options": { "bgcolor": "#64748B", "color": "#FFFFFF", "border": "none", "borderRadius": "6px", "padding": "10px 20px", "label": "Cancel" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.main-content", "options": { "url": "{{entire_url('services.ui')}}" }, "mode": "replace" } ] } ] } ] }