From 93abd8313c55e0065c3bb2e9336719961be89091 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 2 Jul 2015 20:34:44 -0400 Subject: [PATCH] CRM-16793 - Fix editing group names --- CRM/Contact/BAO/Group.php | 3 +++ templates/CRM/Group/Form/Search.tpl | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 9f2d05a4a7..7c268b630a 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -861,6 +861,9 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { 'count' => '0', ); CRM_Core_DAO::storeValues($object, $values[$object->id]); + // Wrap with crm-editable. Not an ideal solution. + $values[$object->id]['title'] = '' . $values[$object->id]['title'] . ''; + if ($object->saved_search_id) { $values[$object->id]['title'] .= ' (' . ts('Smart Group') . ')'; // check if custom search, if so fix view link diff --git a/templates/CRM/Group/Form/Search.tpl b/templates/CRM/Group/Form/Search.tpl index e3a11f63b1..cbf55f3563 100644 --- a/templates/CRM/Group/Form/Search.tpl +++ b/templates/CRM/Group/Form/Search.tpl @@ -175,7 +175,7 @@ CRM.$(function($) { var id = $('td:last', nRow).text().split(',')[0]; var cl = $('td:last', nRow).text().split(',')[1]; $(nRow).addClass(cl).attr({id: 'row_' + id, 'data-id': id, 'data-entity': 'group'}); - $('td:eq(0)', nRow).wrapInner(''); + //$('td:eq(0)', nRow).wrapInner(''); $('td:eq(1)', nRow).addClass('right'); $('td:eq(3)', nRow).wrapInner('
'); $('td:eq(5)', nRow).wrapInner('
'); @@ -289,10 +289,10 @@ CRM.$(function($) { $.each( response, function( i, val ) { appendHTML += ''; if ( val.is_parent ) { - appendHTML += '' + '{/literal}{literal}' + val.group_name + ''; + appendHTML += '' + '{/literal}{literal}' + val.group_name + ''; } else { - appendHTML += '' + val.group_name + ''; + appendHTML += '' + val.group_name + ''; } appendHTML += '' + val.count + ""; appendHTML += "" + val.created_by + ""; -- 2.25.1