From 69a6fc75fbb33f86204524751b4b1fae407afb41 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Wed, 5 Jun 2013 10:29:45 -0400 Subject: [PATCH] Moved Credentials related set to the top. The is the one set user can modify, so lets make easier to access. --- ansibleworks/ui/static/js/forms/Users.js | 90 ++++++++++++------------ 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/ansibleworks/ui/static/js/forms/Users.js b/ansibleworks/ui/static/js/forms/Users.js index 7c442c4357..818dc4e7c0 100644 --- a/ansibleworks/ui/static/js/forms/Users.js +++ b/ansibleworks/ui/static/js/forms/Users.js @@ -84,6 +84,50 @@ angular.module('UserFormDefinition', []) }, related: { //related colletions (and maybe items?) + credentials: { + type: 'collection', + title: 'Credentials', + iterator: 'credential', + open: false, + + actions: { + add: { + ngClick: "add('credentials')", + icon: 'icon-plus', + label: 'Add', + awToolTip: 'Add a credential for this user' + }, + }, + + fields: { + name: { + key: true, + label: 'Name' + }, + description: { + label: 'Description' + } + }, + + fieldActions: { + edit: { + label: 'Edit', + ngClick: "edit('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}')", + icon: 'icon-edit', + class: 'btn-success', + awToolTip: 'Edit the credential' + }, + delete: { + label: 'Delete', + ngClick: "delete('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}', 'credentials')", + icon: 'icon-remove', + class: 'btn-danger', + awToolTip: 'Delete the credential' + } + } + + }, + admin_of_organizations: { // Assumes a plural name (e.g. things) type: 'collection', title: 'Admin of Organizations', @@ -151,51 +195,7 @@ angular.module('UserFormDefinition', []) label: 'Description' } } - }, - - credentials: { - type: 'collection', - title: 'Credentials', - iterator: 'credential', - open: false, - - actions: { - add: { - ngClick: "add('credentials')", - icon: 'icon-plus', - label: 'Add', - awToolTip: 'Add a credential for this user' - }, - }, - - fields: { - name: { - key: true, - label: 'Name' - }, - description: { - label: 'Description' - } - }, - - fieldActions: { - edit: { - label: 'Edit', - ngClick: "edit('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}')", - icon: 'icon-edit', - class: 'btn-success', - awToolTip: 'Edit the credential' - }, - delete: { - label: 'Delete', - ngClick: "delete('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}', 'credentials')", - icon: 'icon-remove', - class: 'btn-danger', - awToolTip: 'Delete the credential' - } - } - - }, + } }