Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-7017

Grants with status containing the word "panel" do not display

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.2.5
    • Component/s: CiviGrant
    • Labels:
      None

      Description

      A strange CiviGrant bug. On one of our sites, grants in any of these statuses do not display:

      Ineligible to go to panel
      Going to panel
      Unsuccessful at panel

      The common feature is the word "panel"! I've verified that renaming status to e.g. "Unsuccessful at test" makes the grants appear.

      In search results, the results header shows the correct count but the grants do not appear. If you check the page source in Firebug, the grants are actually there but set to "display: none".

      Similarly when viewing a contact's Grants tab: any grants in the above statuses do not appear.

      Replicated on demo by creating grant status "Test panel" & creating some grants.

      The problem seems to be the way classes are applied to table rows:

      <tr id="crm-grant_77" class="odd-row crm-grant crm-grant_status-Going to panel">

      • Because spaces in the status label are not escaped, the classes "to" and "panel" are added.

      That means that this jQuery code...

      cj('#crm-container')
      .bind('click', function(event) {
      if (cj(event.target).is('.btn-slide'))

      { cj('.panel').css('display', 'none'); cj(event.target).children().show(); cj(event.target).addClass('btn-slide-active'); }

      else

      { cj('.btn-slide .panel').hide(); cj('.btn-slide-active').removeClass('btn-slide-active'); }


      });

      ...applies display:none.

      The class is applied in CRM/Grant/Form/Selector.tpl and AFAICS is not referenced elsewhere in the codebase, I guess it was just added to facilitate theming. I've verified that removing the grant_status class from the template fixes the problem.

      I suspect the best fix is to transform spaces in the status label in the template. Is there a standard Civi way of doing this?

        Attachments

          Activity

            People

            • Assignee:
              neha.saraph Neha Kulkarni
              Reporter:
              davej Dave Jenkins
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: