mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 05:31:22 -03:30
62 lines
1.9 KiB
JavaScript
62 lines
1.9 KiB
JavaScript
/*********************************************
|
|
* Copyright (c) 2013 AnsibleWorks, Inc.
|
|
*
|
|
* Projects.js
|
|
*
|
|
* Form definition for Projects model
|
|
*
|
|
*/
|
|
angular.module('ProjectFormDefinition', [])
|
|
.value(
|
|
'ProjectsForm', {
|
|
|
|
addTitle: 'Create Project', //Title in add mode
|
|
editTitle: '{{ name }}', //Title in edit mode
|
|
name: 'project', //entity or model name in singular form
|
|
well: true, //Wrap the form with TB well/
|
|
|
|
fields: {
|
|
name: {
|
|
label: 'Name',
|
|
type: 'text',
|
|
addRequired: true,
|
|
editRequired: true,
|
|
capitalize: true
|
|
},
|
|
description: {
|
|
label: 'Description',
|
|
type: 'text',
|
|
addRequired: false,
|
|
editRequired: false
|
|
},
|
|
local_path: {
|
|
label: 'Local Path',
|
|
type: 'text',
|
|
addRequired: true,
|
|
editRequired: true
|
|
}
|
|
},
|
|
|
|
buttons: { //for now always generates <button> tags
|
|
save: {
|
|
label: 'Save',
|
|
icon: 'icon-ok',
|
|
class: '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',
|
|
ngDisabled: true //Disabled when $pristine
|
|
}
|
|
},
|
|
|
|
related: { //related colletions (and maybe items?)
|
|
|
|
}
|
|
|
|
}); // Form
|
|
|
|
|