app/controllers/miq_ae_tools_controller.rb
# AJAX driven routine to check for changes in ANY field on the form
AJAX driven routine to check for changes in ANY field on the form
AJAX driven routine to check for changes in ANY field on the form
def form_field_changed
    get_form_vars
    render :update do |page|                    
      if params.key?(:instance_name) || params.key?(:starting_object) ||
         params.key?(:target_class) || params.key?(:target_id) ||
         params.key?(:other_name) || params.key?(:target_attr_name)
        unless params.key?(:other_name) || params.key?(:target_attr_name)
          page.replace("resolve_form_div", :partial => "resolve_form")
        end
        if @resolve[:throw_ready]
          page << javascript_hide("throw_off")
          page << javascript_show("throw_on")
        else
          page << javascript_hide("throw_on")
          page << javascript_show("throw_off")
        end
      end
    end
  end
def form_field_changed get_form_vars render :update do | page | if params . key? ( :instance_name ) || params . key? ( :starting_object ) || params . key? ( :target_class ) || params . key? ( :target_id ) || params . key? ( :other_name ) || params . key? ( :target_attr_name ) unless params . key? ( :other_name ) || params . key? ( :target_attr_name ) page . replace ( "resolve_form_div" , :partial => "resolve_form" ) end if @resolve [ :throw_ready ] page << javascript_hide ( "throw_off" ) page << javascript_show ( "throw_on" ) else page << javascript_hide ( "throw_on" ) page << javascript_show ( "throw_off" ) end end end end
AJAX driven routine to check for changes in ANY field on the form
AJAX driven routine to check for changes in ANY field on the form
# Use JS to update the display