mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-10 17:43:15 +00:00
dont set whitelist until click set button in dialog
This commit is contained in:
@@ -207,19 +207,11 @@ export function PolicyAuthStackSectionCreate({
|
||||
active={Boolean(emailWhitelistEnabled)}
|
||||
onConfigure={() => setEditingMethod("email")}
|
||||
onToggle={(active) =>
|
||||
handleToggle(
|
||||
"email",
|
||||
active,
|
||||
() =>
|
||||
parentForm.setValue(
|
||||
"emailWhitelistEnabled",
|
||||
false
|
||||
),
|
||||
() =>
|
||||
parentForm.setValue(
|
||||
"emailWhitelistEnabled",
|
||||
true
|
||||
)
|
||||
handleToggle("email", active, () =>
|
||||
parentForm.setValue(
|
||||
"emailWhitelistEnabled",
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
disabled={!emailEnabled}
|
||||
@@ -266,12 +258,13 @@ export function PolicyAuthStackSectionCreate({
|
||||
onOpenChange={(open) => !open && closeCredenza()}
|
||||
emailEnabled={emailEnabled}
|
||||
emails={emails}
|
||||
onSave={(value) =>
|
||||
onSave={(value) => {
|
||||
parentForm.setValue(
|
||||
"emails",
|
||||
value as PolicyFormValues["emails"]
|
||||
)
|
||||
}
|
||||
);
|
||||
parentForm.setValue("emailWhitelistEnabled", true);
|
||||
}}
|
||||
/>
|
||||
|
||||
<HeaderAuthCredenza
|
||||
|
||||
@@ -684,19 +684,11 @@ export function PolicyAuthStackSectionEdit({
|
||||
openMethodEditor("email")
|
||||
}
|
||||
onToggle={(active) =>
|
||||
handleToggle(
|
||||
"email",
|
||||
active,
|
||||
() =>
|
||||
form.setValue(
|
||||
"emailWhitelistEnabled",
|
||||
false
|
||||
),
|
||||
() =>
|
||||
form.setValue(
|
||||
"emailWhitelistEnabled",
|
||||
true
|
||||
)
|
||||
handleToggle("email", active, () =>
|
||||
form.setValue(
|
||||
"emailWhitelistEnabled",
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
disabled={authReadonly || !emailEnabled}
|
||||
@@ -761,7 +753,10 @@ export function PolicyAuthStackSectionEdit({
|
||||
emailEnabled={emailEnabled}
|
||||
disabled={authReadonly}
|
||||
emails={emails}
|
||||
onSave={(value) => form.setValue("emails", value)}
|
||||
onSave={(value) => {
|
||||
form.setValue("emails", value);
|
||||
form.setValue("emailWhitelistEnabled", true);
|
||||
}}
|
||||
/>
|
||||
|
||||
<HeaderAuthCredenza
|
||||
|
||||
Reference in New Issue
Block a user