Operator guideENcontentform

Content / Form

Create and edit workflow for legacy content pages, including localized title/content and active visibility.

Reader view

Clean portal guidance

This page keeps the operator explanation, field and action descriptions, and screenshots visible without exposing repo paths, raw sidecars, or editorial-only implementation details.

Narrative content

Page body

What this form does

This pack covers the legacy CMS page create and edit routes under /content.

  • create route: /content/create
  • edit route: /content/edit/[cmsPageId]

Both routes use the same PageEditor shell, but create and edit have different bootstrap and submit behavior.

What operators manage here

  • Slug for the route fragment.
  • Category from the static legacy category list:
    • Support
    • About
    • Responsible Gaming
  • Status as the active/inactive visibility switch.
  • Active language tabs loaded from GET /api/admin/get-languages?active=true.
  • Localized Content on the selected language tab.
  • Localized Title where the current FE actually renders the title input for the selected language.

Create vs edit

Create

  • Starts with blank values, active status enabled, and EN as the initial tab.
  • Create posts directly to POST /api/admin/create-cms.
  • Successful create shows a success toast and resets the form in place.
  • The operator stays on the create route after submit.

Edit

  • Loads one existing page through GET /api/admin/get-cms-details?cmsPageId=<id>.
  • Save writes through PUT /api/admin/update-cms.
  • Successful save shows a success toast and keeps the operator on the same edit route.

Common confusion

This form does not have a separate publish step. Saving the form writes directly to the admin-owned CMS page record. The only visibility control in this flow is isActive.

Important caveats

  • Cancel is a fixed link to /content, not router.back().
  • The legacy category selector is FE-owned and uses a static option map rather than backend-loaded category metadata.
  • The current PageEditor only renders the visible Title input when title[currentTab] is already truthy in the FE state. Empty or missing locale keys therefore do not expose a standalone title box on that tab.
Calculation notes

Calculations

calculation

Create vs edit submit behaviour

Logic
Create mode submits to `POST /api/admin/create-cms`, shows a success toast, and resets the form in place., Edit mode submits to `PUT /api/admin/update-cms`, shows a success toast, and keeps the operator on the same edit route., Neither mode has a separate publish step.
calculation

Static category selector

Logic
The category selector is FE-owned through `PageCategorySelect`., The visible choices are the static values `Support`, `About`, and `Responsible Gaming`., No backend category-options endpoint is used on this surface.
calculation

Active language tabs

Logic
Language tabs are built from `GET /api/admin/get-languages?active=true`., The shared editor switches localized values by current tab code.
calculation

Title visibility gate

Logic
`PageEditor` only renders the visible `Title` input when `title[currentTab]` is truthy., Empty or missing locale keys therefore do not show a standalone title field on that tab in the current FE.
calculation

Cancel navigation

Logic
Both create and edit surfaces render `Cancel` as a link to `/content`., The form does not use `router.back()` for cancel.
calculation

Create route read-hook caveat

Logic
`CreatePageForm` still instantiates `useCMSPageDetails` with `pageId = Number(router.query.cmsPageId)`., On the verified create route that value is `NaN`, so the read hook does not provide meaningful create bootstrap data.
Field dictionary

Fields

field

Slug

Route fragment for the content page.

Group
identity
Data Type
string
Editable
true
field

Category

Legacy content classification used by this editor.

Group
identity
Data Type
enum
Editable
true
Caveats
FE renders a static selector with `Support`, `About`, and `Responsible Gaming`.
field

Status

Active/inactive switch for the page record.

Group
status
Data Type
boolean
Editable
true
field

Language Tabs

Switches the form between localized title and content values.

Group
localization
Data Type
tabs
field

Title

Localized title for the currently selected language tab.

Group
localization
Data Type
string
Editable
true
Caveats
The current FE only renders the title input when `title[currentLanguage]` is already truthy in form state.
field

Content

Localized HTML body edited through the shared page editor.

Group
localization
Data Type
html
Editable
true
Operational notes

Notes

item

FE create and edit routes are mapped as one logical form surface, but create resets in place after submit while edit stays on the current detail route after save.

item

There is no separate publish endpoint in the current `/content` flow. Save writes directly through `create-cms` and `update-cms`.

item

The category selector is FE-owned and uses the static `PageCategorySelect` map rather than backend-loaded category metadata.

item

Active language tabs are loaded through `GET /api/admin/get-languages?active=true`.

item

The create route still instantiates `useCMSPageDetails` with `pageId = Number(router.query.cmsPageId)`, which becomes `NaN` on the verified create route. That transport call does not provide useful bootstrap data for create mode.

Related references

Related pages

pageContent

Legacy content CRUD workflow for create, edit, view, and visibility changes under `/content`.

pageContent / List

Legacy content inventory with search, active/inactive filtering, and navigation into create, edit, and view flows.

pageContent / View

Read-only inspection surface for one admin-owned CMS page record.

pageAffiliate Deals / Form

Create and edit form for affiliate deals, including PID, date window, commercial terms, and responsible person.

pageAffiliate Payment Settings / Form

Create and edit form for one affiliate payment-setting record, with visible PID targeting, minimum deposit threshold, and active-state control.

pageAuto Tags Manager / Create

Full rule-builder for a new automatic tagging rule, including tag actions, coupon actions, KPI field selection, and draft impact estimation.