Commit 8607c44bb6ba5faf57980c428767f6021128c503

Authored by Rachel Lee

Merge branch 'master' of https://git.ucsd.edu/110swag/flashy-frontend

Conflicts:
	config.js
	home.html
	templates/login.html

Showing 17 changed files Side-by-side Diff

casper_test.js View file @ 8607c44
  1 +phantom.casperPath = 'path/to/node_modules/casperjs';
  2 +phantom.injectJs('path/to/node_modules/casperjs/bin/bootstrap.js');
  3 +
  4 +phantom.casperTest = true;
  5 +
  6 +
  7 +//var casper = require('casper');
  8 +var x = require('casper').selectXPath;
  9 +
  10 +casper.start('http://google.com/', function() {
  11 + this.echo(this.getTitle());
  12 + this.assertExists(x('//*[@id="gbqfbb"]'), 'the element exists');
  13 +});
  14 +
  15 +casper.run();
  16 +
  17 +
... ... @@ -9,6 +9,7 @@
9 9 'flashy.ReviewController',
10 10 'flashy.UserService',
11 11 'flashy.FlashcardDirective',
  12 + 'flashy.ResetPasswordController',
12 13 'ngCookies']).
13 14 config(['$stateProvider', '$urlRouterProvider', '$httpProvider',
14 15 '$locationProvider',
... ... @@ -64,7 +65,12 @@
64 65 url: '/requestpasswordreset',
65 66 templateUrl: 'templates/requestpasswordreset.html',
66 67 controller: 'RequestResetController'
67   - });
  68 + }).
  69 + state('resetpassword', {
  70 + url: '/resetpassword',
  71 + templateUrl: 'templates/resetpassword.html',
  72 + controller: 'ResetPasswordController'
  73 + });
68 74  
69 75 }]);
1   -.angucomplete-dropdown {
  1 +.diclaimer {
  2 + color:#00AFD8;
  3 +}
  4 +
  5 +.form-section {
  6 + width: 330px;
  7 + top: 50%;
  8 + position: relative;
  9 +}
  10 +
  11 +.form-inputs {
  12 + margin-top: 0px;
  13 + border: 0px none;
  14 + font: 16px/1.4 "Helvetica Neue","HelveticaNeue",Helvetica,Arial;
  15 + padding: 5px 10px 11px 13px;
  16 + width: 100%;
  17 + box-sizing: border-box;
  18 +}
  19 +
  20 +.form-buttons {
  21 + margin-top: 10px;
  22 + width: 100%;
  23 + font-size: 16px;
  24 +}
  25 +
  26 +.form-buttons .last-button {
  27 + float: right;
  28 +}
  29 +
  30 +.container {
  31 + position: relative;
  32 + width: 600px;
  33 + height: 80px;
  34 +}
  35 +
  36 +.angucomplete-dropdown {
2 37 border-color: #ececec;
3 38 border-width: 1px;
4 39 border-style: solid;
... ... @@ -4,6 +4,8 @@
4 4 <head>
5 5 <link type="text/css" rel="stylesheet" href="styles/materialize.min.css" media="screen,projection"/>
6 6 <!--<link rel="stylesheet" href="styles/bootstrap-3.3.4-dist/css/bootstrap.css"/>-->
  7 + <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/0.9.0/angular-material.min.css">
  8 +
7 9 <link rel="stylesheet" href="flashy.css"/>
8 10 </head>
9 11  
... ... @@ -19,6 +21,9 @@
19 21 <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-cookies.js"></script>
20 22 <script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
21 23 <script type="text/javascript" src="scripts/materialize.min.js"></script>
  24 +<script src="https://ajax.googleapis.com/ajax/libs/angular_material/0.9.0/angular-material.min.js"></script>
  25 +<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-animate.min.js"></script>
  26 +<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-aria.min.js"></script>
22 27  
23 28 <script src="config.js"></script>
24 29  
... ... @@ -39,6 +44,9 @@
39 44 <script src="scripts/FlashcardDirective.js"></script>
40 45  
41 46 <!-- Other -->
  47 +<!--<script src="scripts/StudyController.js"></script>-->
  48 +<script src="scripts/UserService.js"></script>
  49 +<script src="scripts/ResetPasswordController.js"></script>
42 50 <script src="//ghiden.github.io/angucomplete-alt/js/libs/angucomplete-alt.js"></script>
43 51 <!--<script src="scripts/bootstrap.js"></script>-->
44 52  
scripts/ClassAddController.js View file @ 8607c44
1   -angular.module('flashy.ClassAddController', ['ui.router', 'angucomplete-alt']).
  1 +angular.module('flashy.ClassAddController', ['ui.router', 'angucomplete-alt', 'ngMaterial']).
2 2  
3   - controller('ClassAddController', ['$scope', '$state', function($scope, $state) {
  3 + controller('ClassAddController', ['$scope', '$state', '$http', function($scope, $state, $http) {
4 4  
5   - $scope.remoteUrlRequestFn = function(str) {
6   - return {q: str};
  5 + $scope.trySearch = function(searchText) {
  6 + return $http.get('/api/sections/search/', {
  7 + params: {
  8 + q: searchText
  9 + }
  10 + }).then(function(response) {
  11 + return response.data;
  12 + });
7 13 };
8   - $(document).ready(function() {
9   - });
  14 +
  15 + $scope.searchText = '';
  16 +
  17 + /*$scope.trySearch = function() {
  18 + $http.get('/api/sections/search', [$scope.searchText]).
  19 + success(function(data) {
  20 + return data;
  21 + }).
  22 + error(function(err) {
  23 + console.log('you eejit');
  24 + });
  25 + };*/
10 26  
11 27 }]);
scripts/DeckController.js View file @ 8607c44
1 1 var app = angular.module('flashy.DeckController', ['ui.router']);
2 2  
3   -app.controller('DeckController', ['$scope', function($scope) {
4   - $scope.hello = function() {
5   - alert('hello');
6   - };
  3 +app.controller('DeckController', ['$scope', '$http', function($scope, $http) {
  4 +
  5 +
  6 +
  7 + $scope.cards = [];
  8 +
  9 +
  10 +
  11 + $scope.cards[0] = { 'id': 1, 'title': 'title1', 'content': 'abc' };
  12 + $scope.cards[1] = { 'id': 2, 'title': 'title2', 'content': 'xyz' };
  13 + $scope.cards[2] = { 'id': 2, 'title': 'title3', 'content': 'qwe' };
  14 +
  15 +
  16 + $scope.removeCard = function(item) {
  17 +
  18 +
  19 + var index = $scope.cards.indexOf(item);
  20 +
  21 + $scope.cards.splice(index, 1);
  22 +
  23 + alert('removed card');
  24 + };
  25 +
  26 +
  27 + $http.get('/api/sections/{pk}/deck').
  28 + success(function(data) {
  29 +
  30 +
  31 + for (var i = 0; i < data.length; i++) {
  32 + cards.push({ 'title': data[i].title, 'content': data[i].content });
  33 + }
  34 + }).
  35 + error(function(data) {
  36 +
  37 + console.log('no cards?!!');
  38 +
  39 + });
  40 +
  41 +
  42 +
  43 +
7 44 }]);
scripts/FeedController.js View file @ 8607c44
1 1 angular.module('flashy.FeedController', ['ui.router']).
2 2  
3   - controller('FeedController', ['$scope', '$state', function($scope, $state) {
  3 + controller('FeedController', ['$scope', '$state', '$http', function($scope, $state, $http) {
4 4 console.log('Hello from feed');
5 5  
6   - $scope.createCard = function() {
7   -
8   - $(document).ready(function() {
9   - $('#createCardModal').modal('show');
10   - });
11   - };
12   -
13 6 $scope.viewDeck = function() {
14 7 $state.go('deck');
15 8 console.log('go to deck');
16 9 };
  10 +
  11 + $scope.pullCard = function() {
  12 + console.log('card clicked');
  13 + };
  14 +
  15 + $scope.create = false; // show make flashcard
  16 +
  17 + $scope.pushCard = function() {
  18 + console.log('make! card content:' + $scope.text);
  19 + var pushed = new Date(Date.now());
  20 + console.log(pushed.toString());
  21 +
  22 + // attempt to make card :(
  23 + $http.post('/api/flashcards/', {'text': $scope.text, 'pushed': pushed, 'mask': []}).
  24 + success(function(data) {
  25 + console.log('No way, really?');
  26 + }).
  27 + error(function(error) {
  28 + console.log('haha, n00b');
  29 + });
  30 +
  31 + $scope.create = false; // hide make flashcard
  32 + $scope.text = '';
  33 + };
  34 +
  35 + $scope.flashcard = 'hi i am a flashcard';
  36 + $scope.text = '';
17 37  
18 38 }]);
scripts/LoginController.js View file @ 8607c44
1 1 angular.module('flashy.LoginController', ['ui.router']).
2 2  
3 3 controller('LoginController', ['$scope', '$state', '$http', 'UserService',
4   - function ($scope, $state, $http, UserService) {
  4 + function($scope, $state, $http, UserService) {
5 5 'use strict';
6 6  
7 7 $scope.uniqueError = false;
8 8 $scope.loginError = false;
9   - $scope.login = function (email, password) {
  9 + $scope.login = function(email, password) {
10 10 $http.post('/api/login', JSON.stringify({
11 11 'email': email,
12 12 'password': password
13 13 })).
14   - success(function (data) {
  14 + success(function(data) {
15 15 UserService.getUserData();
16 16 $state.go('feed');
17 17 console.log(data);
18 18 }).
19   - error(function (data, status, header, config) {
  19 + error(function(data, status, header, config) {
20 20 if (data.detail) { // assume 'invalid email or pass'
21 21 $scope.loginError = true;
22 22 }
23 23 console.log(data);
24 24 });
25 25 };
26   - $scope.signUp = function (email, password) {
  26 + $scope.signUp = function(email, password) {
27 27 $http.post('/api/register', JSON.stringify({
28 28 'email': email,
29 29 'password': password
30 30 })).
31   - success(function (data) {
  31 + success(function(data) {
32 32 $state.go('feed');
33 33 console.log(data);
34 34 }).
35   - error(function (data, status, headers, config) {
  35 + error(function(data, status, headers, config) {
36 36 console.log(data.email);
37 37 if (data.email == 'This field is required.') {
38 38 $scope.invalid = true;
... ... @@ -46,7 +46,7 @@
46 46 });
47 47  
48 48 };
49   - $scope.triggerPasswordReset = function () {
  49 + $scope.triggerPasswordReset = function() {
50 50 $state.go('requestpasswordreset');
51 51 };
52 52 }
scripts/RequestResetController.js View file @ 8607c44
... ... @@ -21,8 +21,8 @@
21 21 console.log(data);
22 22 });
23 23 };
24   - $scope.cancel = function() {
25   - $state.go('home');
  24 + $scope.cancelReset = function() {
  25 + $state.go('login');
26 26 };
27 27 }
28 28 ]);
scripts/ResetPasswordController.js View file @ 8607c44
  1 +angular.module('flashy.ResetPasswordController', ['ui.router']).
  2 +
  3 + controller('ResetPasswordController', ['$scope', '$state', '$http',
  4 + function($scope, $state, $http) {
  5 + 'use strict';
  6 + var url = document.location.href.split("/");
  7 + var token = url[url.length-1];
  8 + var uid = url[url.length-2];
  9 + $scope.error = false;
  10 + $scope.confirmResetPass = function(newPassword) {
  11 + $http.post('/api/reset_password', JSON.stringify({
  12 + 'uid': uid,
  13 + 'token': token
  14 + }))
  15 + .success(function(data) {
  16 + $scope.error = false;
  17 + $state.go('resetpasssuccess');
  18 + console.log(data);
  19 + })
  20 + .error(function(data, status, header, config) {
  21 + $scope.error = true;
  22 + console.log(data);
  23 + });
  24 + };
  25 + $scope.cancelReset = function() {
  26 + $state.go('login');
  27 + };
  28 + }
  29 + ]);
scripts/RootController.js View file @ 8607c44
1 1 angular.module('flashy.RootController', ['ui.router']).
2 2  
3   - controller('RootController', ['$scope', '$state', 'UserService', function ($scope, $state, UserService) {
  3 + controller('RootController', ['$scope', '$state', 'UserService', function($scope, $state, UserService) {
4 4 if (UserService.isLoggedIn()) $state.go('login');
5 5 else $state.go('addclass');
6 6 }]);
templates/addclass.html View file @ 8607c44
1   -<div angucomplete-alt id="classes"
2   - placeholder="Search classes"
3   - pause="100"
4   - selected-object="selectedClass"
5   - remote-url="/api/sections/search/"
6   - remote-url-request-formatter="remoteUrlRequestFn" ,
7   - remote-url-data-field="" ,
8   - title-field="short_name" ,
9   - description-field="long_name" ,
10   - minlength="2" ,
11   - pause="0" ,
12   - input-class="form-control"/>
  1 +<div>
  2 +
  3 + <div layout="column">
  4 + <md-content layout-padding="" layout="column" style="overflow:hidden">
  5 +
  6 + <form ng-submit="$event.preventDefault()">
  7 + <div layout="column">
  8 + <md-autocomplete flex=""
  9 + md-autofocus="true"
  10 + md-selected-item="selectedItem"
  11 + md-search-text="searchText"
  12 + md-items="item in trySearch(searchText)"
  13 + md-item-text="item.short_name"
  14 + >
  15 + <md-item-template>
  16 + <div layout="row">
  17 + <div>{{item.short_name}}: {{item.course_title}} ({{item.instructor}})</div>
  18 + <div style="margin-left:auto;text-align:right;padding-left:30px">{{item.lecture_times}}</div>
  19 + </div>
  20 + </md-item-template>
  21 + <md-not-found>
  22 + No classes match "{{searchText}}".
  23 + </md-not-found>
  24 + </md-autocomplete>
  25 + </div>
  26 + </form>
  27 + </md-content>
  28 + </div>
  29 +</div>
templates/deck.html View file @ 8607c44
1   -<!DOCTYPE html>
2   -<html ng-app="flashy">
3   - <head>
4   -
5   - <link rel="stylesheet" href="styles/bootstrap-3.3.4-dist/css/bootstrap.css" />
6   - <link rel="stylesheet" href="flashy.css" />
  1 +<div class="row">
7 2  
8   - </head>
9   - <body ng-controller="DeckController">
  3 + <div ng-repeat="card in cards">
10 4  
11   - <button type="button" ng-click="hello()">SUPPPP</button>
  5 + <div class="col s6">
12 6  
13   - <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>
14   - <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.14/angular-ui-router.js"></script>
15   - <script src="/app/config.js"></script>
16   - <!--<script src="controller.js"></script>-->
  7 + <div class="card">
17 8  
18   - <script src="DeckController.js"></script>
19   - </body>
20   -</html>
21 9  
22 10  
23   - <script src="viewDeckController.js"></script>
24   - </body>
25   -</html>
  11 + <div class="card-image">
  12 + <span class="card-title">{{card.title}}</span>
  13 + </div>
  14 + <div class="card-content">
  15 +
  16 +
  17 +
  18 + <p>
  19 + {{card.content}}
  20 +
  21 +
  22 + </p>
  23 + </div>
  24 +
  25 +
  26 +
  27 + <div class="card-action">
  28 +
  29 +
  30 + <button type="button" class="waves-effect waves-light btn" ng-click="removeCard()">Remove</button>
  31 +
  32 +
  33 + </div>
  34 +
  35 + </div>
  36 +
  37 + </div>
  38 +
  39 +
  40 + </div>
  41 +</div>
  42 +
templates/feed.html View file @ 8607c44
1   -<h2>cards go here or something</h2>
  1 + <div class="col s9">
  2 + <div class="row">
  3 + <a class="waves-effect waves-light btn purple" ng-click="viewDeck()" style="top: 15px">View Deck</a>
  4 + </div>
2 5  
  6 + <!--random dummy cards-->
  7 + <div class="row">
  8 + <div class="col s1 m2 l4">
  9 + <div class="card-panel" ng-click="pullCard()">
  10 + <span>{{ flashcard }}</span>
  11 + </div>
  12 + </div>
3 13  
4   -<button type="button" ng-click="viewDeck()">View Deck</button>
5   -
6   -
7   -
8   -<button type="button" id="createCardModal" ng-click="createCard()" data-toggle="modal" data-target="#createCardModal">CREATE A CARD</button>
9   -
10   -<div id="createCardModal" class="modal fade" aria-labelledby="createCardModal" aria-hidden="true">
11   - <div class="modal-dialog">
12   - <div class="modal-content">
13   -
14   - <div class="modal-header">
15   - <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
16   - <h4 class="modal-title">Confirmation</h4>
17   - </div>
18   - <div class="modal-footer">
19   - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
20   - <button type="button" class="btn btn-primary">Save changes</button>
21   - </div>
  14 + <div class="col s1 m2 l4">
  15 + <div class="card" ng-click="pullCard()">
  16 + <div class="card-content">
  17 + <span class="card-title activator grey-text text-darken-4">{{ flashcard }}<i class="mdi-navigation-more-vert right"></i></span>
22 18 </div>
  19 + <div class="card-reveal">
  20 + <span class="card-title grey-text text-darken-4">{{ flashcard }}<i class="mdi-navigation-close right"></i></span>
  21 + <p>Herro der. I see you have found me.</p>
  22 + </div>
  23 + </div>
23 24 </div>
  25 +
  26 + <div class="col s1 m2 l4">
  27 + <div class="card-panel" ng-click="pullCard()">
  28 + <span>{{ flashcard }}</span>
  29 + </div>
  30 + </div>
  31 +
  32 + <!--New flashcard (still working on placement)-->
  33 + <div class="row" ng-show="create">
  34 + <form class="col s6 offset-s10" ng-submit="pushCard()">
  35 + <div class="row">
  36 + <div class="input-field col s12">
  37 + <i class="mdi-editor-mode-edit prefix"></i>
  38 + <textarea class="materialize-textarea" ng-model="text" name="text"></textarea>
  39 + <label id="newCardSign" for="newCard">New Flashcard</label>
  40 + <div class="container">
  41 + <button class="btn waves-effect waves-light purple" type="submit" name="action">Submit
  42 + <i class="mdi-content-send right"></i>
  43 + </button>
  44 + </div>
  45 + </div>
  46 + </div>
  47 + </form>
  48 + </div>
  49 +
  50 + <!--Lil plus button in corner-->
  51 + <div class="fixed-action-btn" ng-click="create = !create" style="bottom: 45px; right: 24px;">
  52 + <a class="btn-floating btn-large purple">
  53 + <i class="large mdi-content-add"></i>
  54 + </a>
  55 + <!--Maybe this will come in handy later? Floating bubbles on mouseover-->
  56 + <ul>
  57 + <li><a class="btn-floating red"><i class="large mdi-editor-insert-chart"></i></a></li>
  58 + <li><a class="btn-floating yellow darken-1"><i class="large mdi-editor-format-quote"></i></a></li>
  59 + <li><a class="btn-floating green"><i class="large mdi-editor-publish"></i></a></li>
  60 + <li><a class="btn-floating blue"><i class="large mdi-editor-attach-file"></i></a></li>
  61 + </ul>
  62 + </div>
24 63 </div>
templates/login.html View file @ 8607c44
1 1 <div class="container">
2 2 <div class="row">
3   - <form id="loginform" class="col s12 right-align" ng-submit="login(loginEmail, loginPassword)">
  3 + <div class="col s6">
  4 + <ul class="tabs" tabs>
  5 + <li class="tab col s3"><a href="#register-tab">Sign Up</a></li>
  6 + <li class="tab col s3"><a class="active" href="#login-tab">Login</a></li>
  7 + </ul>
  8 + </div>
  9 + <!--LOGIN TAB-->
  10 + <div id="login-tab" class="col s12">
4 11 <div class="check-element animate-show" role="alert" ng-show="loginError">
5   - <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
6 12 <span style="color:#8E2323">Invalid username or password!!</span>
7 13 </div>
8 14 <div class="row">
9 15 <div class="input-field col s6">
10   - <input type="email" class="validate" ng-model="loginEmail" required/>
  16 + <input id="email" type="email" class="validate" ng-model="loginEmail" placeholder="Email" required/>
11 17 <label for="email">Email</label>
12 18 </div>
  19 + </div>
  20 + <div class="row">
13 21 <div class="input-field col s6">
14   - <input type="password" class="validate" ng-model="loginPassword" required/>
  22 + <input id="password" type="password" class="validate" ng-model="loginPassword" placeholder="Password" required/>
15 23 <label for="password">Password</label>
16 24 </div>
17 25 </div>
18   - <button class="btn waves-effect waves-light right-align" type="" name="action"
19   - ng-click="signUp(loginEmail, loginPassword)">Register
20   - </button>
21   - <button class="btn waves-effect waves-light right-align" type="submit" name="action"
22   - ng-click="login(loginEmail, loginPassword)">Login
23   - </button>
24   -
25   - </form>
26   - <a class="trigger-password-reset" ng-click="triggerPasswordReset()" href="#">Forgot Password?</a>
  26 + <div class="row">
  27 + <button class="btn waves-effect waves-light right-align" type="submit" name="action"
  28 + ng-click="login(loginEmail, loginPassword)">Login
  29 + </button>
  30 + </div>
  31 + </div>
  32 + <!--REGISTER TAB-->
  33 + <div id="register-tab" class="col s12">
  34 + <div class="row">
  35 + <div class="input-field col s6">
  36 + <input type="email" class="validate" ng-model="loginEmail" placeholder="Email" required/>
  37 + <label for="email">Email</label>
  38 + </div>
  39 + </div>
  40 + <div class="row">
  41 + <div class="input-field col s6">
  42 + <input type="password" class="validate" ng-model="registerPassword" placeholder="Password" required/>
  43 + <label for="password">Password</label>
  44 + </div>
  45 + </div>
  46 + <div class="row">
  47 + <button class="btn waves-effect waves-light left-align" type="" name="action"
  48 + ng-click="signUp(loginEmail, registerPassword)">Register
  49 + </button>
  50 + </div>
  51 + </div>
27 52 </div>
  53 + <a class="trigger-password-reset" ng-click="triggerPasswordReset()" href="#">Forgot Password?</a>
28 54 </div>
templates/requestpasswordreset.html View file @ 8607c44
... ... @@ -5,15 +5,15 @@
5 5 <div name="passreset" class="form-section">
6 6 <form class="form-inputs" name="passreset_form">
7 7 <div class="check-element animate-show" role="alert" ng-show="invalid">
8   - <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
9 8 <span style="color:#8E2323">Enter a valid email!</span>
10 9 </div>
  10 + <!--FORM INPUTS-->
11 11 <div class="form-group">
12 12 <input type="email" class="form-control" ng-model="user_email" placeholder="Email" required />
13 13 </div>
14   - <div class="form-buttons">
  14 + <div class="row">
15 15 <div class="btn-group">
16   - <button type="button" class="btn btn-default" ng-click="cancel()"><strong>Cancel</strong></button>
  16 + <button type="button" class="btn btn-default" ng-click="cancelReset()"><strong>Cancel</strong></button>
17 17 </div>
18 18 <div class="last-button">
19 19 <div class="btn-group">
templates/resetpassword.html View file @ 8607c44
  1 +<div class="container">
  2 + <div class="row">
  3 + <h1>Reset Password</h1>
  4 + </div>
  5 +
  6 + <div class="row">
  7 + <form class="col s12">
  8 + <div class="row" ng-show="error" role="alert">
  9 + <i style="color:#8E2323" class="mdi-alert-error"></i>
  10 + <span style="color:#8E2323">Please use link from email!</span>
  11 + </div>
  12 + <div class="row">
  13 + <input id="newpassword" type="password" class="validate" ng-model="newPassword" placeholder="New password" required/>
  14 + <label for="newpassword">New password</label>
  15 + </div>
  16 + <div class="row">
  17 + <input id="confirmpassword" type="password" class="validate" ng-model="confirmPassword" placeholder="Confirm password" required/>
  18 + <label for="confirmpassword">Confirm password</label>
  19 + </div>
  20 + </form>
  21 + <div class="row">
  22 + <button class="btn waves-effect waves-light red" type="submit" name="action"
  23 + ng-click="cancelReset()">Cancel
  24 + </button>
  25 + <button class="btn waves-effect waves-light green" type="submit" name="action"
  26 + ng-click="confirmResetPass(newPassword)">Confirm
  27 + </button>
  28 + </div>
  29 + </div>
  30 +</div>