diff --git a/core/src/main/java/ca/yukon/aem/core/models/LikertScale.java b/core/src/main/java/ca/yukon/aem/core/models/LikertScale.java new file mode 100644 index 0000000..87f64e8 --- /dev/null +++ b/core/src/main/java/ca/yukon/aem/core/models/LikertScale.java @@ -0,0 +1,18 @@ +package ca.yukon.aem.core.models; + +import com.adobe.aemds.guide.common.GuideRadioButton; + +public class LikertScale extends GuideRadioButton { + + public LikertScale() { + } + + public String getLowEndLabel() { + return this.resourceProps.get("lowEndLabel", String.class); + } + + public String getHighEndLabel() { + return this.resourceProps.get("highEndLabel", String.class); + } + +} diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/customfileupload/_cq_dialog/.content.xml b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/customfileupload/_cq_dialog/.content.xml index a31584c..185316b 100644 --- a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/customfileupload/_cq_dialog/.content.xml +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/customfileupload/_cq_dialog/.content.xml @@ -57,4 +57,4 @@ - \ No newline at end of file + diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/customfileupload/widget.jsp b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/customfileupload/widget.jsp index 7f61efd..6479943 100644 --- a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/customfileupload/widget.jsp +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/customfileupload/widget.jsp @@ -40,4 +40,4 @@ - \ No newline at end of file + diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/.content.xml b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/.content.xml new file mode 100644 index 0000000..1527b4b --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/.content.xml @@ -0,0 +1,25 @@ + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/_cq_dialog/.content.xml b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/_cq_dialog/.content.xml new file mode 100644 index 0000000..b256964 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/_cq_dialog/.content.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/_cq_template/.content.xml b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/_cq_template/.content.xml new file mode 100644 index 0000000..64d89cf --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/_cq_template/.content.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/.content.xml b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/.content.xml new file mode 100644 index 0000000..99dd4fc --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/.content.xml @@ -0,0 +1,5 @@ + + diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/css.txt b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/css.txt new file mode 100644 index 0000000..421688d --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/css.txt @@ -0,0 +1,19 @@ + +############################################################################### +# Copyright 2021 Adobe +# +# Licensed 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. +############################################################################### + +#base=css +likertscale.less diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/css/likertscale.less b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/css/likertscale.less new file mode 100644 index 0000000..af31bdb --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/clientlibs/css/likertscale.less @@ -0,0 +1,70 @@ +.afLikertScale { + display: flex; + flex-direction: row; + justify-content: space-between; +} + +.afLikertScale::before { + display: none; +} + +.afLikertScale .likert-high-end-label { + position: absolute; + bottom: 0; + right: 0; + font-size: 0.9rem; + color: #737373; +} + +.afLikertScale .likert-low-end-label { + position: absolute; + bottom: 0; + left: 0; + font-size: 0.9rem; + color: #737373; +} + +.afLikertScale input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + + border-radius: 5px; + width: 40px; + height: 40px; + border-color: #cdcdcd; + + cursor: pointer; +} + +.afLikertScale .likertWidgetLabel { + position: absolute; + top: 0; + bottom: 0; + right: 0; + left: 0; + margin: auto; + width: fit-content; + height: fit-content; +} + +.afLikertScale .likertWidgetLabel label { + margin: 0; + font-size: 1rem; + font-weight: bold; + cursor: pointer; +} + +.afLikertScale .likertScaleContainer { + position: relative; +} + +.afLikertScale .likertWidgetLabel label::after { + display: none; +} + + diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/init.jsp b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/init.jsp new file mode 100644 index 0000000..fa68bc6 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/init.jsp @@ -0,0 +1,20 @@ +<%------------------------------------------------------------------------ + ~ + ~ ADOBE CONFIDENTIAL + ~ __________________ + ~ + ~ Copyright 2014 Adobe Systems Incorporated + ~ All Rights Reserved. + ~ + ~ NOTICE: All information contained herein is, and remains + ~ the property of Adobe Systems Incorporated and its suppliers, + ~ if any. The intellectual and technical concepts contained + ~ herein are proprietary to Adobe Systems Incorporated and its + ~ suppliers and may be covered by U.S. and Foreign Patents, + ~ patents in process, and are protected by trade secret or copyright law. + ~ Dissemination of this information or reproduction of this material + ~ is strictly forbidden unless prior written permission is obtained + ~ from Adobe Systems Incorporated. + --------------------------------------------------------------------------%> +<%@include file="/libs/fd/af/components/guidesglobal.jsp"%> + diff --git a/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/widget.jsp b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/widget.jsp new file mode 100644 index 0000000..01a8568 --- /dev/null +++ b/ui.apps/src/main/content/jcr_root/apps/yukon-forms/components/adaptiveForm/likertscale/widget.jsp @@ -0,0 +1,36 @@ +<%-- + Likert Scale Component +--%> +<%@include file="/libs/fd/af/components/guidesglobal.jsp"%> + +<%@ page import="com.adobe.granite.toggle.api.ToggleRouter, + com.adobe.aemds.guide.fdfl.utils.FeatureToggleConstants" %> + +<% + ToggleRouter toggleRouter = sling.getService(ToggleRouter.class); + boolean isDoubleExtFTEnabled = toggleRouter != null && toggleRouter.isEnabled(FeatureToggleConstants.FT_DISABLE_DOUBLE_EXTENSION_FILES); + pageContext.setAttribute("isDoubleExtFTEnabled", isDoubleExtFTEnabled); +%> + + +
+ + ${guide:encodeForHtml(guideField.highEndLabel, xssAPI)} + + +
+
+ +
+
+ +
+
+
+ + ${guide:encodeForHtml(guideField.lowEndLabel, xssAPI)} + +
+