improve usability of user section
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/c2950cc3 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/c2950cc3 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/c2950cc3 Branch: refs/heads/master Commit: c2950cc3f1b1b22c03d3bf35017c6a6f1c2b648f Parents: 9458c73 Author: Dakshika Jayathilaka <[email protected]> Authored: Wed Mar 25 00:40:31 2015 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Fri Apr 17 13:59:55 2015 +0530 ---------------------------------------------------------------------- .../controllers/forms/schema/users/users.json | 47 ++++++++++---------- .../themes/theme0/partials/users_form.hbs | 4 +- 2 files changed, 26 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/c2950cc3/components/org.apache.stratos.manager.console/console/controllers/forms/schema/users/users.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/users/users.json b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/users/users.json index 731439e..bcec499 100644 --- a/components/org.apache.stratos.manager.console/console/controllers/forms/schema/users/users.json +++ b/components/org.apache.stratos.manager.console/console/controllers/forms/schema/users/users.json @@ -9,12 +9,28 @@ }, "required":["userName","credential","role"], "properties":{ + "firstName": { + "type":"string", + "id": "root/firstName", + "title": "First Name", + "name": "First Name", + "default": "", + "required":false + }, + "lastName": { + "type":"string", + "id": "root/lastName", + "title": "Last Name", + "name": "Last Name", + "default": "", + "required":false + }, "userName": { "type":"string", "id": "root/userName", "title": "User Name", "name": "User Name", - "minLength":4, + "minLength":2, "required":true, "default": "" }, @@ -22,19 +38,12 @@ "type":"string", "id": "root/credential", "minLength":6, + "description":"Enter six characters long password", "format":"password", "title": "Password", "name": "Password", "default": "" }, - "role": { - "type":"string", - "id": "root/role", - "title": "User Role", - "name": "User Role", - "enum":["admin","Internal/user"], - "default": "Internal/user" - }, "email": { "type":"string", "id": "root/email", @@ -44,21 +53,13 @@ "default": "[email protected]", "required":false }, - "firstName": { - "type":"string", - "id": "root/firstName", - "title": "First Name", - "name": "First Name", - "default": "", - "required":false - }, - "lastName": { + "role": { "type":"string", - "id": "root/lastName", - "title": "Last Name", - "name": "Last Name", - "default": "", - "required":false + "id": "root/role", + "title": "User Role", + "name": "User Role", + "enum":["admin","Internal/user"], + "default": "Internal/user" } } } http://git-wip-us.apache.org/repos/asf/stratos/blob/c2950cc3/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs index 7b13618..ae7241d 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs @@ -54,7 +54,7 @@ </div> </div> <div class="col-md-7 col-sm-3 text-right"> - <a type="button" class="btn btn-primary btn-lg" href="new/">Add New {{formContext}}</a> + <a type="button" class="btn btn-primary btn-lg" href="new/">Add New {{formTitle}}</a> </div> </div> {{else}} @@ -338,7 +338,7 @@ $('.help-block').hide(); $('.fa-question-circle').click(function(){ - $(this).parent().find('.help-block').toggle(); + $(this).parent().find('.help-block').not('.errormsg').toggle(); }); });
