dilden / yii2-feedback-widget Goto Github PK
View Code? Open in Web Editor NEWWidget for accepting feedback from users of Yii2 web app
Widget for accepting feedback from users of Yii2 web app
I would love to try to debug the phone issue.. but could you please publish the non-minimized versions ?
When a modal window is opened, then the screenshot is created, but it is not possible to write the feedback. There is some conflict between the yii\bootstrap\Modal and ivoviz/feedback.
In my installation I resolved the conflict, that after creating the screenshot I close the modal window. It is not general solution, but I have not found anything better.
1. In all modal popups I added an id to the close button:
Modal::begin([
'header' => '<h2>Title</h2>',
'toggleButton' => ['label' => 'Show the popup'],
'closeButton' => ['id' => 'modal-close-button'],
]);
2. Then I added a 'click' to the feedback.(min.)js:
$(document).on('click', '#feedback-highlighter-next', function() {
$('#modal-close-button')[0].click();
...
After installation and configuration of the Widget, I can see the the "Send Feedback" dialog, but it does not send any info. When I click "Send Feedback", then I see in the console the following error message:
GET https://localhost/yii/frontend/web/html2canvas.js?_=1452683194473 404 (Not Found)
(The addresse of the file is:
https://localhost/yii/vendor/dilden/yii2-feedback-widget/assets/html2canvas.min.js )
When I send the feedback, then I see in the console:
POST https://localhost/yii/frontend/web/site/feedback 500 (Internal Server Error)
(I have the action in SiteController.php):
public function actionFeedback()
{
// ajax validation
if (Yii::$app->request->isAjax) {
$data = json_decode($_POST['feedback']);
$htmlMail = '<h3>Test</h3>';
// Send email with image attached as HTML file
Yii::$app->mailer->compose()
->setFrom('[email protected]')
->setTo('[email protected]')
->setSubject('Response from EPAS')
->setHtmlBody($htmlMail)
->send();
Yii::$app->response->format = Response::FORMAT_JSON;
return $data;
}
return false;
}
Although it works really nice, when I open the feedback box on my phone, there is no way I can press any buttons ... not even the next...
What am I doing wrong ?
The "Send feedback" button can be translated as follows:
echo DildenFeedback::widget([
'ajaxURL' => 'site/feedback',
'highlightElement' => 0,
'initButtonText' => 'Feedback schicken',
]);
But how can I translate the texts, which are in the class DildenFeedback in the function init():
public function init() {
$this->tpl['description'] = '<div id="feedback-welcome"> ...
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.