- entity_name = controller.controller_name.singularize.underscore #account
- @entity = instance_variable_get("@#{entity_name}")
- id = called_from_landing_page? ? "edit_#{entity_name}" : dom_id(@entity)

- if @entity.errors.empty?
  - if called_from_landing_page?
    crm.flip_form('edit_#{entity_name}');
    crm.set_title('edit_#{entity_name}', '#{h @entity.id}');
    = refresh_sidebar(:show, :summary)
  - else
    $('##{id}').replaceWith('#{ j render(:partial => entity_name, :collection => [ @entity ]) }');
    $('##{id}').effect("highlight", { duration:1500 });
    = refresh_sidebar(:index, :filters)
- else
  $('##{id}').html('#{ j render(:partial => "edit") }');
  $('##{id}').effect("shake", { duration:250, distance: 6 });
  $('##{dom_id(@entity, :edit)} input[type!=hidden]').first().focus();

= hook(:entity_update, self, {entity: @entity})
- entity_name = controller.controller_name.singularize.underscore #account
- @entity = instance_variable_get("@#{entity_name}")
- id = called_from_landing_page? ? "edit_#{entity_name}" : dom_id(@entity)

- if @entity.errors.empty?
  - if called_from_landing_page?
    crm.flip_form('edit_#{entity_name}');
    crm.set_title('edit_#{entity_name}', '#{h @entity.id}');
    = refresh_sidebar(:show, :summary)
  - else
    $('##{id}').replaceWith('#{ j render(:partial => entity_name, :collection => [ @entity ]) }');
    $('##{id}').effect("highlight", { duration:1500 });
- else
  $('##{id}').html('#{ j render(:partial => "edit") }');
  $('##{id}').effect("shake", { duration:250, distance: 6 });
  $('##{dom_id(@entity, :edit)} input[type!=hidden]').first().focus();

= hook(:entity_update, self, {entity: @entity})
Remove sidebar refresh when Updating Sample in Opp show
Remove sidebar refresh when Updating Sample in Opp show
