Who is here on the wordmark's line; every form carries a signed-in person's name and address
Test / test (pull_request) Successful in 1m6s
Test / test (pull_request) Successful in 1m6s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GT37Z1Xtfd9pUuQtMTg6Yt
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9b50c9cab8
commit
78f42e6f8a
@@ -1953,13 +1953,12 @@ fn form_alternative(plan: &Plan, need: &PlanNeed, w: &Value, action: &str) -> Va
|
||||
if f.multiple { r["multiple"] = json!(true); }
|
||||
let hint = s(&w["hints"][&f.name]).trim();
|
||||
if !hint.is_empty() && f.kind != "select" { r["placeholder"] = json!(hint); }
|
||||
// Someone signed in is not asked for what the site knows: on a
|
||||
// group's page they always are, and answering a record they
|
||||
// may be.
|
||||
if parent.is_some() || need.enters_as.is_some() {
|
||||
if f.kind == "email" && matches!(f.name.as_str(), "email" | "epost" | "e-post") { r["value"] = json!("{user.email}"); }
|
||||
if f.kind == "text" && matches!(f.name.as_str(), "name" | "navn") { r["value"] = json!("{user.name}"); }
|
||||
}
|
||||
// Someone signed in is not asked for what the site knows, on any
|
||||
// form: portal carries their name and address and the fields take
|
||||
// no room (`content::fill_from_user`). A visitor sees the fields
|
||||
// as usual, so a public form loses nothing by it.
|
||||
if f.kind == "email" && matches!(f.name.as_str(), "email" | "epost" | "e-post") { r["value"] = json!("{user.email}"); }
|
||||
if f.kind == "text" && matches!(f.name.as_str(), "name" | "navn") { r["value"] = json!("{user.name}"); }
|
||||
r
|
||||
}).collect();
|
||||
// The record this answer is about, carried in from the page's own
|
||||
|
||||
Reference in New Issue
Block a user