diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-11-23 18:30:04 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-11-23 18:30:04 +0100 |
| commit | 7a46e7f1fa592658415e0da4fe42033a31ce3951 (patch) | |
| tree | 8eaaa2e50c4d7a1227aeba2e73152d36352920e5 /StoneIsland/www/js/lib/view/Serializable.js | |
| parent | f12f002f629a04b6596f1b8df11d41c693df185d (diff) | |
new account, date field, fixed
Diffstat (limited to 'StoneIsland/www/js/lib/view/Serializable.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/view/Serializable.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js index fa4eba02..ae0a4fbc 100755 --- a/StoneIsland/www/js/lib/view/Serializable.js +++ b/StoneIsland/www/js/lib/view/Serializable.js @@ -42,7 +42,7 @@ var SerializableView = View.extend({ this.$("input[name], select[name], textarea[name]").each( function(){ if (this.type == "checkbox") { if ($(this).prop("checked")) { - fields[this.name] = this.value + fields[this.name] = this.value || "true" } } else { @@ -77,6 +77,9 @@ var SerializableView = View.extend({ update_date: function(e){ var $target = $(e.currentTarget), value = $target.val() var label = moment(value).format("MM/DD/YYYY") + if (label === 'Invalid date') { + label = 'BIRTHDAY (OPTIONAL)' + } $target.parent().addClass("picked") $target.parent().find("span").html(label) }, @@ -128,7 +131,7 @@ var SerializableView = View.extend({ } else { this.hide_errors() - cordova.plugins.Keyboard.close() + window.cordova && cordova.plugins.Keyboard.close() } var finalized_data = this.finalize(valid.data) |
