View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
15712Bug reportsErgonomypublic2021-07-12 11:53
ReporterDenisChenu Assigned Togabrieljenik  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version3.25.20 
Summary15712: When doing error in token create : unable to submit, need to reload page
Description

If you make an error in an number value and try to submit in token creation : button is disable and you can not submit after fix

Steps To Reproduce

See screencast

Additional Information

This disable ALL usage of HTML5 input control .
This is not the only place where we have this issue.

Disabling the button must be done after control validity of the form …

TagsNo tags attached.
Attached Files
Peek 14-01-2020 17-20.gif (195,951 bytes)
Bug heat8
Complete LimeSurvey version number (& build)3.25.20
I will donate to the project if issue is resolvedNo
BrowserFF
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 17223 closedgabrieljenik With mandatory attribute : lost all current value when create a token 
related to 17224 closedgabrieljenik When entering an invalid email when create token : lost all information 

Users monitoring this issue

There are no users monitoring this issue.

Activities

cdorin

cdorin

2020-01-15 17:45

reporter   ~55305

This option happens in multiple places (e.g., create a survey , start the qcode with a number, click save -> same error)

DenisChenu

DenisChenu

2020-01-15 17:47

developer   ~55307

Last edited: 2021-02-04 11:46

I confirm issue for 4.0.0 : same action .

I don't understand why this happen : this javascript is too complex for me…

DenisChenu

DenisChenu

2020-01-15 17:49

developer   ~55308

Last edited: 2021-02-04 11:46

start the qcode with a number

I think i already reported this one … less important : we have Save and add new ;)

cdorin

cdorin

2020-01-15 17:57

reporter   ~55309

Last edited: 2021-02-04 11:46

Yea, will have to talk to @markusfluer about that.

DenisChenu

DenisChenu

2020-10-22 18:30

developer   ~60375

Last edited: 2021-02-04 11:46

An issue is here : https://github.com/LimeSurvey/LimeSurvey/blob/4f18b7a1cd3a14347693968129ceea9ef4d71ec0/assets/packages/adminbasics/src/parts/save.js#L97

(maybe) : this check only required value.

Most complete : $form[0].checkValidity(); or $form.checkValidity();

gabrieljenik

gabrieljenik

2021-03-25 17:13

manager   ~63621

After the VueJS withdraw, this seems to got fixed.
Numeric field is type numeric now, so no letters allowed.
Mail is validated on the server side.

I can't reproduce issue anymore, not here nor in LS4

DenisChenu

DenisChenu

2021-04-01 17:07

developer   ~63783

Still have the issue in 3.25.20

  1. Go to token
  2. Add a single token
  3. Enter "ddd" in use left
  4. Click on Save
  5. OK : can not submit (HTML5 validation)
  6. Correct the use left
  7. Can not click on save : it was disable …
DenisChenu

DenisChenu

2021-04-01 17:09

developer   ~63784

(OK in 4.X: save in not disabled)

DenisChenu

DenisChenu

2021-04-01 17:10

developer   ~63785

Numeric field is type numeric now, so no letters allowed.

You can enter something else, but can not submit

The issue is to disable action on submit button on click and not on submit …

gabrieljenik

gabrieljenik

2021-04-05 20:54

manager   ~63804

The issue is as follows:

  • Firefox has a different interpretation on what to do with non numeric values.
  • It does allow to enter them, but not to submit them
  • Due to"general LS standards for handling forms"
  • After top bar save button is clicked,
    • The form submit button is clicked
    • The topbar save button is added the spinning wheel and disabled.
  • After trying to submit, the form is invalidated.
    But the button still has the spining wheel and is not restablished.

Suggested approach short term:

  • Add invalid handler on the form --> Will do this.

Suggested approach long temr:

  • Open new ticket to only trigger form submit if form is valid using reportValidity.
    This has a general impact on many forms.

    This is not IE compatible.
    https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity

  • We should do this as spinning wheel works for "add new survey"forms only.

  • Alternative approach enable custom form validations through form attributes which are checked during topbar save button.

DenisChenu

DenisChenu

2021-04-05 21:52

developer   ~63805

Yes : https://bugs.limesurvey.org/view.php?id=15712#c60375

Most complete : $form[0].checkValidity(); or $form.checkValidity();

gabrieljenik

gabrieljenik

2021-04-07 18:42

manager   ~63860

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1839

Added ability to trigger html5 internal form validation from form attribute ("data-trigger-validation")
Some browsers don't show html5 internal validation errors by default.

Eventually, this triggering that would be std for all LS forms.
But for now, and make a smaller impact, we are tigerring this on a case by case basis.

Also, using the invalid event (https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event) to restore the save button to its original state after being clicked and an error found.

gabrieljenik

gabrieljenik

2021-04-08 12:32

manager   ~63867

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31560

c_schmitz

c_schmitz

2021-07-12 11:53

administrator   ~65326

Release done.

Related Changesets

LimeSurvey: 3.x-LTS 1ba16bf6

2021-04-08 14:32

gabrieljenik

Committer: GitHub


Details Diff
Fixed issue 15712: When doing error in token create : unable to submit, need to reload page (#1839) Affected Issues
15712
mod - application/views/admin/token/tokenform.php Diff File
mod - assets/packages/adminbasics/build/adminbasics.css Diff File
mod - assets/packages/adminbasics/build/adminbasics.js Diff File
mod - assets/packages/adminbasics/build/adminbasics.min.js Diff File
mod - assets/packages/adminbasics/build/adminbasics.rtl.css Diff File
mod - assets/packages/adminbasics/src/parts/save.js Diff File

Issue History

Date Modified Username Field Change
2020-01-14 17:23 DenisChenu New Issue
2020-01-14 17:23 DenisChenu File Added: Peek 14-01-2020 17-20.gif
2020-01-15 17:44 cdorin Assigned To => cdorin
2020-01-15 17:44 cdorin Status new => assigned
2020-01-15 17:45 cdorin Note Added: 55305
2020-01-15 17:47 DenisChenu File Added: Capture d’écran du 2020-01-15 17-47-26.png
2020-01-15 17:47 DenisChenu Note Added: 55307
2020-01-15 17:49 DenisChenu Note Added: 55308
2020-01-15 17:57 cdorin Note Added: 55309
2020-10-22 18:30 DenisChenu Note Added: 60375
2020-10-22 18:31 DenisChenu Note Edited: 60375
2021-02-04 10:15 cdorin Status assigned => new
2021-02-04 11:46 cdorin Priority none => low
2021-02-04 11:46 cdorin Status new => confirmed
2021-02-04 11:46 cdorin Sync to Zoho Project => |Yes|
2021-02-08 18:22 cdorin Assigned To cdorin =>
2021-02-08 18:22 cdorin Sync to Zoho Project Yes => |Yes|
2021-03-25 17:13 gabrieljenik Note Added: 63621
2021-04-01 16:17 ollehar Assigned To => ollehar
2021-04-01 16:17 ollehar Status confirmed => closed
2021-04-01 16:17 ollehar Resolution open => no change required
2021-04-01 17:00 DenisChenu Relationship added related to 17223
2021-04-01 17:03 DenisChenu Relationship added related to 17224
2021-04-01 17:07 DenisChenu Status closed => new
2021-04-01 17:07 DenisChenu Resolution no change required => reopened
2021-04-01 17:07 DenisChenu Complete LimeSurvey version number (& build) 3.21.4 bed9b3c => 3.25.20
2021-04-01 17:07 DenisChenu Note Added: 63783
2021-04-01 17:09 DenisChenu Note Added: 63784
2021-04-01 17:09 DenisChenu Priority low => normal
2021-04-01 17:09 DenisChenu Product Version 3.x => 3.25.20
2021-04-01 17:09 DenisChenu Sync to Zoho Project Yes => |Yes|
2021-04-01 17:10 DenisChenu Note Added: 63785
2021-04-05 20:54 gabrieljenik Note Added: 63804
2021-04-05 21:52 DenisChenu Note Added: 63805
2021-04-07 18:42 gabrieljenik Note Added: 63860
2021-04-07 18:43 gabrieljenik Assigned To ollehar => gabrieljenik
2021-04-08 12:32 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 1ba16bf6
2021-04-08 12:32 gabrieljenik Note Added: 63867
2021-04-08 12:32 gabrieljenik Resolution reopened => fixed
2021-04-08 12:42 c_schmitz Status new => resolved
2021-07-12 11:53 c_schmitz Note Added: 65326
2021-07-12 11:53 c_schmitz Status resolved => closed