* [yew-devel] [PATCH yew-comp] user panel: don't submit raw "expire" field
@ 2025-12-15 13:39 Shannon Sterz
2025-12-16 16:57 ` [yew-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Shannon Sterz @ 2025-12-15 13:39 UTC (permalink / raw)
To: yew-devel
the api expects a unix timestamp here, but submitting the raw field
will submit a rfc3999 timestamp. this happens when a user has expire
set and is updated, but the expire field itself isn't changed. the ui
would then submit the raw expire field. to fix this, don't submit the
field by itself.
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
src/user_panel.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/user_panel.rs b/src/user_panel.rs
index f7af395..44d934f 100644
--- a/src/user_panel.rs
+++ b/src/user_panel.rs
@@ -532,7 +532,8 @@ fn add_user_input_panel(form_ctx: &FormContext) -> Html {
tr!("Expire"),
Field::new()
.name("expire")
- .input_type(InputType::DatetimeLocal),
+ .input_type(InputType::DatetimeLocal)
+ .submit(false),
)
.with_field(tr!("Enabled"), Checkbox::new().name("enable").default(true))
.with_right_field(tr!("First name"), Field::new().name("firstname"))
@@ -559,7 +560,8 @@ fn edit_user_input_panel(_form_ctx: &FormContext) -> Html {
tr!("Expire"),
Field::new()
.name("expire")
- .input_type(InputType::DatetimeLocal),
+ .input_type(InputType::DatetimeLocal)
+ .submit(false),
)
.with_right_field(tr!("Last name"), Field::new().name("lastname"))
.with_field(tr!("EMail"), Field::new().name("email"))
--
2.47.3
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [yew-devel] applied: [PATCH yew-comp] user panel: don't submit raw "expire" field
2025-12-15 13:39 [yew-devel] [PATCH yew-comp] user panel: don't submit raw "expire" field Shannon Sterz
@ 2025-12-16 16:57 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-12-16 16:57 UTC (permalink / raw)
To: yew-devel, Shannon Sterz
On Mon, 15 Dec 2025 14:39:51 +0100, Shannon Sterz wrote:
> the api expects a unix timestamp here, but submitting the raw field
> will submit a rfc3999 timestamp. this happens when a user has expire
> set and is updated, but the expire field itself isn't changed. the ui
> would then submit the raw expire field. to fix this, don't submit the
> field by itself.
>
>
> [...]
Applied, thanks!
[1/1] user panel: don't submit raw "expire" field
commit: 808a5c0c6a8a4c7ec5a285c9d585425e98d84f6b
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-16 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-15 13:39 [yew-devel] [PATCH yew-comp] user panel: don't submit raw "expire" field Shannon Sterz
2025-12-16 16:57 ` [yew-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.