app/views/admin/groups/edit.js.haml
- id = dom_id(@group)
- if params[:cancel].true? # <----------------- Hide [Edit Group]
$('##{id}').replaceWith('#{ j (render(partial: "group", collection: [ @group ])) }');
- else # <---------------------------------------- Show [Edit Group] form.
-# Disable onMouseOver for the list item.
crm.highlight_off('#{id}');
-# Hide [Create Group] form if any.
crm.hide_form('create_group');
-# Show [Edit Group] form.
$('##{id}').html('#{ j render(partial: "edit") }');
$('#group_name').focus();