Commit 032de657c53d4084a910ba63e484e5d2e406e881
1 parent
9e1121cc9c
Exists in
master
and in
1 other branch
added settings page, controller needs work
Showing 5 changed files with 73 additions and 0 deletions Side-by-side Diff
config.js
View file @
032de65
... | ... | @@ -12,6 +12,7 @@ |
12 | 12 | 'flashy.ResetPasswordController', |
13 | 13 | 'flashy.VerifyEmailController', |
14 | 14 | 'flashy.CardListController', |
15 | + 'flashy.SettingsController', | |
15 | 16 | 'ngCookies']). |
16 | 17 | config(function($stateProvider, $urlRouterProvider, $resourceProvider, $httpProvider, $locationProvider) { |
17 | 18 | 'use strict'; |
... | ... | @@ -111,6 +112,12 @@ |
111 | 112 | templateUrl: 'templates/flashcard.html', |
112 | 113 | controller: 'FlashcardController' |
113 | 114 | }). |
115 | + state('settings', { | |
116 | + resolve: auth_resolve, | |
117 | + url: '/settings', | |
118 | + templateUrl: 'templates/settings.html', | |
119 | + controller: 'SettingsController' | |
120 | + }). | |
114 | 121 | state('requestpasswordreset', { |
115 | 122 | url: '/requestpasswordreset', |
116 | 123 | templateUrl: 'templates/requestpasswordreset.html', |
home.html
View file @
032de65
... | ... | @@ -146,6 +146,7 @@ |
146 | 146 | <!-- Controllers --> |
147 | 147 | <script src="scripts/FeedController.js"></script> |
148 | 148 | <script src="scripts/RootController.js"></script> |
149 | +<script src="scripts/SettingsController.js"></script> | |
149 | 150 | <script src="scripts/LoginController.js"></script> |
150 | 151 | <script src="scripts/LogoutController.js"></script> |
151 | 152 | <script src="scripts/DeckController.js"></script> |
scripts/SettingsController.js
View file @
032de65
styles/flashy.css
View file @
032de65
... | ... | @@ -394,4 +394,19 @@ |
394 | 394 | .container, .push { |
395 | 395 | height: 4em; |
396 | 396 | } |
397 | + | |
398 | + | |
399 | +#resetPasswordForm{ | |
400 | + display: block; | |
401 | + margin-left: auto; | |
402 | + margin-right: auto; | |
403 | + width: 500px; | |
404 | +} | |
405 | + | |
406 | +#resetPWButton{ | |
407 | + margin-left: auto; | |
408 | + margin-right: auto; | |
409 | + display: block; | |
410 | + width: 200px; | |
411 | +} |
templates/settings.html
View file @
032de65
1 | +<div class="card" id="resetPasswordForm"> | |
2 | + | |
3 | + <h2>Change Password</h2> | |
4 | + | |
5 | + <div class="row"> | |
6 | + <form class="col s12"> | |
7 | + | |
8 | + | |
9 | + <div class="row"> | |
10 | + <div class="input-field col s12"> | |
11 | + <input id="password" type="password" ng-model="oldPassword" class="validate"> | |
12 | + <label for="password">Old Password</label> | |
13 | + </div> | |
14 | + </div> | |
15 | + | |
16 | + <div class="row"> | |
17 | + <div class="input-field col s12"> | |
18 | + <input id="password" type="password" ng-model="newPassword" class="validate"> | |
19 | + <label for="password">New Password</label> | |
20 | + </div> | |
21 | + </div> | |
22 | + | |
23 | + <div class="row"> | |
24 | + <div class="input-field col s12"> | |
25 | + <input id="password" type="password" ng-model="confirmedNewPassword" class="validate"> | |
26 | + <label for="password">Confirm New Password</label> | |
27 | + </div> | |
28 | + </div> | |
29 | + | |
30 | + | |
31 | + </form> | |
32 | + | |
33 | + <a class="waves-effect waves-light btn" id="resetPWButton" ng-click="changePassword(oldPassword, newPassword, confirmedNewPassword)">Reset Password</a> | |
34 | + | |
35 | + </div> | |
36 | +</div> |