aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-07-04 12:10:47 +0100
committerStruan Donald <struan@exo.org.uk>2013-07-04 12:10:47 +0100
commitce8315b16a6babdc2faa494cf721ba7202806cde (patch)
tree7a5fdfdd094d428375690b6404788e00c06844f5 /www/js
parentdbc965121422b13da1f7f272e42c74ec5a5156d4 (diff)
make sure we don't save the unselected category prompt as the category
as that upsets our 'is this an empty draft' checking
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/details.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/www/js/views/details.js b/www/js/views/details.js
index 4c6d96b..90d1f76 100644
--- a/www/js/views/details.js
+++ b/www/js/views/details.js
@@ -130,12 +130,16 @@
},
updateCurrentReport: function() {
- if ( $('#form_category').val() && $('#form_title').val() && $('#form_detail').val() ) {
+ var category = $('#form_category').val();
+ if ( category === '-- Pick a category --' ) {
+ category = '';
+ }
+ if ( category && $('#form_title').val() && $('#form_detail').val() ) {
$('#next').addClass('page_complete_btn');
} else {
$('#next').removeClass('page_complete_btn');
}
- this.model.set('category', $('#form_category').val());
+ this.model.set('category', category);
this.model.set('title', $('#form_title').val());
this.model.set('details', $('#form_detail').val());
FMS.saveCurrentDraft();