phpMyEdit - Viewing Bug Advanced Details [ Go Back ]
240 core / general feature always 2004-04-23 14:41 2004-04-27 14:00
michal  
hbernard  
normal  
assigned current from CVS  
open  
none  
none  
no js validation
currently, js validation is performed always. even if there is no 'required' field.
i propose a option, which would turn of all js (in a particular mode ACF..)
$opts['display']['js']['A'] = false; or
$opts['display']['js|A'] = false;
(with true as default)
would disable all js on a particular page (7-8 extra ifs)

Bug Notes
nepto   
2004-04-23 15:17   
Well, if this is true, than it is a bug, which was introduced during making last JS related changes.

I do not thnk that new API is neccessary. Checking if some required is used should be enough.
michal   
2004-04-23 15:45   
well, i would avoid checking if required fields. you never know what will come in future (already js regexp).

and it would be nice for links users just to turn every js off, reducal of transfered bytes....
also there is js in F mode, and presing enter to perform a query, and ...
hbernard   
2004-04-24 07:29   
if there is no required field, there is no
phpMyEdit_trim
and phpMyEdit_form_control in the output.

But buttons try to call phpMyEdit_form_control even if there is nothing to validate and no phpMyEdit_form_control.

I think this is answer to #234.

We need an internal flag usable by display_buttons.
nepto   
2004-04-24 13:16   
Well, two possible solutions:

1. When no required fields, create empty validation function returning always true.

2. Or remove call to phpMyEdit_form_control() from buttons/submits.

My vote is for [2]. :)
hbernard   
2004-04-24 15:09   
Of course, the [2] !

I will make a patch (as soon as button order is commited).

But, looking at the topic of this bug, don't you think it would be nice to have a ['display']['js'] option, just like we have this for tabs ?
michal   
2004-04-27 14:00   
[2] :-)

maybe ['display']['js-validation'], ['display']['js-enter'], ...