Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Feedback/templates')
-rw-r--r--plugins/Feedback/templates/feedback.js28
-rw-r--r--plugins/Feedback/templates/index.tpl79
-rw-r--r--plugins/Feedback/templates/sent.tpl41
-rw-r--r--plugins/Feedback/templates/styles.css28
4 files changed, 129 insertions, 47 deletions
diff --git a/plugins/Feedback/templates/feedback.js b/plugins/Feedback/templates/feedback.js
new file mode 100644
index 0000000000..adaaa45448
--- /dev/null
+++ b/plugins/Feedback/templates/feedback.js
@@ -0,0 +1,28 @@
+$(function() {
+ var feedback = $('a#topbar-feedback');
+ if (feedback.size()) {
+ var fbDiv = $('<div id="feedback-dialog"></div>').appendTo('body');
+
+ $.get(feedback.attr('href'), function(data) {
+ fbDiv.html(data);
+ });
+
+ fbDiv.dialog({
+ title: feedback.html(),
+ bgiframe: true,
+ modal: true,
+ height: 480,
+ width: 500,
+ resizable: false,
+ autoOpen: false
+ });
+
+ $('#topbar-feedback').click(function() {
+ $('#feedback-faq').show();
+ $('#feedback-form').hide();
+ $('#feedback-sent').hide().empty();
+ fbDiv.dialog('open');
+ return false;
+ });
+ }
+});
diff --git a/plugins/Feedback/templates/index.tpl b/plugins/Feedback/templates/index.tpl
index aec45f58ce..02f553c177 100644
--- a/plugins/Feedback/templates/index.tpl
+++ b/plugins/Feedback/templates/index.tpl
@@ -1,24 +1,63 @@
{literal}
-<style>
-input, textarea, p {
- font-family: Georgia,"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
- font-size:0.9em;
- padding:0.2em;
-}
-input {
- margin-top:0.8em;
-}
-</style>
-{/literal}
+<script type="text/javascript">
+$(function() {
+ $('#feedback-contact').click(function() {
+ $('#feedback-faq').hide();
+ $('#feedback-form').show();
+ return false;
+ });
-<form method="post" action="index.php?module=Feedback&action=sendFeedback">
+ $('#feedback-home').click(function() {
+ $('#feedback-form').hide();
+ $('#feedback-faq').show();
+ return false;
+ });
-<p><strong>your email :</strong>
-<br /><input type="text" name="email" size="40" /></p>
+ $('#feedback-form-submit').click(function() {
+ var feedback = $('#feedback-form form');
+ $('#feedback-form').hide();
+ $.post(feedback.attr('action'), feedback.serialize(), function (data) {
+ $('#feedback-sent').show().html(data);
+ });
+ return false;
+ });
+});
+</script>
+{/literal}
-<p><strong>your feedback:</strong><br/>
-<i>please be precise if you request for a feature or report a bug</i></p>
-<textarea name="body" cols="37" rows="10"></textarea>
-<br/>
-<input type="submit" value="Send feedback" />
-</form>
+ <div id="feedback-faq">
+ <p><strong>{'Feedback_DoYouHaveBugReportOrFeatureRequest'|translate}</strong></p>
+ <p>» {'Feedback_ViewAnswersToFAQ'|translate:"<a target='_blank' href='misc/redirectToUrl.php?url=http://piwik.org/faq/'>":"</a>"}.</p>
+ <ul>
+ <li>{'Feedback_WhyAreMyVisitsNoTracked'|translate}</li>
+ <li>{'Feedback_HowToExclude'|translate}</li>
+ <li>{'Feedback_WhyWrongCountry'|translate}</li>
+ <li>{'Feedback_HowToAnonymizeIP'|translate}</li>
+ </ul>
+ <p>» {'Feedback_VisitTheForums'|translate:"<a target='_blank' href='misc/redirectToUrl.php?url=http://forum.piwik.org/'>":"</a>"}.</p>
+ <p>» {'Feedback_LearnWaysToParticipate'|translate:"<a target='_blank' href='misc/redirectToUrl.php?url=http://piwik.org/contribute/'>":"</a>"}.</p>
+ <br />
+ <p><strong>{'Feedback_SpecialRequest'|translate}</strong></p>
+ <p>» <a target='_blank' href="#" id="feedback-contact">{'Feedback_ContactThePiwikTeam'|translate}</a></p>
+ </div>
+ <div id="feedback-form" style="display:none;">
+ <form method="post" action="index.php?module=Feedback&action=sendFeedback">
+ <p><strong>{'Feedback_IWantTo'|translate}</strong>
+ <select name="category">
+ <option value="share">{'Feedback_CategoryShareStory'|translate}</option>
+ <option value="sponsor">{'Feedback_CategorySponsor'|translate}</option>
+ <option value="hire">{'Feedback_CategoryHire'|translate}</option>
+ <option value="security">{'Feedback_CategorySecurity'|translate}</option>
+ </select>
+ </p>
+ <p><strong>{'Feedback_MyEmailAddress'|translate}</strong><br />
+ <input type="text" name="email" size="59" />
+ <input type="hidden" name="nonce" value="{$nonce}" /></p>
+ <p><strong>{'Feedback_MyMessage'|translate}</strong> {'Feedback_DetailsPlease'|translate}<br />
+ <textarea name="body" cols="57" rows="10"></textarea></p>
+ <p><input id="feedback-form-submit" type="submit" value="{'Feedback_SendFeedback'|translate}" /></p>
+ <p><a href="#" id="feedback-home"><img src="plugins/Feedback/images/go-previous.png" border="0" title="{'General_Previous'|translate}" alt="[{'General_Previous'|translate}]" /></a></p>
+ </form>
+ </div>
+ <div id="feedback-sent" style="display:none;">
+ </div>
diff --git a/plugins/Feedback/templates/sent.tpl b/plugins/Feedback/templates/sent.tpl
index 65495497bf..5ae4c1872a 100644
--- a/plugins/Feedback/templates/sent.tpl
+++ b/plugins/Feedback/templates/sent.tpl
@@ -1,33 +1,20 @@
{literal}
-<style>
-body {
- font-family: Georgia,"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
- font-size:0.9em;
- padding:0.2em;
-}
-#error {
- color: red;
- text-align: center;
- border: 2px solid red;
- background-color:#FFFBFB;
- margin: 10px;
- padding: 10px;
-}
-#success {
- color: #38D73B;
- text-align: center;
- border: 2px solid red;
- margin: 10px;
- padding: 10px;
-}
-</style>
+<script type="text/javascript">
+ $('#feedback-retry').click(function() {
+ $('#feedback-sent').hide().empty();
+ $('#feedback-form').show();
+ return false;
+ });
+</script>
{/literal}
{if isset($ErrorString)}
- <div id="error"><strong>{'General_Error'|translate}:</strong> {$ErrorString}</div>
- <p>Please manually send your message at <a href='mailto:hello@piwik.org'>hello@piwik.org</a></p>
- <p>{$message}</p>
+ <div id="feedback-error"><strong>{'General_Error'|translate}:</strong> {$ErrorString}</div>
+ <p>{'Feedback_ManuallySendEmailTo'|translate} <a href='mailto:hello@piwik.org?subject={'[Feedback form - Piwik]'|escape:"hex"}&body={$message|stripeol|escape:"hex"}'>hello@piwik.org</a></p>
+ <textarea cols="53" rows="10" readonly="readonly">{$message}</textarea>
+ <p><a href="#" id="feedback-retry"><img src="plugins/Feedback/images/go-previous.png" border="0" title="{'General_Previous'|translate}" alt="[{'General_Previous'|translate}]" /></a></p>
{else}
- <div id="success">Your message was sent to Piwik.</div>
- <p><strong>Thank you for your helping us making Piwik better!</strong><br /> The Piwik Team</p>
+ <div id="feedback-success">{'Feedback_MessageSent'|translate}</div>
+ <p><strong>{'Feedback_ThankYou'|translate}</strong></p>
+ <p>-- {'Feedback_ThePiwikTeam'|translate}</p>
{/if}
diff --git a/plugins/Feedback/templates/styles.css b/plugins/Feedback/templates/styles.css
new file mode 100644
index 0000000000..8d95ab93db
--- /dev/null
+++ b/plugins/Feedback/templates/styles.css
@@ -0,0 +1,28 @@
+#feedback-form input, #feedback-form textarea, #feedback-sent textarea, #feedback-form select, #feedback-faq p, #feedback-form p, #feedback-sent div, #feedback-sent p, #feedback-faq li {
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
+ font-size:0.9em;
+ padding:0.2em;
+}
+#feedback-faq ul {
+ list-style-type:disc;
+ list-style-position:inside;
+ padding-left:2.5em;
+}
+#feedback-faq, #feedback-form, #feedback-sent {
+ margin-right:1em;
+}
+#feedback-error {
+ color: red;
+ text-align: center;
+ border: 2px solid red;
+ background-color:#FFFBFB;
+ margin: 10px;
+ padding: 10px;
+}
+#feedback-success {
+ color: #38D73B;
+ text-align: center;
+ border: 2px solid #38D73B;
+ margin: 10px;
+ padding: 10px;
+}