mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Merge pull request #2011 from mabashian/survey-button-3.0
Move Add/Edit Survey button location
This commit is contained in:
commit
ffc7364097
@ -494,7 +494,6 @@ input[type='radio']:checked:before {
|
||||
|
||||
.Form-surveyButton {
|
||||
background-color: @default-link;
|
||||
margin-right: 20px;
|
||||
color: @default-bg;
|
||||
text-transform: uppercase;
|
||||
padding-left:15px;
|
||||
|
||||
@ -309,17 +309,18 @@ export default
|
||||
dataPlacement: 'right',
|
||||
dataTitle: "Host Config Key",
|
||||
dataContainer: "body"
|
||||
},
|
||||
survey: {
|
||||
type: 'custom',
|
||||
column: 2,
|
||||
ngHide: "job_type.value === 'scan'" ,
|
||||
control: '<button type="button" class="btn btn-sm Form-surveyButton" id="job_templates_create_survey_btn" ng-show="!survey_exists" ng-click="addSurvey()">ADD SURVEY</button>'+
|
||||
'<button type="button" class="btn btn-sm Form-surveyButton" id="job_templates_edit_survey_btn" ng-show="survey_exists" ng-click="editSurvey()">EDIT SURVEY</button>'
|
||||
}
|
||||
},
|
||||
|
||||
buttons: { //for now always generates <button> tags
|
||||
add_survey: {
|
||||
ngClick: 'addSurvey()',
|
||||
ngShow: 'job_type.value !== "scan" && !survey_exists'
|
||||
},
|
||||
edit_survey: {
|
||||
ngClick: 'editSurvey()',
|
||||
ngShow: 'job_type.value !== "scan" && survey_exists'
|
||||
},
|
||||
cancel: {
|
||||
ngClick: 'formCancel()'
|
||||
},
|
||||
|
||||
@ -102,6 +102,7 @@
|
||||
text-transform: uppercase;
|
||||
padding-left:15px;
|
||||
padding-right: 15px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.SurveyMaker-deleteButton:hover {
|
||||
background-color: @default-err-hov;
|
||||
|
||||
@ -1675,6 +1675,14 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
button.label = 'Launch';
|
||||
button['class'] = 'btn-primary';
|
||||
}
|
||||
if (btn === 'add_survey') {
|
||||
button.label = 'Add Survey';
|
||||
button['class'] = 'Form-surveyButton';
|
||||
}
|
||||
if (btn === 'edit_survey') {
|
||||
button.label = 'Edit Survey';
|
||||
button['class'] = 'Form-surveyButton';
|
||||
}
|
||||
|
||||
// Build button HTML
|
||||
html += "<button type=\"button\" ";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user