-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable toolbar button when ServiceTemplate is not template_valid or …
…Ansible Playbook
- Loading branch information
1 parent
9b10633
commit d7c51f6
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
app/helpers/application_helper/button/catalog_item_copy_button.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class ApplicationHelper::Button::CatalogItemCopyButton < ApplicationHelper::Button::Basic | ||
|
||
def disabled? | ||
!@record.template_valid? || @record.type == 'ServiceTemplateAnsiblePlaybook' | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters