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

JS bug in forms with mandatory custom fields with post-help

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      When a form (ex: edit individual) has a mandatory custom field with post-help, clicking on the help icon will cause a JS error "SyntaxError: unterminated string literal".

      Not the cleanest fix, but adding

      {strip}

      around templates/CRM/Form/label.tpl solves the issue.

      Those markers are removed by strip_tags() in CRM/Core/Smarty/plugins/function.help.php, but somehow the newlines cause problems.

      Not sending a pull-request, because I'm not convinced that this is a clean fix

        Attachments

          Activity

            People

            • Assignee:
              colemanw Coleman Watts
              Reporter:
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: