Build editable HTML5 form designer
CI / python (push) Has been cancelled
CI / rust (push) Has been cancelled

This commit is contained in:
2026-05-21 04:51:13 +03:00
parent 1b2721e2b7
commit e546985843
7 changed files with 409 additions and 36 deletions
@@ -58,6 +58,7 @@ from api_server.html5_forms import (
from api_server.html5_editor_controller import (
html5_editor_page as _html5_editor_page,
html5_form_editor_page as _html5_form_editor_page,
html5_form_editor_preview as _html5_form_editor_preview,
html5_object_context_fragment as _html5_object_context_fragment,
)
from api_server.html5_project_controller import (
@@ -1441,6 +1442,20 @@ async def html5_project_form_editor(project_id: str, form: str | None = None) ->
)
@app.post("/html5/projects/{project_id}/forms/editor/preview")
async def html5_project_form_editor_preview(project_id: str, request: Request) -> Response:
form = await _html5_form_data(request)
return _html5_response(
_html5_form_editor_preview(
project_id=project_id,
form=form,
project_snapshot=_project_snapshot_or_404,
form_semantics_items=form_semantics,
form_semantics_response=_form_semantics_response,
)
)
@app.get("/html5/projects/{project_id}/events")
async def html5_project_events(project_id: str, once: bool = False) -> StreamingResponse:
return _html5_sse_response(