Skip to content

Commit

Permalink
Disable toolbar button when ServiceTemplate is not template_valid or …
Browse files Browse the repository at this point in the history
…Ansible Playbook
  • Loading branch information
ZitaNemeckova committed Jul 8, 2019
1 parent 9b10633 commit d7c51f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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

Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ class ApplicationHelper::Toolbar::ServicetemplateCenter < ApplicationHelper::Too
button(
:catalogitem_copy,
'pficon pficon-edit fa-lg',
N_('Select a single Item to copy'),
N_('This Item cannot be copied'),
N_('Copy Selected Item'),
:send_checked => true),
:send_checked => true,
:klass => ApplicationHelper::Button::CatalogItemCopyButton,),
button(
:catalogitem_delete,
'pficon pficon-delete fa-lg',
Expand Down

0 comments on commit d7c51f6

Please sign in to comment.