Commit 134c61bbbf95194ffcb7d74db15eb0160b84467c

Authored by OpenWapp Developer
1 parent ded07b83d0

Now retrieving phone number from the confirmation input to allow the users to fix their number.

Showing 2 changed files with 6 additions and 5 deletions

app/scripts/collections/history.js View file @ 134c61b
... ... @@ -207,7 +207,7 @@
207 207 _this._loadGroups();
208 208 });
209 209  
210   - list.forEach(function (id, index) {
  210 + list.forEach(function (id) {
211 211 console.log('[history] About to load conversation ', id);
212 212 ConversationModel.loadFromStorage(id, sync);
213 213 });
app/scripts/views/login.js View file @ 134c61b
... ... @@ -141,7 +141,7 @@
141 141  
142 142 goToValidate: function (evt) {
143 143 evt.preventDefault();
144   - var international = this._getInternational();
  144 + var international = this._getInternational('#confirm-phone-page');
145 145 if (!international) {
146 146 return;
147 147 }
148 148  
... ... @@ -155,9 +155,10 @@
155 155 );
156 156 },
157 157  
158   - _getInternational: function () {
  158 + _getInternational: function (pageId) {
  159 + pageId = pageId || '#login-page';
159 160 var country = this.$el.find('select').val();
160   - var number = this.$el.find('input[name=msisdn]').val();
  161 + var number = this.$el.find(pageId + ' input[name=msisdn]').val();
161 162 return this.checkPhoneNumber(number, country);
162 163 },
163 164  
... ... @@ -165,7 +166,7 @@
165 166 var _this = this;
166 167 evt.preventDefault();
167 168  
168   - var international = this._getInternational();
  169 + var international = this._getInternational('#confirm-phone-page');
169 170 if (!international) {
170 171 return;
171 172 }