+++
title = "Implement Submit page (/submit) — quote creation form, display returned auth_code on success"
priority = 5
status = "in_progress"
ticket_type = "task"
dependencies = ["04f865", "1e6a09", "fc2f51", "0fbdd5"]
+++
The `quotesdb` UI is a Yew (Rust → Wasm) single-page app compiled by Trunk and hosted on Cloudflare Pages. It communicates with the backend API via `fetch` calls. Source lives in `src/bin/ui/`. Run with `trunk serve` for local development.
The Submit page (`/submit`) provides a form for creating a new quote. On success, it displays the returned auth code prominently so the user can save it.
Implement the Submit page component (`src/bin/ui/pages/submit.rs`):
1. Render a form with fields: text (textarea), author, source (optional), date (optional), tags (comma-separated input), auth code (optional)
2. On submit, call `PUT /api/quotes` via the API client
3. On 201 success: show a success message and display the returned auth code in a copyable box
4. On error: render `ErrorDisplay` with the error message
- The auth code returned must be displayed clearly — it cannot be recovered after the user leaves this page.
- Validate client-side: text and author are required (non-empty) before submitting.
- Parse the tags input by splitting on commas and trimming whitespace.
From the `quotesdb/` directory:
```sh
trunk build
```
`feat(quotesdb): implement Submit page — new quote form with auth code display`