This is an automated email from the git hooks/post-receive script. unknown user pushed a commit to branch devel in repository Pollen. commit 4ebfd721564a4e2bddec00f5d6e60cc79c6d3628 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue May 20 11:24:39 2014 +0200 fix register user --- pollen-ui-angular/src/main/webapp/js/app.js | 2 +- pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js | 4 +++- pollen-ui-angular/src/main/webapp/js/services.js | 2 +- pollen-ui-angular/src/main/webapp/partials/user-register.html | 10 ++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/js/app.js b/pollen-ui-angular/src/main/webapp/js/app.js index f7b1041..d7e72ee 100644 --- a/pollen-ui-angular/src/main/webapp/js/app.js +++ b/pollen-ui-angular/src/main/webapp/js/app.js @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% */ -angular.module('pollen', ['pollenServices', 'ngRoute', 'pollControllers', 'ui.bootstrap', 'ngCookies']) +angular.module('pollen', ['pollenServices', 'ngRoute', 'pollControllers', 'userControllers', 'ui.bootstrap', 'ngCookies']) .config(['$httpProvider', '$cookiesProvider', function($httpProvider, $cookies) { $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; //$httpProvider.defaults.headers.put['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js index f354db9..a41f7a0 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js @@ -21,7 +21,9 @@ angular.module('userControllers', []) .controller('UserRegisterCtrl', ['$scope', 'User', function ($scope, User) { $scope.submit = function () { - User.add({}, $scope.data.user); + if ($scope.data.user.password == $scope.data.user.password2) { + User.add({}, $scope.data.user); + } } }]) diff --git a/pollen-ui-angular/src/main/webapp/js/services.js b/pollen-ui-angular/src/main/webapp/js/services.js index fab77a5..eb4c5c4 100644 --- a/pollen-ui-angular/src/main/webapp/js/services.js +++ b/pollen-ui-angular/src/main/webapp/js/services.js @@ -101,7 +101,7 @@ angular.module('pollenServices', ['ngResource']) .factory('User', ['$resource', 'RestInfo', function ($resource, RestInfo) { var transformParam = function (data) { - return 'user='+encodeURIComponent(JSON.stringify(data))+RestInfo; + return 'user='+encodeURIComponent(JSON.stringify(data))+'&generatePassword=false'+RestInfo; } return $resource(conf.restURL+'/users/:userId', {userId : '@id'}, { diff --git a/pollen-ui-angular/src/main/webapp/partials/user-register.html b/pollen-ui-angular/src/main/webapp/partials/user-register.html index e70496f..66ee85e 100644 --- a/pollen-ui-angular/src/main/webapp/partials/user-register.html +++ b/pollen-ui-angular/src/main/webapp/partials/user-register.html @@ -31,6 +31,16 @@ </div> <div class="form-group"> + <label for="formPassword">Mot de passe :</label> + <input type="password" id="formPassword" name="password" class="form-control" ng-model="data.user.password"/> + </div> + <div class="form-group"> + <label for="formPassword2">Confirmation :</label> + <input type="password" id="formPassword2" name="password2" class="form-control" ng-model="data.user.password2"/> + </div> + + + <div class="form-group"> <button class="btn btn-primary" type="submit">Envoyer</button> </div> </form> -- To stop receiving notification emails like this one, please contact Chorem.org SCM administrator <admin+scm@chorem.org>.