View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
14541Bug reportsTheme editorpublic2019-11-01 08:52
ReporterMazi Assigned ToLouisGac 
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version3.15.x 
Summary14541: Regression: "Next" and "Submit" buttons use same IDs and classes
Description

Currently it is pretty complex styling the "Next" and "Submit" buttons properly because they use the same ID and mostly the same classes:

SUBMIT:
<button id="ls-button-submit" type="submit" value="movesubmit" name="move"class=" ls-move-btn ls-move-submit-btn action--ls-button-submit btn btn-lg btn-primary">
NEXT
<button id="ls-button-submit" type="submit" value="movenext" name="move" class=" ls-move-btn ls-move-next-btn ls-move-submit-btn action--ls-button-submit btn btn-lg btn-primary ">

Both are using ID "ls-button-submit". At LS 2.7x the next button used its own ID ("movenextbtn") which made it pretty straightforward to style them differently based on the ID.
Currently, both are even using the same classes. Only one class is different for the next button ("ls-move-next-btn).

Steps To Reproduce

Test a short 2 page survey and check IDs and classes of the Next and Submit buttons

Additional Information

I suggest adding classes "nextbutton" and "submitbutton" at https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/vanilla/views/subviews/navigation/navigator.twig#L47 and https://github.com/LimeSurvey/LimeSurvey/blob/master/themes/survey/vanilla/views/subviews/navigation/navigator.twig#L52

TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)3.15.9+190214
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5
Server OS (if known)Ubuntu 14 TLS
Webserver software & version (if known)Apache 2
PHP Version7.0.26

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-02-18 10:15

developer   ~50592

Using navigator directly ;).

Else maube we can remove ls-move-submit-btn from next button.

Mazi

Mazi

2019-05-07 17:19

updater   ~51811

@markusfluer: we will provide a pull request which adds classes "nextbutton" and "submitbutton".

markusfluer

markusfluer

2019-05-07 17:39

administrator   ~51813

This totally redundant, and not a regression.
The classes differ in combination, so styling is still easily possible.
I vote to not change this.

DenisChenu

DenisChenu

2019-05-07 18:28

developer   ~51815

@markusfluer : yes : move next have ls-move-next-btn but there no specific class for submit

Yes : you can do

.ls-move-submit-btn{color:red}
.ls-move-next-btn{color:blue}

But remove ls-move-submit-btn to Next seems cleaner in my opionion. It's not a submit survey button (it submit like previous do it) : it's a move next button.

Mazi

Mazi

2019-06-12 09:17

updater   ~52350

Fixed at https://github.com/LimeSurvey/LimeSurvey/commit/e8f0d11c56d19b766d8e28fbfabef7639f42d52f

c_schmitz

c_schmitz

2019-06-12 09:38

administrator   ~52352

Last edited: 2019-06-12 09:39

Mazi, don't commit just something before we all agreed what is to be done. That is not helping. I reverted your commit.

As per the topic:
I would vote to remove the .ls-move-submit-btn from Next as Denis suggested. Problem is that it might break JS/styling that depend on it on current master. (we could change it for LS4 for sure)

What do you think, Markus?

Mazi

Mazi

2019-06-12 09:43

updater   ~52353

Hi Carsten, I agree that this is not the best approach but, to be honest, I was a little tired of the discussion. The problem can be solved easily by adding additional. unique classes. Removing a class is something I am not in favor of because, as you pointed out, these may already be used by others.
Of course, Markus is also right stating that in combination these classes differ, but the common user is no CSS expert. So dealing with a single class for each button would be far easier for our users to deal with.

What is your preferred approach, Carsten?

c_schmitz

c_schmitz

2019-06-12 09:45

administrator   ~52354

Last edited: 2019-06-12 10:02

Mazi, regarding your last question: Please read what I wrote in my previous comment.

DenisChenu

DenisChenu

2019-06-12 11:29

developer   ~52355

Something i don't understand : make own navigator.twig is really easy in template …
And it's relativily stable.

I need an id for each navigator, i add it in my theme, not in core : https://gitlab.com/SondagesPro/SurveyThemes/skelvanilla/blob/master/views/subviews/navigation/navigator.twig#L7
I need to clearly allow different place for move next / move previous and other navigator part : i add a new twig .

Mazi

Mazi

2019-06-12 11:33

updater   ~52356

Denis, you are not the average Limesurvey user. You are an experienced developer, you can do great stuff. But we need to view such issues from the default user point of view and check what the easiest solution would be for them.

DenisChenu

DenisChenu

2019-06-12 12:36

developer   ~52359

@Mazi : you sell theme, you distribute free theme on LimeStore. I distribute free theme too ans we wait more theme.

I'm OK we need to get the user point of view, but here : if user didn't know anything of CSS : use

.btn-next-new{color:blue}

are near

.ls-move-submit-btn{color:red}
.ls-move-next-btn{color:blue}

No big difference …

DenisChenu

DenisChenu

2019-06-12 12:37

developer   ~52360

@Mazi : i didn't see any forum post related to this mantis …
Then, maybe it's not an issue for a lot of user …

c_schmitz

c_schmitz

2019-06-28 12:27

administrator   ~52632

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

Mazi

Mazi

2019-11-01 08:52

updater   ~54302

What's the status of this issue for Limesurvey 4? Is the regression finally removed there?

Related Changesets

LimeSurvey: master e8f0d11c

2019-06-12 09:16:21

Mazi


Committer: GitHub Details Diff
Fixed issue 14541

Added unique classes for next and submit button.
Affected Issues
14541
mod - themes/survey/vanilla/views/subviews/navigation/navigator.twig Diff File

LimeSurvey: master cb2e3ca4

2019-06-12 09:32:32

c_schmitz

Details Diff
Dev Revert "Fixed issue 14541"
Dev This reverts commit e8f0d11c56d19b766d8e28fbfabef7639f42d52f.
Dev THe patch message is incorrect and by itself bogus and unwarranted.
Affected Issues
14541
mod - themes/survey/vanilla/views/subviews/navigation/navigator.twig Diff File

Issue History

Date Modified Username Field Change
2019-02-18 10:08 Mazi New Issue
2019-02-18 10:08 Mazi Status new => assigned
2019-02-18 10:08 Mazi Assigned To => LouisGac
2019-02-18 10:15 DenisChenu Note Added: 50592
2019-05-07 17:19 Mazi Note Added: 51811
2019-05-07 17:39 markusfluer Note Added: 51813
2019-05-07 18:28 DenisChenu Note Added: 51815
2019-06-12 09:17 Mazi Note Added: 52350
2019-06-12 09:38 c_schmitz Note Added: 52352
2019-06-12 09:39 c_schmitz Note Edited: 52352
2019-06-12 09:43 Mazi Note Added: 52353
2019-06-12 09:45 c_schmitz Note Added: 52354
2019-06-12 10:02 c_schmitz Note Edited: 52354
2019-06-12 11:29 DenisChenu Note Added: 52355
2019-06-12 11:33 Mazi Note Added: 52356
2019-06-12 12:36 DenisChenu Note Added: 52359
2019-06-12 12:37 DenisChenu Note Added: 52360
2019-06-28 12:27 c_schmitz Changeset attached => LimeSurvey master cb2e3ca4
2019-06-28 12:27 Mazi Changeset attached => LimeSurvey master e8f0d11c
2019-06-28 12:27 c_schmitz Note Added: 52632
2019-11-01 08:52 Mazi Note Added: 54302