mirror of
https://github.com/ansible/awx.git
synced 2026-02-03 10:38:15 -03:30
Moved UI into its own Django app.
This commit is contained in:
64
lib/ui/static/js/forms/Groups.js
Normal file
64
lib/ui/static/js/forms/Groups.js
Normal file
@@ -0,0 +1,64 @@
|
||||
/*********************************************
|
||||
* Copyright (c) 2013 AnsibleWorks, Inc.
|
||||
*
|
||||
* Groups.js
|
||||
* Form definition for Group model
|
||||
*
|
||||
*
|
||||
*/
|
||||
angular.module('GroupFormDefinition', [])
|
||||
.value(
|
||||
'GroupForm', {
|
||||
|
||||
addTitle: 'Create Group', //Legend in add mode
|
||||
editTitle: '{{ name }}', //Legend in edit mode
|
||||
name: 'group', //Form name attribute
|
||||
well: true, //Wrap the form with TB well
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
type: 'text',
|
||||
addRequired: true,
|
||||
editRequired: true
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
type: 'text',
|
||||
addRequired: true,
|
||||
editRequired: true
|
||||
},
|
||||
inventory: {
|
||||
label: 'Inventory',
|
||||
type: 'lookup',
|
||||
sourceModel: 'inventory',
|
||||
sourceField: 'name',
|
||||
addRequired: true,
|
||||
editRequired: true,
|
||||
ngClick: 'lookUpInventory()'
|
||||
}
|
||||
},
|
||||
|
||||
buttons: { //for now always generates <button> tags
|
||||
save: {
|
||||
label: 'Save',
|
||||
icon: 'icon-ok',
|
||||
class: 'btn btn-success',
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: true //Disable when $pristine or $invalid, optional
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
label: 'Reset',
|
||||
icon: 'icon-remove',
|
||||
class: 'btn',
|
||||
ngDisabled: true //Disabled when $pristine
|
||||
}
|
||||
},
|
||||
|
||||
related: { //related colletions (and maybe items?)
|
||||
|
||||
}
|
||||
|
||||
}); //UserForm
|
||||
|
||||
Reference in New Issue
Block a user