From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH yew-comp v2 6/6] auth_edit_ldap: improve form layout and placeholders
Date: Mon, 22 Sep 2025 17:05:13 +0200 [thread overview]
Message-ID: <20250922150519.399573-8-s.sterz@proxmox.com> (raw)
In-Reply-To: <20250922150519.399573-1-s.sterz@proxmox.com>
make certain field large as they may contain too much information to
fit into a small field. also switches usages of `company.net` to
`exmaple.com` in compliance with rfc2606 [1]. also hides the bind dn's
placeholder if anonymous search is enabled to not give the impression
that a default value is used for the bind dn.
[1]: https://datatracker.ietf.org/doc/html/rfc2606
Suggested-by: Christoph Hess <c.heiss@proxmox.com>
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
src/auth_edit_ldap.rs | 78 +++++++++++++++++++++++--------------------
1 file changed, 42 insertions(+), 36 deletions(-)
diff --git a/src/auth_edit_ldap.rs b/src/auth_edit_ldap.rs
index 70fb638..19ca02e 100644
--- a/src/auth_edit_ldap.rs
+++ b/src/auth_edit_ldap.rs
@@ -236,17 +236,23 @@ fn render_sync_form(_form_ctx: FormContext, _props: AuthEditLDAP) -> Html {
.padding_top(2)
.with_child(tr!("Remove Vanished Options")),
)
- .with_field(
- tr!("Remove ACLs of vanished users"),
- Checkbox::new().name("remove-vanished-acl"),
+ .with_large_field(
+ tr!("ACLs"),
+ Checkbox::new()
+ .name("remove-vanished-acl")
+ .box_label(tr!("Remove ACLs of vanished users.")),
)
- .with_field(
- tr!("Remove vanished user"),
- Checkbox::new().name("remove-vanished-entry"),
+ .with_large_field(
+ tr!("Entries"),
+ Checkbox::new()
+ .name("remove-vanished-entry")
+ .box_label(tr!("Remove vanished user")),
)
- .with_field(
- tr!("Remove vanished properties"),
- Checkbox::new().name("remove-vanished-properties"),
+ .with_large_field(
+ tr!("Properties"),
+ Checkbox::new()
+ .name("remove-vanished-properties")
+ .box_label(tr!("Remove vanished properties")),
)
.into()
}
@@ -281,16 +287,23 @@ fn render_general_form(form_ctx: FormContext, props: AuthEditLDAP) -> Html {
.submit(!is_edit),
)
.with_right_field(tr!("Server"), Field::new().name("server1").required(true))
- .with_field(tr!("Default Realm"), Checkbox::new().name("default"));
+ .with_field(
+ tr!("Port"),
+ Number::<u16>::new()
+ .name("port")
+ .placeholder(tr!("Default"))
+ .min(1),
+ )
+ .with_right_field(tr!("Fallback Server"), Field::new().name("server2"));
if !props.ad_realm.unwrap_or_default() {
input_panel = input_panel
- .with_field(
+ .with_large_field(
tr!("Base Domain Name"),
Field::new()
.name("base-dn")
.required(true)
- .placeholder("cn=Users,dc=company,dc=net"),
+ .placeholder("cn=Users,dc=example,dc=com"),
)
.with_field(
tr!("User Attribute Name"),
@@ -302,21 +315,6 @@ fn render_general_form(form_ctx: FormContext, props: AuthEditLDAP) -> Html {
}
input_panel
- .with_right_field(tr!("Fallback Server"), Field::new().name("server2"))
- .with_right_field(
- tr!("Port"),
- Number::<u16>::new()
- .name("port")
- .placeholder(tr!("Default"))
- .min(1),
- )
- .with_field(
- tr!("Anonymous Search"),
- Checkbox::new()
- .name("anonymous_search")
- .submit(false)
- .default(true),
- )
.with_right_field(
tr!("Mode"),
Combobox::new()
@@ -334,24 +332,32 @@ fn render_general_form(form_ctx: FormContext, props: AuthEditLDAP) -> Html {
html! {text}
}),
)
+ .with_right_field(
+ tr!("Verify Certificate"),
+ Checkbox::new().name("verify").disabled(!tls_enabled),
+ )
+ .with_field(tr!("Default Realm"), Checkbox::new().name("default"))
.with_field(
+ tr!("Anonymous Search"),
+ Checkbox::new()
+ .name("anonymous_search")
+ .submit(false)
+ .default(true),
+ )
+ .with_large_field(
tr!("Bind Domain Name"),
Field::new()
.name("bind-dn")
.required(!anonymous_search)
.disabled(anonymous_search)
- .placeholder(
+ .placeholder((!anonymous_search).then(|| {
props
.ad_realm
- .map(|_| "user@company.net")
- .unwrap_or("cn=user,dc=company,dc=net"),
- ),
+ .map(|_| "user@example.com")
+ .unwrap_or("cn=user,dc=example,dc=com")
+ })),
)
- .with_right_field(
- tr!("Verify Certificate"),
- Checkbox::new().name("verify").disabled(!tls_enabled),
- )
- .with_field(
+ .with_large_field(
tr!("Bind Password"),
Field::new()
.name("password")
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-09-22 15:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 15:05 [pdm-devel] [PATCH datacenter-manager/proxmox/yew-comp v2 00/13] Add LDAP and AD realm support to Proxmox Datacenter Manager Shannon Sterz
2025-09-22 15:05 ` [pdm-devel] [PATCH proxmox v2 1/1] ldap: add types and sync features Shannon Sterz
2025-09-22 18:28 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH yew-comp v2 1/6] auth_view: add default column and allow setting ldap realms as default Shannon Sterz
2025-09-22 19:00 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH yew-comp v2 2/6] utils: add pdm realm to `get_auth_domain_info` Shannon Sterz
2025-09-22 19:00 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH yew-comp v2 3/6] auth_view/auth_edit_ldap: add support for active directory realms Shannon Sterz
2025-09-22 19:00 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH yew-comp v2 4/6] auth_edit_ldap: add helpers to properly edit ad & ldap realms Shannon Sterz
2025-09-22 19:00 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH yew-comp v2 5/6] auth_view: implement syncing ldap and ad realms Shannon Sterz
2025-09-22 19:00 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` Shannon Sterz [this message]
2025-09-22 19:00 ` [pdm-devel] applied: [PATCH yew-comp v2 6/6] auth_edit_ldap: improve form layout and placeholders Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH datacenter-manager v2 1/6] config: add domain config plugins for ldap and ad realms Shannon Sterz
2025-09-22 19:03 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH datacenter-manager v2 2/6] server: add ldap and active directory authenticators Shannon Sterz
2025-09-22 19:03 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH datacenter-manager v2 3/6] server: api: add api endpoints for configuring ldap & ad realms Shannon Sterz
2025-09-22 19:03 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH datacenter-manager v2 4/6] api/auth: add endpoint to start ldap sync jobs Shannon Sterz
2025-09-22 19:03 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH datacenter-manager v2 5/6] ui: add a panel to allow handling realms Shannon Sterz
2025-09-22 19:03 ` [pdm-devel] applied: " Thomas Lamprecht
2025-09-22 15:05 ` [pdm-devel] [PATCH datacenter-manager v2 6/6] ui: make the user tab reload when re-opened Shannon Sterz
2025-09-22 19:03 ` [pdm-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250922150519.399573-8-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.