diff --git a/composer-manifest.yaml b/composer-manifest.yaml index 24e2a41c..47948db2 100644 --- a/composer-manifest.yaml +++ b/composer-manifest.yaml @@ -149,7 +149,7 @@ packages: harvesthq/chosen: 1.8.7 html2text/html2text: 4.0.1 joachim-n/composer-manifest: 1.0.4 - judicialcouncil/courtyard-artifact: 0.1.180 + judicialcouncil/courtyard-artifact: 0.1.185 kub-at/php-simple-html-dom-parser: 1.9.1 laminas/laminas-diactoros: 1.8.7p2 laminas/laminas-escaper: 2.6.1 diff --git a/composer.lock b/composer.lock index 90aadeb2..df4433a4 100644 --- a/composer.lock +++ b/composer.lock @@ -9141,16 +9141,16 @@ }, { "name": "judicialcouncil/courtyard-artifact", - "version": "0.1.180", + "version": "0.1.185", "source": { "type": "git", "url": "https://github.com/JudicialCouncilOfCalifornia/courtyard-artifact.git", - "reference": "2fdf9783c2c866e10aea2da1c9e4919e06cf2992" + "reference": "562af3a5c799c38d9bb056aaf56cb9dbbafca059" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JudicialCouncilOfCalifornia/courtyard-artifact/zipball/2fdf9783c2c866e10aea2da1c9e4919e06cf2992", - "reference": "2fdf9783c2c866e10aea2da1c9e4919e06cf2992", + "url": "https://api.github.com/repos/JudicialCouncilOfCalifornia/courtyard-artifact/zipball/562af3a5c799c38d9bb056aaf56cb9dbbafca059", + "reference": "562af3a5c799c38d9bb056aaf56cb9dbbafca059", "shasum": "" }, "type": "drupal-library", @@ -9165,7 +9165,7 @@ } ], "description": "A build artifact of the Courtyard Pattern Lab pattern library.", - "time": "2021-08-24T23:28:58+00:00" + "time": "2021-08-27T19:20:17+00:00" }, { "name": "kub-at/php-simple-html-dom-parser", diff --git a/web/themes/custom/atrium/templates/block/block--webform--drawer.html.twig b/web/themes/custom/atrium/templates/block/block--webform--drawer.html.twig new file mode 100644 index 00000000..fc8de3fa --- /dev/null +++ b/web/themes/custom/atrium/templates/block/block--webform--drawer.html.twig @@ -0,0 +1,46 @@ +{# +/** + * @file + * Theme override to display a block. + * + * Available variables: + * - plugin_id: The ID of the block implementation. + * - label: The configured label of the block if visible. + * - configuration: A list of the block's configuration values. + * - label: The configured label for the block. + * - label_display: The display settings for the label. + * - provider: The module or other provider that provided this block plugin. + * - Block plugin specific settings will also be stored here. + * - content: The content of this block. + * - attributes: array of HTML attributes populated by modules, intended to + * be added to the main container tag of this template. + * - id: A valid HTML ID and guaranteed unique. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * + * @see template_preprocess_block() + */ +#} + +{% set feedback_form = drupal_entity('webform', 'was_this_information_helpful_') %} +{% set classes = [ + 'block', + bundle ? 'block--' ~ bundle|clean_class, + id ? 'block--' ~ id|replace({"_": "-"})|clean_class, +]|merge(classes|default([])) %} + +
+ {% include '@molecules/blocks/feedback/feedback.twig' with { + feedback: { + id: feedback_form['#webform_id'], + embed: content, + button: { + text: feedback_form.elements.was_this_information_helpful_['#title'], + } + } + } %} +
diff --git a/web/themes/custom/atrium/templates/region/region--drawer.html.twig b/web/themes/custom/atrium/templates/region/region--drawer.html.twig index 6af1b53f..ebd5184a 100644 --- a/web/themes/custom/atrium/templates/region/region--drawer.html.twig +++ b/web/themes/custom/atrium/templates/region/region--drawer.html.twig @@ -17,6 +17,5 @@ {% include '@organisms/sections/drawer/drawer.twig' with { drawer: { feedback: elements.webform, - chatbot: elements.jccchatbot } } %} diff --git a/web/themes/custom/atrium/templates/webform/webform--was-this-information-helpful-.html.twig b/web/themes/custom/atrium/templates/webform/webform--was-this-information-helpful-.html.twig index 37a47f88..d0d84b71 100644 --- a/web/themes/custom/atrium/templates/webform/webform--was-this-information-helpful-.html.twig +++ b/web/themes/custom/atrium/templates/webform/webform--was-this-information-helpful-.html.twig @@ -22,15 +22,6 @@ */ #} -{% include '@molecules/blocks/feedback/feedback.twig' with { - feedback: { - id: element['#webform_id_trunc'], - form: { - attributes: attributes, - children: children - }, - button: { - title: element.elements.was_this_information_helpful_['#admin_title'] - } - } -} %} + + {{ children }} +