ManageIQ/manageiq-ui-classic

View on GitHub
app/helpers/application_helper/button/old_dialogs_edit_delete.rb

Summary

Maintainability
A
0 mins
Test Coverage
class ApplicationHelper::Button::OldDialogsEditDelete < ApplicationHelper::Button::Basic
  def disabled?
    if @view_context.x_active_tree == :old_dialogs_tree && @record && @record[:default]
      @error_message = if self[:id] =~ /_edit/
                         _('Default dialogs cannot be edited')
                       else
                         _('Default dialogs cannot be removed from the VMDB')
                       end
    end
    @error_message.present?
  end
end