+ return (
+
+
+
+ {
+ if (
+ !isDisabled
+ ) {
+ form.setValue(
+ "requireTwoFactor",
+ val
+ );
+ }
+ }}
+ />
+
+
+
+
+ {t(
+ "requireTwoFactorDescription"
+ )}
+
+
+ );
+ }}
+ />
+
{
+ const isDisabled =
+ isSecurityFeatureDisabled();
+
+ return (
+
+
+ {t(
+ "maxSessionLength"
+ )}
+
- {
if (
!isDisabled
) {
+ const numValue =
+ value ===
+ "null"
+ ? null
+ : parseInt(
+ value,
+ 10
+ );
form.setValue(
- "requireTwoFactor",
- val
+ "maxSessionLengthHours",
+ numValue
);
}
}}
- />
+ disabled={
+ isDisabled
+ }
+ >
+
+
+
+
+ {SESSION_LENGTH_OPTIONS.map(
+ (
+ option
+ ) => (
+
+ {t(
+ option.labelKey
+ )}
+
+ )
+ )}
+
+
-
-