').html(richTextTitleDiv.innerHTML).text();
- }
- }
- }
-
- /**
- * hides the RTE/plain text field on the basis of rich text checkbox and
- * resolves it's value for enumNAmes/Options.
- *
- * @param {HTMLElement} dialog The dialog on which the operation is to be performed.
- * @param areOptionsRichText is rich text checkbox selected.
- * @param isToggled is this function being called on toggle of rich text checkbox.
- */
- function resolveRichTextOptions(dialog, areOptionsRichText, isToggled) {
- let enumNames = dialog.find(BASE_ENUMNAMES_VISIBLE),
- richTextEnumNames = dialog.find(BASE_RICH_TEXT_ENUMNAMES),
- richTextEnumNamesInput = dialog.find(BASE_WRAPPER_INPUT_RICH_TEXT_ENUMNAMES),
- richTextEnumNamesDiv = dialog.find(BASE_WRAPPER_VALUE_RICH_TEXT_ENUMNAMES);
- if(areOptionsRichText != null && areOptionsRichText.checked){
- for (let i = 0; i < richTextEnumNames.length; i++) {
- Utils.hideComponent(enumNames[i], "div");
- Utils.showComponent(richTextEnumNames[i], "div");
- copyTextValueToRte(enumNames[i], richTextEnumNamesDiv[i]);
- richTextEnumNamesInput[i].value = enumNames[i].value;
- }
- } else {
- for (let i = 0; i < richTextEnumNames.length; i++) {
- Utils.hideComponent(richTextEnumNames[i], "div");
- Utils.showComponent(enumNames[i], "div");
- if(isToggled){
- enumNames[i].value = $('
').html(richTextEnumNamesDiv[i].innerHTML).text();
- }
- }
- }
- }
-
- function copyTextValueToRte (textElem, richTextElem) {
- richTextElem.innerHTML = Utils.encodeScriptableTags(textElem.value);
- }
-
- function changeTextValue(textValue, richTextValue) {
- if(textValue && richTextValue) {
- textValue.value = Utils.encodeScriptableTags(richTextValue.value);
- }
- }
-
/**
* Initialise the conditional display of the various elements of the dialog.
*
@@ -239,9 +162,7 @@
*/
function initialise(dialog) {
dialog = $(dialog);
- let baseRequired = dialog.find(BASE_REQUIRED)[0],
- isTitleRichText = dialog.find(BASE_IS_TITLE_RICH_TEXT)[0],
- areOptionsRichText = dialog.find(BASE_ARE_OPTIONS_RICH_TEXT)[0];
+ var baseRequired = dialog.find(BASE_REQUIRED)[0];
if (baseRequired) {
handleRequired(dialog, baseRequired);
baseRequired.on("change", function() {
@@ -253,69 +174,14 @@
showHideDoRBindRefField(dialog);
validateName();
handleDialogSubmit(dialog);
- if (isTitleRichText) {
- resolveRichText(dialog, isTitleRichText, false);
- isTitleRichText.on("change", function() {
- resolveRichText(dialog, isTitleRichText, true);
- });
- }
- if (areOptionsRichText) {
- resolveRichTextOptions(dialog, areOptionsRichText, false);
- areOptionsRichText.on("change", function() {
- resolveRichTextOptions(dialog, areOptionsRichText, true);
- });
- }
}
- /**
- * whenever RTE value of enumName is changed, we save it's value corresponding to text value field.
- */
- function updateEnumNamesOnChange(){
- channel.on("change", BASE_WRAPPER_VALUE_RICH_TEXT_ENUMNAMES, function (e) {
- let richTextValue = channel.find(BASE_WRAPPER_INPUT_RICH_TEXT_ENUMNAMES),
- textValue = channel.find(BASE_ENUMNAMES_VISIBLE);
- for(let i=0; i
0) {
+ Coral.commons.ready(e.target, function(component) {
+ initialise(component);
+ });
+ }
+ });
-})(jQuery, Granite.author, jQuery(document));
\ No newline at end of file
+})(jQuery, Granite.author, jQuery(document), Coral);
\ No newline at end of file
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/_cq_dialog/.content.xml
index 7b8aa8e96a..0d53a69346 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/_cq_dialog/.content.xml
@@ -18,7 +18,6 @@
jcr:primaryType="nt:unstructured"
jcr:title="Adaptive Form Button"
sling:resourceType="cq/gui/components/authoring/dialog"
- extraClientlibs="[core.forms.components.base.v1.editor]"
helpPath="https://www.adobe.com/go/aem_af_cmp_button_v1"
trackingFeature="core-components:adaptiveform-button:v1">
+ jcr:primaryType="nt:unstructured"
+ sling:hideChildren="[hideTitle,placeholder]">
-
+
+ editorType="plaintext">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ textPropertyName="jcr:title"/>
\ No newline at end of file
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/button.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/button.html
index 80e5376592..67ac6e522b 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/button.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/button/v1/button/button.html
@@ -39,7 +39,7 @@
data-cmp-data-layer="${button.data.json}"
aria-label="${button.label.visible != false ? '' : button.label.value}">
- ${button.label.value @ context = button.label.richText ? 'html' : 'text'}
+ ${button.label.value}
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/checkbox.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/checkbox.html
index f5316ce0dc..97e2c2f912 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/checkbox.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkbox/v1/checkbox/checkbox.html
@@ -44,7 +44,7 @@
value="${checkbox.default[0]}"
disabled="${!checkbox.enabled}" />
-
+
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/checkboxgroup.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/checkboxgroup.html
index 3c524e065c..500d0965ce 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/checkboxgroup.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/checkboxgroup.html
@@ -35,7 +35,7 @@
data-cmp-adaptiveformcontainer-path="${formstructparser.formContainerPath}"
data-sly-test.widgetId="${'{0}-{1}' @ format=[checkboxgroup.id, 'widget']}">
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/widget.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/widget.html
index 211de57194..65d6b54424 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/widget.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/widget.html
@@ -25,7 +25,7 @@
checked="${checkboxgroup.enums[itemList.index] in checkboxgroup.default }"
disabled="${!checkboxgroup.enabled || checkboxgroup.readOnly}"
aria-readonly="${checkboxgroup.readOnly ? 'true' : ''}"/>
-
${checkboxgroup.enumNamesAsTextContent[itemList.index].value @ context = checkboxgroup.enumNamesAsTextContent[itemList.index].richText ? 'html' : 'text'}
+
${checkboxgroup.enumNames[itemList.index]}
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/js.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/js.txt
index 40008b700d..bd72121afc 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/js.txt
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/js.txt
@@ -20,6 +20,5 @@ componentutils.js
replacehook.js
dorhook.js
copypastehook.js
-toolbaractionhook.js
qualifiedNameHook.js
panelselect.js
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/js/toolbaractionhook.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/js/toolbaractionhook.js
deleted file mode 100644
index 9610ad0139..0000000000
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/container/v2/container/clientlibs/editorhook/js/toolbaractionhook.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright 2023 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.
- ******************************************************************************/
-(function (ns) {
- "use strict";
- let superSitesEditorAppendButton = ns.edit.Toolbar.prototype.appendButton;
-
- /**
- * @override
- */
- ns.edit.Toolbar.prototype.appendButton = function (editable, name, action) {
- correctEditableEditorType(editable, name);
- superSitesEditorAppendButton.apply(this, [editable, name, action]);
- };
-
- /**
- * @override
- * In case of forms editor we are overriding sites toolbar actions and has a custom toolbar implementation.
- * Therefore, needs a special handling.
- */
- if(window.guidelib){
- var superFormsEditorAppendButton = window.guidelib.touchlib.editToolbar.prototype.appendButton;
- window.guidelib.touchlib.editToolbar.prototype.appendButton = function (editable, name, action) {
- //adding this check because we don't want to change editorType for v1 forms.
- if(window.guidelib.touchlib.utils.checkIfCoreComponentsBasedForm()){
- correctEditableEditorType(editable, name);
- }
- superFormsEditorAppendButton.apply(this, [editable, name, action]);
- };
- };
-
- const correctEditableEditorType = function (editable, name) {
- if (name == "EDIT") {
- var hasRichTextLabel = editable.dom.find("[class$='__label']")[0] && editable.dom.find("[class$='__label']")[0].getAttribute("data-richtext") != null,
- hasRichTextAttribute = editable.dom.find("[class$='__text']")[0] && editable.dom.find("[class$='__text']")[0].getAttribute("data-richtext") != null;
- // We are checking for data-richtext in component to decide whether open rich-text inplace editor or plain text editor
- if(!(hasRichTextLabel || hasRichTextAttribute)){
- editable.config.editConfig.inplaceEditingConfig.editorType="plaintext";
- }
- }
- };
-
-}(Granite.author));
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/datepicker.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/datepicker.html
index 4326e7e89d..b4f64bfcc0 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/datepicker.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/datepicker/v1/datepicker/datepicker.html
@@ -32,7 +32,7 @@
data-cmp-adaptiveformcontainer-path="${formstructparser.formContainerPath}"
data-sly-test.widgetId="${'{0}-{1}' @ format=[datePicker.id, 'widget']}">