pub struct DetailFormProps {
pub mode: EditMode,
pub action: Action,
pub fields: Vec<DetailField>,
pub edit_url: String,
pub cancel_url: String,
pub edit_label: Option<String>,
pub save_label: Option<String>,
pub cancel_label: Option<String>,
pub method: Option<HttpMethod>,
}Expand description
Props for crate::Component::DetailForm.
Renders a description-list-style block in two modes — View and Edit —
driven by the mode field. The outer scaffold (<dl> + rows) is
byte-for-byte identical across modes per the structural coherence
contract (147-UI-SPEC §5); only the inner <dd> content and the
action bar differ. Edit mode additionally wraps the scaffold in a
<form> with method spoofing for PUT/PATCH/DELETE.
Mode is URL-driven (server-side only) — no JavaScript. Callers
typically derive mode via EditMode::from_query on
req.query("mode").as_deref().
Fields§
§mode: EditModeWhich mode to render. Defaults to EditMode::View.
action: ActionForm submit target (used only in Edit mode; resolver populates action.url).
fields: Vec<DetailField>The rows.
edit_url: StringHref for the “Modifica” button (View mode only). Emitted verbatim after html_escape.
cancel_url: StringHref for the “Annulla” button (Edit mode only). Emitted verbatim after html_escape.
edit_label: Option<String>Override for the default “Modifica” label.
save_label: Option<String>Override for the default “Salva” label.
cancel_label: Option<String>Override for the default “Annulla” label.
method: Option<HttpMethod>Override for the form tag’s HTTP method (mirrors FormProps::method).
Unset means use action.method.
Trait Implementations§
Source§impl Clone for DetailFormProps
impl Clone for DetailFormProps
Source§fn clone(&self) -> DetailFormProps
fn clone(&self) -> DetailFormProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DetailFormProps
impl Debug for DetailFormProps
Source§impl<'de> Deserialize<'de> for DetailFormProps
impl<'de> Deserialize<'de> for DetailFormProps
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DetailFormProps
impl PartialEq for DetailFormProps
Source§fn eq(&self, other: &DetailFormProps) -> bool
fn eq(&self, other: &DetailFormProps) -> bool
self and other values to be equal, and is used by ==.