aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/sent.js11
-rw-r--r--www/js/views/submit.js6
2 files changed, 17 insertions, 0 deletions
diff --git a/www/js/views/sent.js b/www/js/views/sent.js
index 03ec7a7..179d9f7 100644
--- a/www/js/views/sent.js
+++ b/www/js/views/sent.js
@@ -10,6 +10,17 @@
'pagebeforeshow': 'beforeDisplay',
'pageshow': 'afterDisplay',
'vclick .ui-btn-left': 'onClickButtonPrev'
+ },
+
+ render: function(){
+ if ( !this.template ) {
+ console.log('no template to render');
+ return;
+ }
+ template = _.template( tpl.get( this.template ) );
+ this.$el.html(template(FMS.createdReport.toJSON()));
+ this.afterRender();
+ return this;
}
})
});
diff --git a/www/js/views/submit.js b/www/js/views/submit.js
index bab9396..f3214db 100644
--- a/www/js/views/submit.js
+++ b/www/js/views/submit.js
@@ -55,6 +55,12 @@
if ( FMS.currentUser ) {
FMS.currentUser.save();
}
+ if (resp.report) {
+ this.report.set('site_id', resp.report);
+ this.report.set('site_url', CONFIG.FMS_URL + '/report/' + resp.report);
+ } else {
+ this.report.set('email_confirm', 1);
+ }
var reset = FMS.removeDraft( model.id, true);
var that = this;
reset.done( function() { that.onRemoveDraft(); } );