aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-08-20 11:25:54 +0100
committerStruan Donald <struan@exo.org.uk>2013-08-20 11:25:54 +0100
commit434f23d2f1389ff3c81ec8fddf0889f72b47dc1c (patch)
tree25e026b1cbd728717369bafe6321671778e8e38b
parent20c71ef5e859cd6c494a4b1426a75dddd64e5135 (diff)
Replace view report link with a button on final screenconfirm-screen-buttons
Link is inconsistent with the rest of the app.
-rw-r--r--src/js/views/sent.js7
-rw-r--r--src/templates/en/sent.html2
-rw-r--r--templates/sent.html2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/js/views/sent.js b/src/js/views/sent.js
index a483706..47e4ab8 100644
--- a/src/js/views/sent.js
+++ b/src/js/views/sent.js
@@ -11,6 +11,7 @@
'pageshow': 'afterDisplay',
'vclick .ui-btn-left': 'onClickButtonPrev',
'vclick #id_report_another': 'onClickButtonPrev',
+ 'vclick #open_report': 'onClickOpenReport',
'vclick #rate_app': 'onClickRateApp'
},
@@ -25,6 +26,12 @@
return this;
},
+ onClickOpenReport: function(e) {
+ e.preventDefault();
+ window.open(FMS.createdReport.get('site_url'), '_system');
+ return false;
+ },
+
onClickRateApp: function(e) {
e.preventDefault();
var el = $('#rate_app');
diff --git a/src/templates/en/sent.html b/src/templates/en/sent.html
index 5094c4b..f4f1541 100644
--- a/src/templates/en/sent.html
+++ b/src/templates/en/sent.html
@@ -12,7 +12,7 @@
<% } else { %>
<h3>Thanks. Your report will be sent to the authorities immediately.</h3>
- <p class="center"><a onclick="FMS.openExternal(event); return false;" href="<%= site_url %>">View it on the site</a></p>
+ <p class="center"><input type="button" data-theme="a" id="open_report" value="View it on the site"></p>
<% } %>
diff --git a/templates/sent.html b/templates/sent.html
index ffaaa1d..01f04a1 100644
--- a/templates/sent.html
+++ b/templates/sent.html
@@ -12,7 +12,7 @@
<% } else { %>
<h3>[% loc('Thanks. Your report will be sent to the authorities immediately.') %]</h3>
- <p class="center"><a onclick="FMS.openExternal(event); return false;" href="<%= site_url %>">[% loc('View it on the site') %]</a></p>
+ <p class="center"><input type="button" data-theme="a" id="open_report" value="[% loc('View it on the site') %]"></p>
<% } %>