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

Edit Event Participant - Cleanup Redundant Jscript Includes

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: CiviEvent
    • Labels:
      None

      Description

      When custom fields are used to extend "Participant" - the HTML output for Add / Edit Participant contains duplicate defines for showBlocks and hideBlocks, dupe invokes of on_load_init_blocks and duplicate popUp() invokes. We should try to clean this up.

      path = civicrm/contact/view/participant?reset=1&action=add&cid=102&context=participant (also action=update)

            • EXAMPLE HTML Output w/ duplicated jscript function calls ****
              <script type="text/javascript">
              var showBlocks = new Array('Event_Volunteer_Info');
              var hideBlocks = new Array('Event_Volunteer_Info_show');

      on_load_init_blocks( showBlocks, hideBlocks );

      function popUp(URL) {
      day = new Date();
      id = day.getTime();
      eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=420,left = 202,top = 184');");
      }

      </script>

      <script type="text/javascript">
      var showBlocks1 = new Array('Event_Volunteer_Info');
      var hideBlocks1 = new Array('Event_Volunteer_Info_show');

      on_load_init_blocks( showBlocks1, hideBlocks1 );
      </script>

      <script type="text/javascript">

      function popUp(URL)

      { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=640,height=420,left = 202,top = 184');"); }

      </script>
      </td>
      </tr>
      <tr> <td> </td>

      <td><input class="form-submit default" name="_qf_Participant_next" value="Save" type="submit" />         <input class="form-submit" name="_qf_Participant_cancel" value="Cancel" type="submit" /></td>
      </tr>
      </table>

      </div>
      </fieldset>

        Attachments

          Activity

            People

            • Assignee:
              shailesh Shailesh Lende
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: