Paulo Reis 8 лет назад
Родитель
Сommit
00dfcf66c6

+ 5 - 5
services/web/app/views/user/settings.pug

@@ -13,7 +13,7 @@ block content
 								.alert.alert-success(ng-show="settingsForm.response.success")
 									|  #{translate("thanks_settings_updated")}
 							form-messages(for="changePasswordForm")
-							.container-fluid
+							div
 								form.row(
 									ng-controller="UserAffiliationsController"
 									name="affiliationsForm"
@@ -79,7 +79,7 @@ block content
 																input-required="true"
 															)
 													td
-														div(
+														.affiliations-table-label(
 															ng-if="newAffiliation.university && !ui.showManualUniversitySelectionUI"
 														)
 															| {{ newAffiliation.university.name }} (
@@ -88,10 +88,10 @@ block content
 																ng-click="selectUniversityManually();"
 															) change
 															| )
-														div(
+														.affiliations-table-label(
 															ng-if="!newAffiliation.university && !ui.isValidEmail && !ui.showManualUniversitySelectionUI"
 														) Start by adding your email address.
-														div(
+														.affiliations-table-label(
 															ng-if="!newAffiliation.university && ui.isValidEmail && !ui.isBlacklistedEmail && !ui.showManualUniversitySelectionUI"
 														)
 															| Is your email affiliated with an institution? 
@@ -102,7 +102,7 @@ block content
 															) Let us know
 														div(
 															ng-if="ui.showManualUniversitySelectionUI"
-														ss)
+														)
 															.affiliations-form-group
 																ui-select(
 																	ng-model="newAffiliation.country"

+ 3 - 0
services/web/public/coffee/main/affiliations/controllers/UserAffiliationsController.coffee

@@ -85,11 +85,14 @@ define [
 				_getUserEmails()
 
 		$scope.setDefaultUserEmail = (email) ->
+			$scope.ui.isLoadingEmails = true
 			UserAffiliationsDataService
 				.setDefaultUserEmail email
 				.then () -> _getUserEmails()
+				.catch () -> console.log "fodeu"
 
 		$scope.removeUserEmail = (email) ->
+			$scope.ui.isLoadingEmails = true
 			UserAffiliationsDataService
 				.removeUserEmail email
 				.then () -> _getUserEmails()

+ 0 - 1
services/web/public/coffee/main/affiliations/factories/UserAffiliationsDataService.coffee

@@ -74,7 +74,6 @@ define [
 
 		setDefaultUserEmail = (email) ->
 			$http.post "/user/emails/default", {
-				email,
 				_csrf: window.csrfToken
 			}
 

+ 5 - 2
services/web/public/stylesheets/app/account-settings.less

@@ -29,7 +29,10 @@
 
 	.affiliations-form-group {
 		margin-bottom: @table-cell-padding;
-		:last-of-type {
+		&:last-of-type {
 			margin-bottom: 0;
 		}
-	}
+	}
+	.affiliations-table-label {
+		padding-top: 4px;
+	}