ProfileForm.prototype.onsuccess = function() { log('Profile updated'); citizen.load('me'); var self = this; citizen.once('loaded', function () { self.find('img').attr('src', citizen.profilePicture()); }); this.messages([t('settings.successfuly-updated')], 'success'); }
SigninForm.prototype.onsuccess = function () { citizen.load('me'); var sidebarItem = dom('.nav-proposal .sidebar-nav .nav.navlist li.active'); if (sidebarItem.length) { var id = sidebarItem.attr('data-id'); page('/law/' + id); } else { page('/'); } };
ProfileForm.prototype.onsuccess = function() { log('Profile updated'); citizen.load('me'); var self = this; citizen.once('loaded', function () { self.find('img').attr('src', citizen.profilePicture()); }); this.messages([t('Your profile was successfuly updated')], 'success'); //TODO: maybe this message should be display on the top of the profile view. //After edit force reload setTimeout(window.location.reload(), 3000); };
SigninForm.prototype.onsuccess = function (res) { var payload = JSON.parse(res.text); if (payload.token) { jwt.setToken(payload.token); } citizen.load('me'); var sidebarItem = dom('.nav-proposal .sidebar-nav .nav.navlist li.active'); if (sidebarItem.length) { var id = sidebarItem.attr('data-id'); page('/law/' + id); } else { page('/'); } };
ProfileView.prototype.onsuccess = function() { log('Profile updated'); citizen.load('me'); this.messages([t('Your profile was successfuly updated')], 'success'); }
NotificationsView.prototype.onsuccess = function() { log('Notification settings updated'); this.messages([t('Your notifiction settings were successfuly updated')], 'success'); citizen.load('me'); }