diff --git a/app/helpers/application_helper/button/catalog_item_copy_button.rb b/app/helpers/application_helper/button/catalog_item_copy_button.rb index 05646c11d2f..1bf7c6b2262 100644 --- a/app/helpers/application_helper/button/catalog_item_copy_button.rb +++ b/app/helpers/application_helper/button/catalog_item_copy_button.rb @@ -1,5 +1,6 @@ class ApplicationHelper::Button::CatalogItemCopyButton < ApplicationHelper::Button::Basic def disabled? - !@record.template_valid? || @record.type == 'ServiceTemplateAnsiblePlaybook' + @error_message = N_('This Item cannot be copied') if !@record.template_valid? || @record.type == 'ServiceTemplateAnsiblePlaybook' + @error_message.present? end end diff --git a/app/helpers/application_helper/toolbar/servicetemplate_center.rb b/app/helpers/application_helper/toolbar/servicetemplate_center.rb index 721f0996694..190a6ee4f58 100644 --- a/app/helpers/application_helper/toolbar/servicetemplate_center.rb +++ b/app/helpers/application_helper/toolbar/servicetemplate_center.rb @@ -36,8 +36,8 @@ class ApplicationHelper::Toolbar::ServicetemplateCenter < ApplicationHelper::Too button( :catalogitem_copy, 'pficon pficon-edit fa-lg', - N_('This Item cannot be copied'), - N_('Copy Selected Item'), + t = N_('Copy Selected Item'), + t, :send_checked => true, :klass => ApplicationHelper::Button::CatalogItemCopyButton ),