Ticket #1485 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

javascript Validation Broken with guielements (so it seems)

Reported by: James_Bennett Assigned to:
Priority: blocker Milestone: 2.2
Component: Core Version: 2.2rc1
Keywords: Cc:
Confirmation: Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description (Last modified by p_lindheimer)

IT APPEARS THAT ALL PAGES THAT USE guielements ARE NOT HAVING THEIR VALIDATION javascripts EXECUTED.

Voicemail validation javascript is not working when you click submit. It accepts a password of "asdf" (should warn if not all numeric).

On Firefox 1.5 it fails to pop up a warning on a voicemail password of "adsf" on Internet Explorer 6.0.2800.1106 it flags a javascript error wh

The code looks like it copies document.frm_extensions to theForm. However, tracing the routine shows theForm.vmpwd is not defined (ie pops up javascript error warning).

having the validation routine stuff in "theForm = document.frm_extensions;" as the first thing _inside_ the routine fixes this, as would referencing document.frm_extensions directly or passing it to the routine by reference.

Change History

12/02/06 23:24:09 changed by p_lindheimer

  • owner deleted.
  • component changed from - choose - to Voicemail Module.

12/02/06 23:28:12 changed by p_lindheimer

hmm - it's being passed the "!isInteger()" javascript, wonder if it is a guihook issue? well no time to look into it now. If some of the bug marshalls want to confirm this issue or add more detail, great!

12/07/06 03:46:14 changed by p_lindheimer

  • description changed.
  • component changed from Voicemail Module to Core.
  • summary changed from Extension validation javascript error to javascript Validation Broken with guielements (so it seems).
  • priority changed from minor to blocker.
  • milestone set to 2.2.
  • owner changed.

Well chalk another one up for guielements so it seems. None of the validation is working on pages with guielements. (Try putting alphabet sooup for your outbound cid...)

Rob - this one is yours (you voted to fix them instead of reverting ...)

12/11/06 03:04:41 changed by naftali5

This is absolutely not the case!!!
To prove - change your settings in AMPORTAL.conf to deviceanduser and everything works as expected!
Ok, what's the problem?
the functions.inc.php of the voicemail module has a bug.
It is hard coded for frm_users_isVoiceMailEnabled in the gui elements where it should really be getting the $pagename in the config_page_init and handling the two pages users and extensions differently! Basically the javascript error is because the voicemail module is calling a non-existant function frm_users_isVoiceMailEnabled when your page is extensions and the function gets called frm_extensions_isVoiceMailEnabled.

12/11/06 03:27:07 changed by naftali5

Sorry, didn't notice the comment about CallerID alphabet soup.
Try entering a single ! in the callerId and submit.
The validation works doesn't it?
only the function is very lenient in regard to isCallerID
from admin/common/script.js.php

function isCallerIDChar (c)
{   return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) || ((c >= "0") && (c <= "9")) || (c == ":") || (c == "_") || (c == "-") || (c == "<") || (c == ">") || (c == "(") || (c == ")") || (c == " ") || (c == "\"") || (c == "&") || (c == "@") || (c == ".") )
}

basically anything a-z A-Z 0-9 : _ - < > ( ) \ & @ . all are accepted and in any order

12/18/06 23:10:47 changed by RobThomas

  • status changed from new to closed.
  • resolution set to fixed.

Thanks everyone for the debugging work. Fixed in VM 1.5.3.

01/08/07 14:46:44 changed by

  • milestone deleted.

Milestone 2.2 deleted

01/08/07 15:36:54 changed by vgster

  • milestone set to 2.2.