Hide affiliations UI behind feature flag.

This commit is contained in:
Paulo Reis 2018-06-25 17:06:23 +01:00
parent 8ac6f4d6f4
commit e7f819fbdd
3 changed files with 110 additions and 106 deletions

View file

@ -68,6 +68,7 @@ module.exports =
shouldAllowEditingDetails: shouldAllowEditingDetails shouldAllowEditingDetails: shouldAllowEditingDetails
languages: Settings.languages, languages: Settings.languages,
accountSettingsTabActive: true accountSettingsTabActive: true
showAffiliationsUI: (req.query?.aff == "true") or false
sessionsPage: (req, res, next) -> sessionsPage: (req, res, next) ->
user = AuthenticationController.getSessionUser(req) user = AuthenticationController.getSessionUser(req)

View file

@ -9,11 +9,7 @@ block content
.page-header .page-header
h1 #{translate("account_settings")} h1 #{translate("account_settings")}
.account-settings(ng-controller="AccountSettingsController", ng-cloak) .account-settings(ng-controller="AccountSettingsController", ng-cloak)
form-messages(for="settingsForm") if locals.showAffiliationsUI
.alert.alert-success(ng-show="settingsForm.response.success")
| #{translate("thanks_settings_updated")}
form-messages(for="changePasswordForm")
div
form.row( form.row(
ng-controller="UserAffiliationsController" ng-controller="UserAffiliationsController"
name="affiliationsForm" name="affiliationsForm"
@ -184,6 +180,10 @@ block content
i.fa.fa-fw.fa-spin.fa-refresh i.fa.fa-fw.fa-spin.fa-refresh
|  Adding... |  Adding...
hr hr
form-messages(for="settingsForm")
.alert.alert-success(ng-show="settingsForm.response.success")
| #{translate("thanks_settings_updated")}
form-messages(for="changePasswordForm")
.row .row
.col-md-5 .col-md-5

View file

@ -2,6 +2,9 @@
.alert { .alert {
margin-bottom: 0; margin-bottom: 0;
} }
h3 {
margin-top: 0;
}
} }
#delete-account-modal { #delete-account-modal {