View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09203Bug reportsPluginspublic2014-09-15 22:57
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary09203: Plugin settings int and float allow text for survey settings
Description

I have a strange issue with FireFox 31.0 and plugin settings for survey.

int and float allow text ... The pattern is good but allow any caracter to be validated

Steps To Reproduce

Add some plugin with int for survey (can use https://gitorious.org/demo-limesurvey/examplesettings )

Activate and test to enter some aleatory string.

Additional Information

Maybe FF have a problem, but what version ?
And we need to disallow that in PHP

HTML5 name is OK : http://www.w3.org/TR/html5/forms.html#attr-fe-name
HTML5 id is OK with any caracter (expect space): http://www.w3.org/TR/html5/dom.html#the-id-attribute

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)140902
I will donate to the project if issue is resolvedNo
BrowserFireFox 31 (Linux)
Database type & versionmysql
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2014-09-02 18:34

developer   ~30458

Last edited: 2014-09-02 18:34

For integer :
type = "number" step="1"
For float
type = "number"

Can do the trick too .

Easy : http://www.yiiframework.com/doc/api/1.1/CHtml#numberField-detail

c_schmitz

c_schmitz

2014-09-11 15:05

administrator   ~30576

See also
http://www.wufoo.com/html5/attributes/10-pattern.html

Yes, rather use numberField. Can you fix it?

DenisChenu

DenisChenu

2014-09-11 15:07

developer   ~30578

OK, i move to number.

But do you have same think ? I must do a lint for this : don't know if it's a FireFox bug or not (pattern on input with named array)

c_schmitz

c_schmitz

2014-09-11 15:08

administrator   ~30579

Works in FF for me. Note: In FF the input is only validated on submit.

DenisChenu

DenisChenu

2014-09-11 15:22

developer   ~30580

There are some javascript inside LimeSurvey that make a broken HTML5 system:
fiddle : http://jsfiddle.net/sw5sjj7m/
OK with FireFox ....

DenisChenu

DenisChenu

2014-09-11 15:24

developer   ~30582

Last edited: 2014-09-11 15:25

Tryed again with survey setting INT with FireFox 31 (Linux) : can validate a string for integer value (in survey plugins settings)
fiddle is OK ...

PS: CSS is broken for invalid (for me).

c_schmitz

c_schmitz

2014-09-11 15:25

administrator   ~30583

I checked out your example plugin and it worked the same for me in FF32 (just fine).

DenisChenu

DenisChenu

2014-09-11 19:10

developer   ~30588

Strange then. Have to test with chromium :)

Or maybe i have to deactivate some of my FireFox plugin ...

DenisChenu

DenisChenu

2014-09-13 18:50

developer   ~30618

Last edited: 2014-09-13 19:15

Tested with FF32 : same thinh, before put type=numeric" i want to understand ....

Think i understand : SAVE button is not inside form the form is not validated.

fiddle : http://jsfiddle.net/La0tnap0/1/ compare with http://jsfiddle.net/sw5sjj7m/1/

DenisChenu

DenisChenu

2014-09-15 18:58

developer   ~30638

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14509

DenisChenu

DenisChenu

2014-09-15 18:59

developer   ~30639

use type="number" and use button inside form to allways use browser HTML5 form validation

c_schmitz

c_schmitz

2014-09-15 22:57

administrator   ~30640

2.05+ Build 140915 released

Related Changesets

LimeSurvey: master e090d777

2014-09-15 16:58:45

DenisChenu

Details Diff
Dev: fixed issue 09203: Plugin settings int and float allow text for survey settings
Dev: use click on button inside form to validate form
Affected Issues
09203
mod - application/extensions/SettingsWidget/SettingsWidget.php Diff File
mod - application/views/admin/survey/editSurvey_view.php Diff File
mod - application/views/admin/survey/subview/tabGeneralEditSurvey_view.php Diff File
mod - scripts/admin/surveysettings.js Diff File

Issue History

Date Modified Username Field Change
2014-09-02 17:49 DenisChenu New Issue
2014-09-02 17:54 DenisChenu Steps to Reproduce Updated
2014-09-02 17:54 DenisChenu Additional Information Updated
2014-09-02 18:34 DenisChenu Note Added: 30458
2014-09-02 18:34 DenisChenu Note Edited: 30458
2014-09-11 15:05 c_schmitz Note Added: 30576
2014-09-11 15:07 DenisChenu Note Added: 30578
2014-09-11 15:07 DenisChenu Assigned To => DenisChenu
2014-09-11 15:07 DenisChenu Status new => assigned
2014-09-11 15:08 c_schmitz Note Added: 30579
2014-09-11 15:22 DenisChenu Note Added: 30580
2014-09-11 15:24 DenisChenu Note Added: 30582
2014-09-11 15:25 DenisChenu Note Edited: 30582
2014-09-11 15:25 c_schmitz Note Added: 30583
2014-09-11 19:10 DenisChenu Note Added: 30588
2014-09-13 18:50 DenisChenu Note Added: 30618
2014-09-13 18:53 DenisChenu Note Edited: 30618
2014-09-13 19:10 DenisChenu Note Edited: 30618
2014-09-13 19:13 DenisChenu Note Edited: 30618
2014-09-13 19:15 DenisChenu Note Edited: 30618
2014-09-15 18:58 DenisChenu Changeset attached => LimeSurvey master e090d777
2014-09-15 18:58 DenisChenu Note Added: 30638
2014-09-15 18:58 DenisChenu Resolution open => fixed
2014-09-15 18:59 DenisChenu Note Added: 30639
2014-09-15 18:59 DenisChenu Status assigned => resolved
2014-09-15 18:59 DenisChenu Fixed in Version => 2.05+
2014-09-15 22:57 c_schmitz Note Added: 30640
2014-09-15 22:57 c_schmitz Status resolved => closed