Skip to content

Commit

Permalink
Merge pull request #524 from chapter-three/feature/SRL-443--update-fe…
Browse files Browse the repository at this point in the history
…edback-chat

Feature/srl 443  update feedback chat
  • Loading branch information
melwong-jcc authored Aug 31, 2021
2 parents bae584d + b955b89 commit 04fac9c
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 19 deletions.
2 changes: 1 addition & 1 deletion composer-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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([])) %}

<div {{ attributes|without('id').addClass(classes) }}>
{% 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'],
}
}
} %}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
{% include '@organisms/sections/drawer/drawer.twig' with {
drawer: {
feedback: elements.webform,
chatbot: elements.jccchatbot
}
} %}
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
}
} %}
<form{{ attributes }}>
{{ children }}
</form>

0 comments on commit 04fac9c

Please sign in to comment.