Feedback button
The Feedback button lets you give feedback about the consultation, Knowledge Base or any other thing you want to notice us.. When clicking on the Feedback button a popup is opened.
The button consists of 3 different parts: Button, Icon and Label.
Button
The Feedback button is created by using the <button> tag.
<button id="feedbackButton" type="button"
ng-if="feedbackData != null && feedbackData.enabled == true" ng-click="feedback($event)" class="btn button"
tooltip-placement="bottom" uib-tooltip-html="'{{translation.QUICK_GUIDE_BUTTON_FEEDBACK}}'" tooltip-popup-delay="2000">
The following attributes are mandatory:
ID | The button tag is needed to create the button |
Type | The type defines the DOM element. |
Ng-if | The ng-if statement have to be true in order to display the button. In this case, the feedbackData should not be "null" and the feedbackData.enabled should be "true". |
Ng-click | The ng-click triggers a function when the button is clicked. In this case, the function: print($event) is triggered. |
Class | The class is needed to give the proper CSS style to the button. |
Tooltip-placement | The position of the tooltip. |
Uib-tooltip-html | The text of the tooltip. |
Tooltip-popup-delay | Adds a delay to trigger the tooltip. |
It is possible to add more classes/attributes to the button.
Icon
In order to improve usability, every button has an icon to help the user identify the functionality of the button. To add the icon, put the following code inside the <button> tag:
<span class="fa fa-comment"></span>
To change the icon, simply modify the "fa-comment"
Label
The label is created in the language file so that multiple languages have the right label. To add the label, put the following code inside the <button> tag:
<span class="hidden-xs"> {{translation.FEEDBACK}}</span>
It is possible to create a custom label.
Usage
Here is an example of the Feedback button. Put the following code in the consultation template:
<button id="feedbackButton" type="button"
ng-click="feedback($event)" class="btn button" ng-if="feedbackData != null && feedbackData.enabled == true"
tooltip-placement="bottom" uib-tooltip-html="'{{translation.QUICK_GUIDE_BUTTON_FEEDBACK}}'" tooltip-popup-delay="2000">
<span class="fa fa-comment"></span>
<span class="hidden-xs">{{translation.FEEDBACK}}</span>
</button>