This commit is contained in:
David Baldwynn 2016-07-04 20:34:42 -04:00
commit 07edde27f8
17 changed files with 78 additions and 56 deletions

View file

@ -13,6 +13,9 @@ exports.index = function(req, res) {
};
exports.form = function(req, res) {
//Allow form to be embeded
res.removeHeader('X-Frame-Options');
res.render('form', {
user: req.user || null,
request: req

View file

@ -285,10 +285,6 @@ exports.read = function(req, res) {
var newForm = req.form.toJSON({virtuals : true});
newForm.plugins.oscarhost.settings.validUpdateTypes = validUpdateTypes;
if(newForm){
return res.json(newForm);
}
if (req.userId) {
if(req.form.admin._id+'' === req.userId+''){
return res.json(newForm);
@ -296,14 +292,9 @@ exports.read = function(req, res) {
return res.status(404).send({
message: 'Form Does Not Exist'
});
}else {
if(newForm) return res.json(newForm);
}
/*return res.status(404).send({
message: 'Form Does Not Exist'
});*/
return res.json(newForm);
};
/**

View file

@ -100,7 +100,6 @@ exports.resendVerificationEmail = function(req, res, next){
*/
exports.signup = function(req, res) {
// For security measures we remove the roles from the req.body object
if (req.body) {
delete req.body.roles;
// Init Variables
@ -140,9 +139,6 @@ exports.signup = function(req, res) {
}
}
});
} else {
res.status(500).send('Incomplete Data');
}
};
/**

View file

@ -9,7 +9,13 @@ var mongoose = require('mongoose'),
config = require('../../config/config'),
fs = require('fs-extra'),
mUtilities = require('mongoose-utilities'),
path = require('path');
path = require('path'),
querystring = require('querystring'),
config = require('../../config/config'),
nodemailer = require('nodemailer');
var smtpTransport = nodemailer.createTransport(config.mailer.options);
/**
* A Validation function for local strategy properties
@ -126,8 +132,29 @@ UserSchema.plugin(mUtilities.timestamp, {
useVirtual: false
});
//Create folder for user's pdfs
UserSchema.pre('save', function (next) {
//Change username if it is still the user's email
if(this.username === this.email){
var emailUsername = this.email.split('@')[0];
this.username = querystring.stringify({ query: emailUsername });
var mailOptions = {
from: '"TellForm Support" <noreply@tellform.com>', // sender address
to: this.email, // list of receivers
subject: 'Your TellForm Username has Changed', // Subject line
text: 'Due to upgrades, your TellForm username has change from ' + this.email + ' to ' + this.username + '. Please use your new username to login.\n Using your old username will not work.\n We apologize for the inconvenience,\n - the TellForm team', // plaintext body
};
transporter.sendMail(mailOptions, function(error, info){
if(error){
return console.error(error);
}
console.log('Username change message sent: ' + info.response);
});
}
//Create folder for user's pdfs
if(process.env.NODE_ENV === 'local-development'){
var newDestination = path.join(config.pdfUploadPath, this.username.replace(/ /g,'')),
stat = null;

View file

@ -29,10 +29,6 @@ module.exports = function(app) {
app.route('/upload/pdf')
.post(users.requiresLogin, upload.single('file'), forms.uploadPDF);
//TODO: Need to finish this for file upload field
//app.route('/forms/:formId([a-zA-Z0-9]+)/upload')
// .post(forms.uploadSubmissionFile);
app.route('/forms')
.get(users.requiresLogin, forms.list)
.post(users.requiresLogin, forms.create);

View file

@ -74,7 +74,8 @@ module.exports = function(db) {
var subdomains = req.subdomains;
var host = req.hostname;
console.log(subdomains);
console.log(host);
// remove www if chosen to ignore
if (ignoreWWW) {
var wwwi = subdomains.indexOf('www');

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

View file

@ -86,7 +86,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
" <button type=\"submit\" ng-click=\"removeCurrentForm()\" class=\"btn btn-block btn-danger\" ng-disabled=\"myform.title != deleteConfirm\">\n" +
" {{ 'I_UNDERSTAND' | translate }}\n" +
" </button>\n" +
" </div></script><div class=\"page-header row\" style=\"padding-bottom: 0px\"><div class=\"col-xs-10 col-sm-8\"><h1 class=\"hidden-sm hidden-xs\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h1><h2 class=\"hidden-md hidden-lg\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h2></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><button class=\"btn btn-danger\" ng-click=openDeleteModal()><i class=\"fa fa-trash-o\"></i> <span class=\"show-sm hidden-lg hidden-md hidden-xs\">{{ 'DELETE_FORM_SM' | translate}}</span> <span class=\"hidden-xs hidden-sm\">{{ 'DELETE_FORM_MD' | translate}}</span></button></small></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><a class=\"btn btn-default view-form-btn\" href=//{{formURL}}/#!/forms/{{myform._id}}><span class=\"hidden-xs hidden-sm\">{{ 'VIEW' | translate }} <span ng-show=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-hide=myform.isLive>{{ 'PREVIEW' | translate }}</span> {{ 'FORM' | translate }}</span> <span class=\"hidden-xs hidden-md hidden-lg\">View <span ng-if=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-if=!myform.isLive>{{ 'PREVIEW' | translate }}</span></span> <i class=\"status-light status-light-on fa fa-dot-circle-o\" ng-if=myform.isLive></i> <i class=\"status-light status-light-off fa fa-dot-circle-o\" ng-if=!myform.isLive></i></a></small></div></div><div class=row><div class=col-xs-12><tabs data=tabData></tabs></div><div class=col-xs-12><ui-view></ui-view></div></div></section>");
" </div></script><div class=\"page-header row\" style=\"padding-bottom: 0px\"><div class=\"col-xs-10 col-sm-8\"><h1 class=\"hidden-sm hidden-xs\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h1><h2 class=\"hidden-md hidden-lg\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h2></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><button class=\"btn btn-danger\" ng-click=openDeleteModal()><i class=\"fa fa-trash-o\"></i> <span class=\"show-sm hidden-lg hidden-md hidden-xs\">{{ 'DELETE_FORM_SM' | translate}}</span> <span class=\"hidden-xs hidden-sm\">{{ 'DELETE_FORM_MD' | translate}}</span></button></small></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><a class=\"btn btn-default view-form-btn\" href=/#!/forms/{{myform._id}}><span class=\"hidden-xs hidden-sm\">{{ 'VIEW' | translate }} <span ng-show=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-hide=myform.isLive>{{ 'PREVIEW' | translate }}</span> {{ 'FORM' | translate }}</span> <span class=\"hidden-xs hidden-md hidden-lg\">View <span ng-if=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-if=!myform.isLive>{{ 'PREVIEW' | translate }}</span></span> <i class=\"status-light status-light-on fa fa-dot-circle-o\" ng-if=myform.isLive></i> <i class=\"status-light status-light-off fa fa-dot-circle-o\" ng-if=!myform.isLive></i></a></small></div></div><div class=row><div class=col-xs-12><tabs data=tabData></tabs></div><div class=col-xs-12><ui-view></ui-view></div></div></section>");
$templateCache.put("modules/forms/admin/views/list-forms.client.view.html",
"<section class=overlay ng-if=showCreateModal ng-click=closeCreateModal()></section><section data-ng-controller=\"ListFormsController as ctrl\" data-ng-init=findAll() class=container><br><div class=row><div ng-click=openCreateModal() class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new\"><div class=\"title-row col-xs-12\"><h4 class=\"fa fa-plus fa-6\"></h4></div><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATE_A_NEW_FORM' | translate }}</small></div></div><form name=forms.createForm class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new new-form\" ng-if=showCreateModal><div class=\"title-row row\"><div class=\"col-xs-5 field-title text-left\">Name</div><div class=\"col-xs-12 field-input\"><input name=title required ng-model=formTitle ng-pattern=languageRegExp ng-minlength=4 style=\"color:black\"></div></div><div class=\"details-row row\"><div class=\"col-xs-5 field-title text-left\">Language</div><div class=\"col-xs-12 field-input\"><div class=\"button custom-select\"><select style=color:black name=language required ng-model=formLanguage ng-init=\"formLanguage = user.language\"><option ng-repeat=\"language in languages\" value={{language}}>{{language}}</option></select></div></div></div><div class=\"details-row submit row\"><div class=\"col-xs-12 field-title text-center\"><button class=\"btn btn-primary\" ng-disabled=forms.createForm.$invalid ng-click=createNewForm()>{{ 'CREATE_FORM' | translate }}</button></div></div></form><div data-ng-repeat=\"form in myforms\" ng-style=\"{ 'background-color': form.design.colors.backgroundColor, 'color': form.design.colors.answerColor }\" class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container\"><div class=row><span class=pull-right><i style=cursor:pointer class=\"fa fa-trash-o\" ng-click=removeForm($index)></i> <i style=cursor:pointer class=\"fa fa-files-o\" ng-click=duplicateForm($index)></i></span></div><div class=row><a data-ng-href=#!/forms/{{form._id}}/admin/create ng-style=\"{ 'color': form.design.colors.answerColor }\" class=\"title-row col-xs-12\"><h4 class=list-group-item-heading data-ng-bind=form.title></h4></a></div><div class=\"row footer\"><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATED_ON' | translate }} <span data-ng-bind=\"form.created | date:'shortDate'\"></span></small></div></div></div></div></section>");
$templateCache.put("modules/forms/base/views/submit-form.client.view.html",
@ -149,7 +149,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
$templateCache.put("modules/users/views/authentication/signup-success.client.view.html",
"<section class=\"row auth signup-view success\" data-ng-controller=AuthenticationController><h3 class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center\">{{ 'SUCCESS_HEADER' | translate }}</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><h2>{{ 'SUCCESS_TEXT' | translate }}<br><br>{{ 'NOT_ACTIVATED_YET' | translate }}</h2><br><br><p><strong>{{ 'BEFORE_YOU_CONTINUE' | translate }}</strong> <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\"><a href=\"/#!/\" style=\"color: white; text-decoration: none\">Continue</a></button></div></div></section>");
$templateCache.put("modules/users/views/authentication/signup.client.view.html",
"<section class=\"row auth signup-view\" data-ng-controller=AuthenticationController><h3 class=\"col-md-12 text-center\">Signup with your email</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form name=userForm data-ng-submit=signup() class=\"signin form-horizontal\" novalidate autocomplete=off><fieldset><div data-ng-show=error id=signup_errors class=\"text-center text-danger\">Couldn't complete registration due to errors:<br><strong data-ng-bind=error></strong></div><div class=form-group><label for=firstName>{{ 'FIRST_NAME_LABEL' | translate }}</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=firstName name=firstName class=form-control ng-model=credentials.firstName placeholder=\"First Name\"></div><div class=form-group><label for=lastName>{{ 'LAST_NAME_LABEL' | translate }}</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=lastName name=lastName class=form-control ng-model=credentials.lastName placeholder=\"Last Name\"></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'LANGUAGE_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><select ng-model=user.language required><option ng-repeat=\"language in languages\" ng-selected=\"language == user.language\" value={{language}}>{{language}}</option></select></div></div><hr><div class=form-group><label for=email>{{ 'USERNAME_LABEL' | translate }}</label><input type=email id=username name=username class=form-control ng-model=credentials.username placeholder=Email></div><div class=form-group><label for=email>{{ 'EMAIL_LABEL' | translate }}</label><input type=email id=email name=email class=form-control ng-model=credentials.email placeholder=Email></div><div class=form-group><label for=password>{{ 'PASSWORD_LABEL' | translate }}</label><input type=password id=password name=password class=form-control ng-model=credentials.password placeholder=Password></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\">{{ 'SIGNUP_BTN' | translate }}</button></div></fieldset></form></div></section>");
"<section class=\"row auth signup-view\" data-ng-controller=AuthenticationController><h3 class=\"col-md-12 text-center\">Signup with your email</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form name=userForm data-ng-submit=signup() class=\"signin form-horizontal\" novalidate autocomplete=off><fieldset><div data-ng-show=error id=signup_errors class=\"text-center text-danger\">Couldn't complete registration due to errors:<br><strong data-ng-bind=error></strong></div><div class=form-group><label for=firstName>{{ 'FIRST_NAME_LABEL' | translate }}</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=firstName name=firstName class=form-control ng-model=credentials.firstName placeholder=\"First Name\"></div><div class=form-group><label for=lastName>{{ 'LAST_NAME_LABEL' | translate }}</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=lastName name=lastName class=form-control ng-model=credentials.lastName placeholder=\"Last Name\"></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'LANGUAGE_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><select ng-model=user.language required><option ng-repeat=\"language in languages\" ng-selected=\"language == user.language\" value={{language}}>{{language}}</option></select></div></div><hr><div class=form-group><label for=email>{{ 'EMAIL_LABEL' | translate }}</label><input type=email id=email name=email class=form-control ng-model=credentials.email placeholder=Email></div><div class=form-group><label for=password>{{ 'PASSWORD_LABEL' | translate }}</label><input type=password id=password name=password class=form-control ng-model=credentials.password placeholder=Password></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\">{{ 'SIGNUP_BTN' | translate }}</button></div></fieldset></form></div></section>");
$templateCache.put("modules/users/views/password/forgot-password.client.view.html",
"<section class=\"auth row\" data-ng-controller=PasswordController><h3 class=\"col-md-12 text-center\">{{ 'PASSWORD_RESTORE_HEADER' | translate }}</h3><p class=\"small text-center\">{{ 'ENTER_YOUR_EMAIL' | translate }}</p><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=askForPasswordReset() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=username name=username class=form-control data-ng-model=credentials.username placeholder=\"{{ 'USERNAME_LABEL' | translate }}\"></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-primary\">{{ 'UPDATE_PASSWORD_LABEL' | translate }}</button></div><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div data-ng-show=success class=\"text-center text-success\"><strong>{{success}}</strong></div></fieldset></form></div></section>");
$templateCache.put("modules/users/views/password/reset-password-invalid.client.view.html",
@ -161,11 +161,11 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
$templateCache.put("modules/users/views/settings/change-password.client.view.html",
"<section class=\"row auth\" data-ng-controller=SettingsController><h3 class=\"col-md-12 text-center\">Change your password</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=changeUserPassword() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><label for=currentPassword>Current Password</label><input type=password id=currentPassword name=currentPassword class=form-control data-ng-model=passwordDetails.currentPassword placeholder=\"Current Password\"></div><hr><div class=form-group><label for=newPassword>{{ 'NEW_PASSWORD_LABEL' | translate }}</label><input type=password id=newPassword name=newPassword class=form-control data-ng-model=passwordDetails.newPassword placeholder=\"New Password\"></div><div class=form-group><label for=verifyPassword>{{ 'VERIFY_PASSWORD_LABEL' | translate }}</label><input type=password id=verifyPassword name=verifyPassword class=form-control data-ng-model=passwordDetails.verifyPassword placeholder=\"Verify Password\"></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\">{{ 'SAVE_PASSWORD_BTN' | translate }}</button></div><div data-ng-show=success class=\"text-center text-success\"><strong>{{ 'PASSWORD_CHANGE_SUCCESS' | translate }}</strong></div><div data-ng-show=error class=\"text-center text-danger\"><strong data-ng-bind=error></strong></div></fieldset></form></div></section>");
$templateCache.put("modules/users/views/settings/edit-profile.client.view.html",
"1<section class=\"row auth\" data-ng-controller=SettingsController><h3 class=\"col-xs-offset-1 col-xs-10 text-center\">Edit your profile</h3><div class=\"col-xs-offset-3 col-xs-6\"><form name=userForm data-ng-submit=updateUserProfile(userForm.$valid) class=\"signin form-horizontal\" autocomplete=off><fieldset><div data-ng-show=success class=\"text-center text-success\"><strong>{{ 'PROFILE_SAVE_SUCCESS' | translate }}</strong></div><div data-ng-show=error class=\"text-center text-danger\">{{ 'PROFILE_SAVE_ERROR' | translate }}<br><strong data-ng-bind=error></strong></div><div class=\"form-group row\"><div class=\"col-xs-7 field-title\"><b>{{ 'FIRST_NAME_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><input id=firstName name=firstName class=form-control data-ng-model=user.firstName placeholder=\"First Name\" ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\"></div></div><div class=\"form-group row\"><div class=\"col-xs-7 field-title\"><b>Last Name</b></div><div class=\"col-xs-12 field-input\"><input id=lastName name=lastName class=form-control data-ng-model=user.lastName placeholder=\"Last Name\" ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\"></div></div><div class=row><hr></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'LANGUAGE_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><select ng-model=user.language required><option ng-repeat=\"language in languages\" ng-selected=\"language == user.language\" value={{language}}>{{language}}</option></select></div></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>Username</b></div><div class=\"col-xs-12 field-input\"><input id=username name=username class=form-control data-ng-model=user.username placeholder=Username></div></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'EMAIL_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><input type=email id=email name=email class=form-control data-ng-model=user.email placeholder=Email></div></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\" style=font-size:1.6em>{{ 'SUBMIT_BTN' | translate }}</button></div></fieldset></form></div></section>");
"<section class=\"row auth\" data-ng-controller=SettingsController><h3 class=\"col-xs-offset-1 col-xs-10 text-center\">Edit your profile</h3><div class=\"col-xs-offset-3 col-xs-6\"><form name=userForm data-ng-submit=updateUserProfile(userForm.$valid) class=\"signin form-horizontal\" autocomplete=off><fieldset><div data-ng-show=success class=\"text-center text-success\"><strong>{{ 'PROFILE_SAVE_SUCCESS' | translate }}</strong></div><div data-ng-show=error class=\"text-center text-danger\">{{ 'PROFILE_SAVE_ERROR' | translate }}<br><strong data-ng-bind=error></strong></div><div class=\"form-group row\"><div class=\"col-xs-7 field-title\"><b>{{ 'FIRST_NAME_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><input id=firstName name=firstName class=form-control data-ng-model=user.firstName placeholder=\"First Name\" ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\"></div></div><div class=\"form-group row\"><div class=\"col-xs-7 field-title\"><b>Last Name</b></div><div class=\"col-xs-12 field-input\"><input id=lastName name=lastName class=form-control data-ng-model=user.lastName placeholder=\"Last Name\" ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\"></div></div><div class=row><hr></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'LANGUAGE_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><select ng-model=user.language required><option ng-repeat=\"language in languages\" ng-selected=\"language == user.language\" value={{language}}>{{language}}</option></select></div></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'EMAIL_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><input type=email id=email name=email class=form-control data-ng-model=user.email placeholder=Email></div></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\" style=font-size:1.6em>{{ 'SUBMIT_BTN' | translate }}</button></div></fieldset></form></div></section>");
$templateCache.put("modules/users/views/settings/social-accounts.client.view.html",
"<section class=\"row auth\" data-ng-controller=SettingsController><h3 class=\"col-md-12 text-center\" data-ng-show=hasConnectedAdditionalSocialAccounts()>Connected social accounts:</h3><div class=\"col-md-12 text-center\"><div data-ng-repeat=\"(providerName, providerData) in user.additionalProvidersData\" class=remove-account-container><img ng-src=/modules/users/img/buttons/{{providerName}}.png> <a class=\"btn btn-danger btn-remove-account\" data-ng-click=removeUserSocialAccount(providerName)><i class=\"glyphicon glyphicon-trash\"></i></a></div></div><h3 class=\"col-md-12 text-center\">Connect other social accounts:</h3><div class=\"col-md-12 text-center\"><a href=/auth/facebook data-ng-hide=\"isConnectedSocialAccount('facebook')\" class=undecorated-link><img src=/modules/users/img/buttons/facebook.png></a> <a href=/auth/twitter data-ng-hide=\"isConnectedSocialAccount('twitter')\" class=undecorated-link><img src=/modules/users/img/buttons/twitter.png></a> <a href=/auth/google data-ng-hide=\"isConnectedSocialAccount('google')\" class=undecorated-link><img src=/modules/users/img/buttons/google.png></a> <a href=/auth/linkedin data-ng-hide=\"isConnectedSocialAccount('linkedin')\" class=undecorated-link><img src=/modules/users/img/buttons/linkedin.png></a> <a href=/auth/github data-ng-hide=\"isConnectedSocialAccount('github')\" class=undecorated-link><img src=/modules/users/img/buttons/github.png></a></div></section>");
$templateCache.put("modules/users/views/verify/resend-verify-email.client.view.html",
"<section class=\"auth row\" data-ng-controller=VerifyController><section ng-if=!isResetSent><h3 class=\"col-md-12 text-center\">Resend your account verification email</h3><p class=\"small text-center\">Enter your account email.</p><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=resendVerifyEmail() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=email name=email class=form-control data-ng-model=credentials.email placeholder=bob@example.com></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-primary\" ng-click=resendVerifyEmail()>{{ 'SUBMIT_BTN' | translate }}</button></div></fieldset></form></div></section><section ng-if=isResetSent><h3 class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center\">Verification Email has been Sent</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><h2>{{ 'VERIFICATION_EMAIL_SENT' | translate }} {{username}}.<br>{{ 'NOT_ACTIVATED_YET' | translate }}</h2><p>{{ 'CHECK_YOUR_EMAIL' | translate }} <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\"><a href=\"/#!/\" style=color:white>Continue</a></button></div></div></section></section>");
"<section class=\"auth row\" data-ng-controller=VerifyController><section ng-if=!isResetSent><h3 class=\"col-md-12 text-center\">Resend your account verification email</h3><p class=\"small text-center\">Enter your account email.</p><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=resendVerifyEmail() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=username name=email class=form-control data-ng-model=credentials.email placeholder=bob@example.com></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-primary\" ng-click=resendVerifyEmail()>{{ 'SUBMIT_BTN' | translate }}</button></div></fieldset></form></div></section><section ng-if=isResetSent><h3 class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center\">Verification Email has been Sent</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><h2>{{ 'VERIFICATION_EMAIL_SENT' | translate }} {{username}}.<br>{{ 'NOT_ACTIVATED_YET' | translate }}</h2><p>{{ 'CHECK_YOUR_EMAIL' | translate }} <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\"><a href=\"/#!/\" style=color:white>Continue</a></button></div></div></section></section>");
$templateCache.put("modules/users/views/verify/verify-account.client.view.html",
"<section style=margin-top:50px class=\"row text-center\" data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class=\"row text-center\" ng-if=isResetSent><h3 class=col-md-12></h3><a href=/#!/signin class=col-md-12>{{ 'CONTINUE_TO_LOGIN' | translate }}</a></section><section class=\"row text-center\" ng-if=!isResetSent><h3 class=col-md-12>{{ 'VERIFY_ERROR' | translate }}</h3><a href=/#!/verify class=col-md-6>{{ 'REVERIFY_ACCOUNT_LINK' | translate }}</a> <a href=/#!/signin class=col-md-6>{{ 'SIGNIN_BTN' | translate }}</a></section></section>");
}]);
@ -946,7 +946,7 @@ angular.module('forms').config(['$stateProvider',
deviceType: ''
};
$http.get('http://jsonip.com/').success(function(response) {
$http.get('https://jsonip.com/').success(function(response) {
visitorData.ipAddr = response['ip']+'';
}).error(function(error) {
console.error('Could not get users\'s ip');
@ -1816,7 +1816,7 @@ angular.module('forms').controller('ListFormsController', ['$rootScope', '$scope
$scope.forms = {};
$scope.showCreateModal = false;
$scope.languageRegExp = $scope.myPt = {
$rootScope.languageRegExp = {
regExp: /[@!#$%^&*()\-+={}\[\]|\\/'";:`.,~№?<>]+/i,
test: function(val) {
return !this.regExp.test(val);
@ -3324,6 +3324,11 @@ angular.module('users').config(['$translateProvider', function ($translateProvid
LANGUAGE_LABEL: 'Language',
EMAIL_LABEL: 'Email',
SIGNUP_HEADER_TEXT: 'Sign up with your email',
SIGNIN_HEADER_TEXT: 'Signup in with your email',
SIGNUP_ERROR_TEXT: 'Couldn\'t complete registration due to errors',
UPDATE_PROFILE_BTN: 'Update Profile',
PROFILE_SAVE_SUCCESS: 'Profile saved successfully',
PROFILE_SAVE_ERROR: 'Could\'t Save Your Profile.',
@ -3367,7 +3372,7 @@ angular.module('users').config(['$translateProvider', function ($translateProvid
angular.module('users').config(['$translateProvider', function ($translateProvider) {
$translateProvider.translations('en', {
$translateProvider.translations('fr', {
ACCESS_DENIED_TEXT: 'Vouz nêtes pas autorisé à accéder à cette page.',
USERNAME_LABEL: 'Nom dutilisateur',
PASSWORD_LABEL: 'Mot de Passe',

File diff suppressed because one or more lines are too long

View file

@ -86,7 +86,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
" <button type=\"submit\" ng-click=\"removeCurrentForm()\" class=\"btn btn-block btn-danger\" ng-disabled=\"myform.title != deleteConfirm\">\n" +
" {{ 'I_UNDERSTAND' | translate }}\n" +
" </button>\n" +
" </div></script><div class=\"page-header row\" style=\"padding-bottom: 0px\"><div class=\"col-xs-10 col-sm-8\"><h1 class=\"hidden-sm hidden-xs\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h1><h2 class=\"hidden-md hidden-lg\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h2></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><button class=\"btn btn-danger\" ng-click=openDeleteModal()><i class=\"fa fa-trash-o\"></i> <span class=\"show-sm hidden-lg hidden-md hidden-xs\">{{ 'DELETE_FORM_SM' | translate}}</span> <span class=\"hidden-xs hidden-sm\">{{ 'DELETE_FORM_MD' | translate}}</span></button></small></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><a class=\"btn btn-default view-form-btn\" href=//{{formURL}}/#!/forms/{{myform._id}}><span class=\"hidden-xs hidden-sm\">{{ 'VIEW' | translate }} <span ng-show=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-hide=myform.isLive>{{ 'PREVIEW' | translate }}</span> {{ 'FORM' | translate }}</span> <span class=\"hidden-xs hidden-md hidden-lg\">View <span ng-if=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-if=!myform.isLive>{{ 'PREVIEW' | translate }}</span></span> <i class=\"status-light status-light-on fa fa-dot-circle-o\" ng-if=myform.isLive></i> <i class=\"status-light status-light-off fa fa-dot-circle-o\" ng-if=!myform.isLive></i></a></small></div></div><div class=row><div class=col-xs-12><tabs data=tabData></tabs></div><div class=col-xs-12><ui-view></ui-view></div></div></section>");
" </div></script><div class=\"page-header row\" style=\"padding-bottom: 0px\"><div class=\"col-xs-10 col-sm-8\"><h1 class=\"hidden-sm hidden-xs\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h1><h2 class=\"hidden-md hidden-lg\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h2></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><button class=\"btn btn-danger\" ng-click=openDeleteModal()><i class=\"fa fa-trash-o\"></i> <span class=\"show-sm hidden-lg hidden-md hidden-xs\">{{ 'DELETE_FORM_SM' | translate}}</span> <span class=\"hidden-xs hidden-sm\">{{ 'DELETE_FORM_MD' | translate}}</span></button></small></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><a class=\"btn btn-default view-form-btn\" href=/#!/forms/{{myform._id}}><span class=\"hidden-xs hidden-sm\">{{ 'VIEW' | translate }} <span ng-show=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-hide=myform.isLive>{{ 'PREVIEW' | translate }}</span> {{ 'FORM' | translate }}</span> <span class=\"hidden-xs hidden-md hidden-lg\">View <span ng-if=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-if=!myform.isLive>{{ 'PREVIEW' | translate }}</span></span> <i class=\"status-light status-light-on fa fa-dot-circle-o\" ng-if=myform.isLive></i> <i class=\"status-light status-light-off fa fa-dot-circle-o\" ng-if=!myform.isLive></i></a></small></div></div><div class=row><div class=col-xs-12><tabs data=tabData></tabs></div><div class=col-xs-12><ui-view></ui-view></div></div></section>");
$templateCache.put("modules/forms/admin/views/list-forms.client.view.html",
"<section class=overlay ng-if=showCreateModal ng-click=closeCreateModal()></section><section data-ng-controller=\"ListFormsController as ctrl\" data-ng-init=findAll() class=container><br><div class=row><div ng-click=openCreateModal() class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new\"><div class=\"title-row col-xs-12\"><h4 class=\"fa fa-plus fa-6\"></h4></div><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATE_A_NEW_FORM' | translate }}</small></div></div><form name=forms.createForm class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new new-form\" ng-if=showCreateModal><div class=\"title-row row\"><div class=\"col-xs-5 field-title text-left\">Name</div><div class=\"col-xs-12 field-input\"><input name=title required ng-model=formTitle ng-pattern=languageRegExp ng-minlength=4 style=\"color:black\"></div></div><div class=\"details-row row\"><div class=\"col-xs-5 field-title text-left\">Language</div><div class=\"col-xs-12 field-input\"><div class=\"button custom-select\"><select style=color:black name=language required ng-model=formLanguage ng-init=\"formLanguage = user.language\"><option ng-repeat=\"language in languages\" value={{language}}>{{language}}</option></select></div></div></div><div class=\"details-row submit row\"><div class=\"col-xs-12 field-title text-center\"><button class=\"btn btn-primary\" ng-disabled=forms.createForm.$invalid ng-click=createNewForm()>{{ 'CREATE_FORM' | translate }}</button></div></div></form><div data-ng-repeat=\"form in myforms\" ng-style=\"{ 'background-color': form.design.colors.backgroundColor, 'color': form.design.colors.answerColor }\" class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container\"><div class=row><span class=pull-right><i style=cursor:pointer class=\"fa fa-trash-o\" ng-click=removeForm($index)></i> <i style=cursor:pointer class=\"fa fa-files-o\" ng-click=duplicateForm($index)></i></span></div><div class=row><a data-ng-href=#!/forms/{{form._id}}/admin/create ng-style=\"{ 'color': form.design.colors.answerColor }\" class=\"title-row col-xs-12\"><h4 class=list-group-item-heading data-ng-bind=form.title></h4></a></div><div class=\"row footer\"><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATED_ON' | translate }} <span data-ng-bind=\"form.created | date:'shortDate'\"></span></small></div></div></div></div></section>");
$templateCache.put("modules/forms/base/views/submit-form.client.view.html",
@ -149,7 +149,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
$templateCache.put("modules/users/views/authentication/signup-success.client.view.html",
"<section class=\"row auth signup-view success\" data-ng-controller=AuthenticationController><h3 class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center\">{{ 'SUCCESS_HEADER' | translate }}</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><h2>{{ 'SUCCESS_TEXT' | translate }}<br><br>{{ 'NOT_ACTIVATED_YET' | translate }}</h2><br><br><p><strong>{{ 'BEFORE_YOU_CONTINUE' | translate }}</strong> <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\"><a href=\"/#!/\" style=\"color: white; text-decoration: none\">Continue</a></button></div></div></section>");
$templateCache.put("modules/users/views/authentication/signup.client.view.html",
"<section class=\"row auth signup-view\" data-ng-controller=AuthenticationController><h3 class=\"col-md-12 text-center\">Signup with your email</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form name=userForm data-ng-submit=signup() class=\"signin form-horizontal\" novalidate autocomplete=off><fieldset><div data-ng-show=error id=signup_errors class=\"text-center text-danger\">Couldn't complete registration due to errors:<br><strong data-ng-bind=error></strong></div><div class=form-group><label for=firstName>{{ 'FIRST_NAME_LABEL' | translate }}</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=firstName name=firstName class=form-control ng-model=credentials.firstName placeholder=\"First Name\"></div><div class=form-group><label for=lastName>{{ 'LAST_NAME_LABEL' | translate }}</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=lastName name=lastName class=form-control ng-model=credentials.lastName placeholder=\"Last Name\"></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'LANGUAGE_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><select ng-model=user.language required><option ng-repeat=\"language in languages\" ng-selected=\"language == user.language\" value={{language}}>{{language}}</option></select></div></div><hr><div class=form-group><label for=email>{{ 'USERNAME_LABEL' | translate }}</label><input type=email id=username name=username class=form-control ng-model=credentials.username placeholder=Email></div><div class=form-group><label for=email>{{ 'EMAIL_LABEL' | translate }}</label><input type=email id=email name=email class=form-control ng-model=credentials.email placeholder=Email></div><div class=form-group><label for=password>{{ 'PASSWORD_LABEL' | translate }}</label><input type=password id=password name=password class=form-control ng-model=credentials.password placeholder=Password></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\">{{ 'SIGNUP_BTN' | translate }}</button></div></fieldset></form></div></section>");
"<section class=\"row auth signup-view\" data-ng-controller=AuthenticationController><h3 class=\"col-md-12 text-center\">Signup with your email</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form name=userForm data-ng-submit=signup() class=\"signin form-horizontal\" novalidate autocomplete=off><fieldset><div data-ng-show=error id=signup_errors class=\"text-center text-danger\">Couldn't complete registration due to errors:<br><strong data-ng-bind=error></strong></div><div class=form-group><label for=firstName>{{ 'FIRST_NAME_LABEL' | translate }}</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=firstName name=firstName class=form-control ng-model=credentials.firstName placeholder=\"First Name\"></div><div class=form-group><label for=lastName>{{ 'LAST_NAME_LABEL' | translate }}</label><input ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\" required id=lastName name=lastName class=form-control ng-model=credentials.lastName placeholder=\"Last Name\"></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'LANGUAGE_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><select ng-model=user.language required><option ng-repeat=\"language in languages\" ng-selected=\"language == user.language\" value={{language}}>{{language}}</option></select></div></div><hr><div class=form-group><label for=email>{{ 'EMAIL_LABEL' | translate }}</label><input type=email id=email name=email class=form-control ng-model=credentials.email placeholder=Email></div><div class=form-group><label for=password>{{ 'PASSWORD_LABEL' | translate }}</label><input type=password id=password name=password class=form-control ng-model=credentials.password placeholder=Password></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\">{{ 'SIGNUP_BTN' | translate }}</button></div></fieldset></form></div></section>");
$templateCache.put("modules/users/views/password/forgot-password.client.view.html",
"<section class=\"auth row\" data-ng-controller=PasswordController><h3 class=\"col-md-12 text-center\">{{ 'PASSWORD_RESTORE_HEADER' | translate }}</h3><p class=\"small text-center\">{{ 'ENTER_YOUR_EMAIL' | translate }}</p><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=askForPasswordReset() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=username name=username class=form-control data-ng-model=credentials.username placeholder=\"{{ 'USERNAME_LABEL' | translate }}\"></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-primary\">{{ 'UPDATE_PASSWORD_LABEL' | translate }}</button></div><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div data-ng-show=success class=\"text-center text-success\"><strong>{{success}}</strong></div></fieldset></form></div></section>");
$templateCache.put("modules/users/views/password/reset-password-invalid.client.view.html",
@ -161,11 +161,11 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
$templateCache.put("modules/users/views/settings/change-password.client.view.html",
"<section class=\"row auth\" data-ng-controller=SettingsController><h3 class=\"col-md-12 text-center\">Change your password</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=changeUserPassword() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><label for=currentPassword>Current Password</label><input type=password id=currentPassword name=currentPassword class=form-control data-ng-model=passwordDetails.currentPassword placeholder=\"Current Password\"></div><hr><div class=form-group><label for=newPassword>{{ 'NEW_PASSWORD_LABEL' | translate }}</label><input type=password id=newPassword name=newPassword class=form-control data-ng-model=passwordDetails.newPassword placeholder=\"New Password\"></div><div class=form-group><label for=verifyPassword>{{ 'VERIFY_PASSWORD_LABEL' | translate }}</label><input type=password id=verifyPassword name=verifyPassword class=form-control data-ng-model=passwordDetails.verifyPassword placeholder=\"Verify Password\"></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\">{{ 'SAVE_PASSWORD_BTN' | translate }}</button></div><div data-ng-show=success class=\"text-center text-success\"><strong>{{ 'PASSWORD_CHANGE_SUCCESS' | translate }}</strong></div><div data-ng-show=error class=\"text-center text-danger\"><strong data-ng-bind=error></strong></div></fieldset></form></div></section>");
$templateCache.put("modules/users/views/settings/edit-profile.client.view.html",
"1<section class=\"row auth\" data-ng-controller=SettingsController><h3 class=\"col-xs-offset-1 col-xs-10 text-center\">Edit your profile</h3><div class=\"col-xs-offset-3 col-xs-6\"><form name=userForm data-ng-submit=updateUserProfile(userForm.$valid) class=\"signin form-horizontal\" autocomplete=off><fieldset><div data-ng-show=success class=\"text-center text-success\"><strong>{{ 'PROFILE_SAVE_SUCCESS' | translate }}</strong></div><div data-ng-show=error class=\"text-center text-danger\">{{ 'PROFILE_SAVE_ERROR' | translate }}<br><strong data-ng-bind=error></strong></div><div class=\"form-group row\"><div class=\"col-xs-7 field-title\"><b>{{ 'FIRST_NAME_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><input id=firstName name=firstName class=form-control data-ng-model=user.firstName placeholder=\"First Name\" ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\"></div></div><div class=\"form-group row\"><div class=\"col-xs-7 field-title\"><b>Last Name</b></div><div class=\"col-xs-12 field-input\"><input id=lastName name=lastName class=form-control data-ng-model=user.lastName placeholder=\"Last Name\" ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\"></div></div><div class=row><hr></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'LANGUAGE_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><select ng-model=user.language required><option ng-repeat=\"language in languages\" ng-selected=\"language == user.language\" value={{language}}>{{language}}</option></select></div></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>Username</b></div><div class=\"col-xs-12 field-input\"><input id=username name=username class=form-control data-ng-model=user.username placeholder=Username></div></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'EMAIL_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><input type=email id=email name=email class=form-control data-ng-model=user.email placeholder=Email></div></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\" style=font-size:1.6em>{{ 'SUBMIT_BTN' | translate }}</button></div></fieldset></form></div></section>");
"<section class=\"row auth\" data-ng-controller=SettingsController><h3 class=\"col-xs-offset-1 col-xs-10 text-center\">Edit your profile</h3><div class=\"col-xs-offset-3 col-xs-6\"><form name=userForm data-ng-submit=updateUserProfile(userForm.$valid) class=\"signin form-horizontal\" autocomplete=off><fieldset><div data-ng-show=success class=\"text-center text-success\"><strong>{{ 'PROFILE_SAVE_SUCCESS' | translate }}</strong></div><div data-ng-show=error class=\"text-center text-danger\">{{ 'PROFILE_SAVE_ERROR' | translate }}<br><strong data-ng-bind=error></strong></div><div class=\"form-group row\"><div class=\"col-xs-7 field-title\"><b>{{ 'FIRST_NAME_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><input id=firstName name=firstName class=form-control data-ng-model=user.firstName placeholder=\"First Name\" ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\"></div></div><div class=\"form-group row\"><div class=\"col-xs-7 field-title\"><b>Last Name</b></div><div class=\"col-xs-12 field-input\"><input id=lastName name=lastName class=form-control data-ng-model=user.lastName placeholder=\"Last Name\" ng-pattern=\"/^[a-zA-Z0-9 \\-.]*$/\"></div></div><div class=row><hr></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'LANGUAGE_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><select ng-model=user.language required><option ng-repeat=\"language in languages\" ng-selected=\"language == user.language\" value={{language}}>{{language}}</option></select></div></div><div class=\"row form-group\"><div class=\"col-xs-7 field-title\"><b>{{ 'EMAIL_LABEL' | translate }}</b></div><div class=\"col-xs-12 field-input\"><input type=email id=email name=email class=form-control data-ng-model=user.email placeholder=Email></div></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\" style=font-size:1.6em>{{ 'SUBMIT_BTN' | translate }}</button></div></fieldset></form></div></section>");
$templateCache.put("modules/users/views/settings/social-accounts.client.view.html",
"<section class=\"row auth\" data-ng-controller=SettingsController><h3 class=\"col-md-12 text-center\" data-ng-show=hasConnectedAdditionalSocialAccounts()>Connected social accounts:</h3><div class=\"col-md-12 text-center\"><div data-ng-repeat=\"(providerName, providerData) in user.additionalProvidersData\" class=remove-account-container><img ng-src=/modules/users/img/buttons/{{providerName}}.png> <a class=\"btn btn-danger btn-remove-account\" data-ng-click=removeUserSocialAccount(providerName)><i class=\"glyphicon glyphicon-trash\"></i></a></div></div><h3 class=\"col-md-12 text-center\">Connect other social accounts:</h3><div class=\"col-md-12 text-center\"><a href=/auth/facebook data-ng-hide=\"isConnectedSocialAccount('facebook')\" class=undecorated-link><img src=/modules/users/img/buttons/facebook.png></a> <a href=/auth/twitter data-ng-hide=\"isConnectedSocialAccount('twitter')\" class=undecorated-link><img src=/modules/users/img/buttons/twitter.png></a> <a href=/auth/google data-ng-hide=\"isConnectedSocialAccount('google')\" class=undecorated-link><img src=/modules/users/img/buttons/google.png></a> <a href=/auth/linkedin data-ng-hide=\"isConnectedSocialAccount('linkedin')\" class=undecorated-link><img src=/modules/users/img/buttons/linkedin.png></a> <a href=/auth/github data-ng-hide=\"isConnectedSocialAccount('github')\" class=undecorated-link><img src=/modules/users/img/buttons/github.png></a></div></section>");
$templateCache.put("modules/users/views/verify/resend-verify-email.client.view.html",
"<section class=\"auth row\" data-ng-controller=VerifyController><section ng-if=!isResetSent><h3 class=\"col-md-12 text-center\">Resend your account verification email</h3><p class=\"small text-center\">Enter your account email.</p><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=resendVerifyEmail() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=email name=email class=form-control data-ng-model=credentials.email placeholder=bob@example.com></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-primary\" ng-click=resendVerifyEmail()>{{ 'SUBMIT_BTN' | translate }}</button></div></fieldset></form></div></section><section ng-if=isResetSent><h3 class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center\">Verification Email has been Sent</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><h2>{{ 'VERIFICATION_EMAIL_SENT' | translate }} {{username}}.<br>{{ 'NOT_ACTIVATED_YET' | translate }}</h2><p>{{ 'CHECK_YOUR_EMAIL' | translate }} <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\"><a href=\"/#!/\" style=color:white>Continue</a></button></div></div></section></section>");
"<section class=\"auth row\" data-ng-controller=VerifyController><section ng-if=!isResetSent><h3 class=\"col-md-12 text-center\">Resend your account verification email</h3><p class=\"small text-center\">Enter your account email.</p><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><form data-ng-submit=resendVerifyEmail() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=username name=email class=form-control data-ng-model=credentials.email placeholder=bob@example.com></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-primary\" ng-click=resendVerifyEmail()>{{ 'SUBMIT_BTN' | translate }}</button></div></fieldset></form></div></section><section ng-if=isResetSent><h3 class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6 text-center\">Verification Email has been Sent</h3><div class=\"col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6\"><h2>{{ 'VERIFICATION_EMAIL_SENT' | translate }} {{username}}.<br>{{ 'NOT_ACTIVATED_YET' | translate }}</h2><p>{{ 'CHECK_YOUR_EMAIL' | translate }} <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary\"><a href=\"/#!/\" style=color:white>Continue</a></button></div></div></section></section>");
$templateCache.put("modules/users/views/verify/verify-account.client.view.html",
"<section style=margin-top:50px class=\"row text-center\" data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class=\"row text-center\" ng-if=isResetSent><h3 class=col-md-12></h3><a href=/#!/signin class=col-md-12>{{ 'CONTINUE_TO_LOGIN' | translate }}</a></section><section class=\"row text-center\" ng-if=!isResetSent><h3 class=col-md-12>{{ 'VERIFY_ERROR' | translate }}</h3><a href=/#!/verify class=col-md-6>{{ 'REVERIFY_ACCOUNT_LINK' | translate }}</a> <a href=/#!/signin class=col-md-6>{{ 'SIGNIN_BTN' | translate }}</a></section></section>");
}]);

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@ angular.module('forms').controller('ListFormsController', ['$rootScope', '$scope
$scope.forms = {};
$scope.showCreateModal = false;
$scope.languageRegExp = $scope.myPt = {
$rootScope.languageRegExp = {
regExp: /[@!#$%^&*()\-+={}\[\]|\\/'";:`.,~№?<>]+/i,
test: function(val) {
return !this.regExp.test(val);

View file

@ -25,7 +25,7 @@
deviceType: ''
};
$http.get('http://jsonip.com/').success(function(response) {
$http.get('https://jsonip.com/').success(function(response) {
visitorData.ipAddr = response['ip']+'';
}).error(function(error) {
console.error('Could not get users\'s ip');

View file

@ -15,6 +15,11 @@ angular.module('users').config(['$translateProvider', function ($translateProvid
LANGUAGE_LABEL: 'Language',
EMAIL_LABEL: 'Email',
SIGNUP_HEADER_TEXT: 'Sign up with your email',
SIGNIN_HEADER_TEXT: 'Signup in with your email',
SIGNUP_ERROR_TEXT: 'Couldn\'t complete registration due to errors',
UPDATE_PROFILE_BTN: 'Update Profile',
PROFILE_SAVE_SUCCESS: 'Profile saved successfully',
PROFILE_SAVE_ERROR: 'Could\'t Save Your Profile.',

View file

@ -2,7 +2,7 @@
angular.module('users').config(['$translateProvider', function ($translateProvider) {
$translateProvider.translations('en', {
$translateProvider.translations('fr', {
ACCESS_DENIED_TEXT: 'Vouz nêtes pas autorisé à accéder à cette page.',
USERNAME_LABEL: 'Nom dutilisateur',
PASSWORD_LABEL: 'Mot de Passe',

View file

@ -1,5 +1,5 @@
<section class="row auth" data-ng-controller="AuthenticationController">
<h3 class="col-md-12 text-center">Sign into your account</h3>
<h3 class="col-md-12 text-center">{{ 'SIGNIN_HEADER_TEXT' | translate }}</h3>
<!-- <div class="col-md-12 text-center">
<a href="/auth/facebook" class="undecorated-link">
<img src="/modules/users/img/buttons/facebook.png">
@ -25,8 +25,8 @@
Error: <strong data-ng-bind="error"></strong>
</div>
<div class="form-group">
<label for="username">{{ 'EMAIL_LABEL' | translate }}</label>
<input type="text" id="username" name="username" class="form-control" data-ng-model="credentials.username" placeholder="{{ 'EMAIL_LABEL' | translate }}">
<label for="username">{{ 'USERNAME_LABEL' | translate }}</label>
<input type="text" id="username" name="username" class="form-control" data-ng-model="credentials.username" placeholder="{{ 'USERNAME_LABEL' | translate }}" ng-pattern="languageRegExp" ng-minlength="4">
</div>
<div class="form-group">
<label for="password">{{ 'PASSWORD_LABEL' | translate }}</label>
@ -46,8 +46,6 @@
</span>
</div>
</fieldset>
</form>
</div>

View file

@ -17,12 +17,12 @@
<img src="/modules/users/img/buttons/github.png">
</a>
</div> -->
<h3 class="col-md-12 text-center">Signup with your email</h3>
<h3 class="col-md-12 text-center">{{ 'SIGNUP_HEADER_TEXT' | translate }}</h3>
<div class="col-xs-offset-2 col-xs-8 col-md-offset-3 col-md-6">
<form name="userForm" data-ng-submit="signup()" class="signin form-horizontal" novalidate autocomplete="off">
<form name="userForm" data-ng-submit="signup()" class="signin form-horizontal" autocomplete="off">
<fieldset>
<div data-ng-show="error" id="signup_errors" class="text-center text-danger">
Couldn't complete registration due to errors: <br>
{{'SIGNUP_ERROR_TEXT' | translate}}: <br>
<strong data-ng-bind="error"></strong>
</div>
<div class="form-group">
@ -34,10 +34,10 @@
<input type="text" ng-pattern="/^[a-zA-Z0-9 \-.]*$/" required id="lastName" name="lastName" class="form-control" ng-model="credentials.lastName" placeholder="Last Name">
</div>
<div class="row form-group">
<div class="col-xs-7 field-title">
<div class="field-title">
<b>{{ 'LANGUAGE_LABEL' | translate }}</b>
</div>
<div class="col-xs-12 field-input">
<div class="field-input">
<select ng-model="user.language" required>
<option ng-repeat="language in languages"
ng-selected="language == user.language"
@ -49,8 +49,8 @@
</div>
<hr>
<div class="form-group">
<label for="email">{{ 'USERNAME_LABEL' | translate }}</label>
<input type="email" id="username" name="username" class="form-control" ng-model="credentials.username" placeholder="Email">
<label for="username">{{ 'USERNAME_LABEL' | translate }}</label>
<input type="text" id="username" name="username" class="form-control" ng-pattern="languageRegExp" ng-minlength="4" ng-model="credentials.username" placeholder="Username">
</div>
<div class="form-group">
<label for="email">{{ 'EMAIL_LABEL' | translate }}</label>