#ab_form
  #policy_bar
    - if @resolve[:uri] && Hash[*@resolve[:target_classes].flatten].invert[@resolve[:new][:target_class]] == @edit[:new][:target_class]
      = link_to({:action => "resolve", :button => "paste"},
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        :remote                => true,
        "data-method"          => :post,
        :class                 => 'btn btn-default',
        :title                 => _("Paste object details for use in a Button.")) do
        %i.fa.fa-clipboard
    - else
      %button.btn.btn-default.disabled{:title => _("Paste is not available, no object information has been copied from the Simulation screen")}
        %i.fa.fa-clipboard
  = render :partial => "layouts/flash_msg"

  #custom_button_tabs
    %ul.nav.nav-tabs
      = miq_tab_header('ab_options_tab', @sb[:active_tab]) do
        = _('Options')
      = miq_tab_header('ab_advanced_tab', @sb[:active_tab]) do
        = _('Advanced')
    .tab-content
      = miq_tab_content('ab_options_tab', @sb[:active_tab]) do
        = render :partial => "shared/buttons/ab_options_form"
      = miq_tab_content('ab_advanced_tab', @sb[:active_tab]) do
        = render :partial => "shared/buttons/ab_advanced_form"

  :javascript
    miq_tabs_init('#custom_button_tabs');

#ab_form
  #policy_bar
    - if session[:resolve_object].present?
      = link_to({:action => "resolve", :button => "paste"},
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        :remote                => true,
        "data-method"          => :post,
        :class                 => 'btn btn-default',
        :title                 => _("Paste object details for use in a Button.")) do
        %i.fa.fa-clipboard
    - else
      %button.btn.btn-default.disabled{:title => _("Paste is not available, no object information has been copied from the Simulation screen")}
        %i.fa.fa-clipboard
  = render :partial => "layouts/flash_msg"

  #custom_button_tabs
    %ul.nav.nav-tabs
      = miq_tab_header('ab_options_tab', @sb[:active_tab]) do
        = _('Options')
      = miq_tab_header('ab_advanced_tab', @sb[:active_tab]) do
        = _('Advanced')
    .tab-content
      = miq_tab_content('ab_options_tab', @sb[:active_tab]) do
        = render :partial => "shared/buttons/ab_options_form"
      = miq_tab_content('ab_advanced_tab', @sb[:active_tab]) do
        = render :partial => "shared/buttons/ab_advanced_form"

  :javascript
    miq_tabs_init('#custom_button_tabs');

Enable 'Paste' button if the coppied data are in the session
Enable 'Paste' button if the coppied data are in the session

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1426390
