{
- setReturnToURLS(url);
-
- if (initialValues
- ?.singleLogoutProfile
- ?.idpInitiatedSingleLogout?.returnToUrls?.toString() !== url) {
- setIsFormStale(true);
- }
- } }
- labelName={
- t("applications:forms.inboundSAML.sections" +
- ".idpInitiatedSLO.fields.returnToURLs.label")
- }
- value={
- initialValues?.singleLogoutProfile.idpInitiatedSingleLogout.returnToUrls.toString()
- }
- placeholder={
- t("applications:forms.inboundSAML.sections" +
- ".idpInitiatedSLO.fields.returnToURLs.placeholder")
- }
- validationErrorMsg={
- t("applications:forms.inboundSAML.sections" +
- ".idpInitiatedSLO.fields.returnToURLs.validations.invalid")
- }
- validation={ (value: string) => {
-
- let label: ReactElement = null;
-
- if (!URLUtils.isHttpUrl(value) && !URLUtils.isHttpsUrl(value)) {
- label = (
-
- );
- }
+
+
+ {
+ setReturnToURLS(url);
- if (!URLUtils.isMobileDeepLink(value)) {
- return false;
- }
+ if (initialValues
+ ?.singleLogoutProfile
+ ?.idpInitiatedSingleLogout?.returnToUrls?.toString() !== url) {
+ setIsFormStale(true);
+ }
+ } }
+ labelName={
+ t("applications:forms.inboundSAML.sections" +
+ ".idpInitiatedSLO.fields.returnToURLs.label")
+ }
+ value={
+ initialValues?.singleLogoutProfile.idpInitiatedSingleLogout
+ .returnToUrls.toString()
+ }
+ placeholder={
+ t("applications:forms.inboundSAML.sections" +
+ ".idpInitiatedSLO.fields.returnToURLs.placeholder")
+ }
+ validationErrorMsg={
+ t("applications:forms.inboundSAML.sections" +
+ ".idpInitiatedSLO.fields.returnToURLs.validations.invalid")
+ }
+ validation={ (value: string) => {
+
+ let label: ReactElement = null;
- setReturnToURLsErrorLabel(label);
-
- return true;
- } }
- showError={ returnToURLSError }
- setShowError={ setReturnToURLSError }
- disabled={ !isIdpInitiatedSingleLogoutEnabled || !isSingleLogoutProfileEnabled }
- readOnly={ readOnly }
- addURLTooltip={ t("common:addURL") }
- duplicateURLErrorMessage={ t("common:duplicateURLError") }
- data-testid={ `${ testId }-return-to-urls-input` }
- showPredictions={ false }
- customLabel={ returnToURLsErrorLabel }
- popupHeaderPositive={ t("applications:URLInput.withLabel."
- + "positive.header") }
- popupHeaderNegative={ t("applications:URLInput.withLabel."
- + "negative.header") }
- popupContentPositive={ t("applications:URLInput.withLabel."
- + "positive.content", { productName: config.ui.productName }) }
- popupContentNegative={ t("applications:URLInput.withLabel."
- + "negative.content", { productName: config.ui.productName }) }
- popupDetailedContentPositive={ t("applications:URLInput."
- + "withLabel.positive.detailedContent.0") }
- popupDetailedContentNegative={ t("applications:URLInput."
- + "withLabel.negative.detailedContent.0") }
- insecureURLDescription={ t("console:common.validations.inSecureURL.description") }
- showLessContent={ t("common:showLess") }
- showMoreContent={ t("common:showMore") }
- />
-
- { t("applications:forms.inboundSAML.sections" +
- ".idpInitiatedSLO.fields.returnToURLs.hint")
- }
-
+ if (!URLUtils.isHttpUrl(value) && !URLUtils.isHttpsUrl(value)) {
+ label = (
+
+ );
+ }
+
+ if (!URLUtils.isMobileDeepLink(value)) {
+ return false;
+ }
+
+ setReturnToURLsErrorLabel(label);
+
+ return true;
+ } }
+ showError={ returnToURLSError }
+ setShowError={ setReturnToURLSError }
+ disabled={ !isIdpInitiatedSingleLogoutEnabled || !isSingleLogoutProfileEnabled }
+ readOnly={ readOnly }
+ addURLTooltip={ t("common:addURL") }
+ duplicateURLErrorMessage={ t("common:duplicateURLError") }
+ data-testid={ `${ testId }-return-to-urls-input` }
+ showPredictions={ false }
+ customLabel={ returnToURLsErrorLabel }
+ popupHeaderPositive={ t("applications:URLInput.withLabel."
+ + "positive.header") }
+ popupHeaderNegative={ t("applications:URLInput.withLabel."
+ + "negative.header") }
+ popupContentPositive={ t("applications:URLInput.withLabel."
+ + "positive.content", { productName: config.ui.productName }) }
+ popupContentNegative={ t("applications:URLInput.withLabel."
+ + "negative.content", { productName: config.ui.productName }) }
+ popupDetailedContentPositive={ t("applications:URLInput."
+ + "withLabel.positive.detailedContent.0") }
+ popupDetailedContentNegative={ t("applications:URLInput."
+ + "withLabel.negative.detailedContent.0") }
+ insecureURLDescription={
+ t("console:common.validations.inSecureURL.description") }
+ showLessContent={ t("common:showLess") }
+ showMoreContent={ t("common:showMore") }
+ />
+
+ { t("applications:forms.inboundSAML.sections" +
+ ".idpInitiatedSLO.fields.returnToURLs.hint")
+ }
+
+
+
{ /* Assertion Query/Request Profile */ }
{
diff --git a/features/admin.template-core.v1/components/form-dynamic-field.scss b/features/admin.template-core.v1/components/form-dynamic-field.scss
new file mode 100644
index 00000000000..8baa3aac559
--- /dev/null
+++ b/features/admin.template-core.v1/components/form-dynamic-field.scss
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
+ *
+ * WSO2 LLC. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ .dynamic-template-selection-field {
+ .oxygen-form-control {
+ margin-top: 0;
+ margin-bottom: 0;
+
+ .oxygen-input-label {
+ margin-top: 0;
+ margin-left: 0;
+ position: relative;
+ transform: unset;
+ -webkit-transform: unset;
+ }
+
+ .oxygen-select {
+ margin-top: 8px;
+ margin-bottom: 4px;
+ }
+
+ .oxygen-form-helper-text {
+ margin-top: 3px;
+ margin-left: 0;
+ margin-right: 0;
+ }
+ }
+ }
+
+ .dynamic-template-selection-field-dropdown {
+ &.MuiPopover-root {
+ z-index: 1500;
+ filter: unset !important;
+ }
+ }
diff --git a/features/admin.template-core.v1/components/form-dynamic-field.tsx b/features/admin.template-core.v1/components/form-dynamic-field.tsx
index f60d7f4f594..9493d804873 100644
--- a/features/admin.template-core.v1/components/form-dynamic-field.tsx
+++ b/features/admin.template-core.v1/components/form-dynamic-field.tsx
@@ -18,15 +18,24 @@
import { getCertificateIllustrations } from "@wso2is/admin.core.v1";
import { IdentifiableComponentInterface } from "@wso2is/core/models";
-import { CheckboxFieldAdapter, FilePickerAdapter, FinalFormField, FormApi, TextFieldAdapter } from "@wso2is/form";
+import {
+ CheckboxFieldAdapter,
+ FilePickerAdapter,
+ FinalFormField,
+ FormApi,
+ SelectFieldAdapter,
+ TextFieldAdapter
+} from "@wso2is/form";
import { Hint } from "@wso2is/react-components";
import React, { FunctionComponent, PropsWithChildren, ReactElement } from "react";
import { Icon } from "semantic-ui-react";
import {
+ DynamicDropdownFieldInterface,
DynamicFieldInterface,
DynamicFilePickerFieldInterface,
DynamicInputFieldTypes
} from "../models/dynamic-fields";
+import "./form-dynamic-field.scss";
/**
* Prop types for the dynamic input fields.
@@ -139,6 +148,38 @@ export const FormDynamicField: FunctionComponent
);
+ case DynamicInputFieldTypes.SELECT:
+ return (
+
+
+ { field?.helperText }
+
+ ) : null
+ }
+ />
+
+ );
case DynamicInputFieldTypes.FILE:
return (