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
ZitaNemeckova committed Jul 15, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a1f3852 commit dc22c38
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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
@@ -30,9 +30,11 @@ 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',

0 comments on commit dc22c38

Please sign in to comment.