hermes-web-cli/wwwroot/new_session.ui
yumoqing 1fe8bb0027 fix(new_session.ui): correct Form field configuration per bricks-framework spec
- Replace 'select' uitype with 'code' uitype
- Use data_url instead of options.url for dynamic data loading
- Add valueField and textField to map backend response fields
- Fix URL path to /hermes-web-cli/hermes_services/list/
- Complies with module-development-spec and bricks-framework requirements
2026-04-23 18:33:28 +08:00

65 lines
1.5 KiB
XML

{
"widgettype": "VBox",
"id": "new-session-container",
"options": {
"width": "100%",
"height": "100%",
"padding": "20px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "Create New Session",
"fontSize": "24px",
"fontWeight": "bold",
"color": "#F8FAFC",
"marginBottom": "20px"
}
},
{
"widgettype": "Form",
"id": "new-session-form",
"options": {
"width": "100%",
"maxWidth": "600px",
"fields": [
{
"uitype": "code",
"name": "service_id",
"label": "Select Service",
"required": true,
"placeholder": "Choose a Hermes service",
"data_url": "/hermes-web-cli/hermes_services/list/",
"valueField": "value",
"textField": "text"
}
]
},
"binds": [
{
"wid": "self",
"event": "submit",
"actiontype": "urlwidget",
"target": "app.main-content",
"options": {
"url": "{{entire_url('sessions/create_session.dspy')}}",
"method": "POST",
"params": "{{ 'new-session-form'.data }}"
},
"mode": "replace"
},
{
"wid": "self",
"event": "cancel",
"actiontype": "urlwidget",
"target": "app.main-content",
"options": {
"url": "{{entire_url('index.ui')}}"
},
"mode": "replace"
}
]
}
]
}