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 {