ChangePassword: Rewrite change password page to react (#17811)

* ChangePassword to React, created PasswordInput component, attempting UserProvider wrapper component, adding flex to btn row

* UserAPI interface, force classes on PasswordInput, remove api call from ChangePassword

* refactored out form

* clean up

* removed unnecessary bind, added loading state and loading component to change password form

* should be OR

* arrow funcs instead of binds, inline-block instead of flex, isSaving instead of isLoading, disabled button instead of spinner

* inline-flex on the react btn

* change state instatiatiation
This commit is contained in:
Shavonn Brown
2019-07-03 11:02:12 -04:00
committed by Torkel Ödegaard
parent b1126cb0ed
commit 874b8abcc0
9 changed files with 202 additions and 68 deletions

View File

@@ -3,6 +3,7 @@ import './ReactContainer';
import { applyRouteRegistrationHandlers } from './registry';
// Pages
import ChangePasswordPage from 'app/features/profile/ChangePasswordPage';
import ServerStats from 'app/features/admin/ServerStats';
import AlertRuleList from 'app/features/alerting/AlertRuleList';
import TeamPages from 'app/features/teams/TeamPages';
@@ -230,8 +231,10 @@ export function setupAngularRoutes($routeProvider: route.IRouteProvider, $locati
controllerAs: 'ctrl',
})
.when('/profile/password', {
templateUrl: 'public/app/features/profile/partials/change_password.html',
controller: 'ChangePasswordCtrl',
template: '<react-container />',
resolve: {
component: () => ChangePasswordPage,
},
})
.when('/profile/select-org', {
templateUrl: 'public/app/features/org/partials/select_org.html',