got email verification to work
This commit is contained in:
parent
fe6ab55b47
commit
f0c0b27329
|
@ -27,7 +27,8 @@
|
||||||
"lodash": "~3.10.0",
|
"lodash": "~3.10.0",
|
||||||
"angular-ui-sortable": "~0.13.4",
|
"angular-ui-sortable": "~0.13.4",
|
||||||
"angular-busy": "~4.1.3",
|
"angular-busy": "~4.1.3",
|
||||||
"angular-permission": "~0.3.1"
|
"angular-permission": "~0.3.1",
|
||||||
|
"angular-input-stars": "*"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"angular": "~1.3.17"
|
"angular": "~1.3.17"
|
||||||
|
|
34
public/dist/application.js
vendored
34
public/dist/application.js
vendored
|
@ -113,7 +113,7 @@ ApplicationConfiguration.registerModule('core', ['users']);
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Use Application configuration module to register a new module
|
// Use Application configuration module to register a new module
|
||||||
ApplicationConfiguration.registerModule('forms', ['ngFileUpload', 'ui.date', 'ui.sortable', 'users']);
|
ApplicationConfiguration.registerModule('forms', ['ngFileUpload', 'ui.date', 'ui.sortable', 'angular-input-stars', 'users']);
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Use Application configuration module to register a new module
|
// Use Application configuration module to register a new module
|
||||||
|
@ -1180,7 +1180,8 @@ angular.module('forms').directive('fieldDirective', function($http, $compile) {
|
||||||
'hidden',
|
'hidden',
|
||||||
'password',
|
'password',
|
||||||
'radio',
|
'radio',
|
||||||
'legal'
|
'legal',
|
||||||
|
'statement'
|
||||||
];
|
];
|
||||||
if (__indexOf.call(supported_fields, type) >= 0) {
|
if (__indexOf.call(supported_fields, type) >= 0) {
|
||||||
return templateUrl += type + '.html';
|
return templateUrl += type + '.html';
|
||||||
|
@ -1375,6 +1376,10 @@ angular.module('forms').service('FormFields', [
|
||||||
name : 'checkbox',
|
name : 'checkbox',
|
||||||
value : 'Checkbox'
|
value : 'Checkbox'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name : 'yes-no',
|
||||||
|
value : 'Yes or No'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name : 'legal',
|
name : 'legal',
|
||||||
value : 'Legal'
|
value : 'Legal'
|
||||||
|
@ -1383,14 +1388,14 @@ angular.module('forms').service('FormFields', [
|
||||||
// name : 'file',
|
// name : 'file',
|
||||||
// value : 'File Upload'
|
// value : 'File Upload'
|
||||||
// },
|
// },
|
||||||
// {
|
{
|
||||||
// name : 'rating',
|
name : 'rating',
|
||||||
// value : 'Rating'
|
value : 'Rating'
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name : 'link',
|
name : 'link',
|
||||||
// value : 'Link'
|
value : 'Link'
|
||||||
// },
|
},
|
||||||
// {
|
// {
|
||||||
// name : 'scale',
|
// name : 'scale',
|
||||||
// value : 'Opinion Scale'
|
// value : 'Opinion Scale'
|
||||||
|
@ -1789,10 +1794,13 @@ angular.module('users').controller('VerifyController', ['$scope', '$state', '$ro
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.isReset = false;
|
$scope.isReset = false;
|
||||||
|
$scope.credentials = {};
|
||||||
|
|
||||||
|
|
||||||
// Submit forgotten password account id
|
// Submit forgotten password account id
|
||||||
$scope.resendVerifyEmail = function() {
|
$scope.resendVerifyEmail = function() {
|
||||||
User.resendVerifyEmail($scope.email).then(
|
console.log($scope.credentials.email);
|
||||||
|
User.resendVerifyEmail($scope.credentials.email).then(
|
||||||
function(response){
|
function(response){
|
||||||
$scope.success = response.message;
|
$scope.success = response.message;
|
||||||
$scope.credentials = null;
|
$scope.credentials = null;
|
||||||
|
@ -1985,9 +1993,9 @@ angular.module('users').factory('User', ['$window', '$q', '$timeout', '$http', '
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
},
|
},
|
||||||
|
|
||||||
resendVerifyEmail: function(email) {
|
resendVerifyEmail: function(_email) {
|
||||||
var deferred = $q.defer();
|
var deferred = $q.defer();
|
||||||
$http.post('/auth/verify/', {email: email}).success(function(response) {
|
$http.post('/auth/verify/', {email: _email}).success(function(response) {
|
||||||
deferred.resolve(response);
|
deferred.resolve(response);
|
||||||
}).error(function(error) {
|
}).error(function(error) {
|
||||||
deferred.reject(error.message || error);
|
deferred.reject(error.message || error);
|
||||||
|
|
Loading…
Reference in a new issue