From 62ae1d73fad9705cf4b99bc542fe81578903c38c Mon Sep 17 00:00:00 2001 From: josef <85705852+jisef@users.noreply.github.com> Date: Wed, 24 Dec 2025 22:53:17 +0100 Subject: [PATCH] app: asterisk for mail attribute when creating a user --- app/src/components/create_user.rs | 4 ++++ app/src/components/form/attribute_input.rs | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/src/components/create_user.rs b/app/src/components/create_user.rs index 5f1fea5..30e69e5 100644 --- a/app/src/components/create_user.rs +++ b/app/src/components/create_user.rs @@ -304,11 +304,14 @@ impl Component for CreateUserForm { } fn get_custom_attribute_input(attribute_schema: &Attribute) -> Html { + let mail_is_required = attribute_schema.name.as_str() == "mail"; + if attribute_schema.is_list { html! { } } else { @@ -316,6 +319,7 @@ fn get_custom_attribute_input(attribute_schema: &Attribute) -> Html { } } diff --git a/app/src/components/form/attribute_input.rs b/app/src/components/form/attribute_input.rs index 04e6e08..66a5dc0 100644 --- a/app/src/components/form/attribute_input.rs +++ b/app/src/components/form/attribute_input.rs @@ -45,6 +45,8 @@ fn attribute_input(props: &AttributeInputProps) -> Html { #[derive(Properties, PartialEq)] struct AttributeLabelProps { pub name: String, + #[prop_or(false)] + pub required: bool, } #[function_component(AttributeLabel)] fn attribute_label(props: &AttributeLabelProps) -> Html { @@ -66,7 +68,9 @@ fn attribute_label(props: &AttributeLabelProps) -> Html {