From: Coleman Watts Date: Fri, 3 Jul 2015 00:34:44 +0000 (-0400) Subject: CRM-16793 - Fix editing group names X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=93abd8313c55e0065c3bb2e9336719961be89091;p=civicrm-core.git CRM-16793 - Fix editing group names --- 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 + "";