Skip to content

Commit

Permalink
Fixed issue #10480: Default template : home page : HTML issue
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Mar 9, 2016
1 parent efc6c25 commit f18dbca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

<!-- views/survey/system/LanguageChanger -->
<div class="form-group">
<label for="lang" class="control-label">
<label for="langchanger" class="control-label">
<?php eT("Select language:");?>
</label>

<?php echo CHtml::dropDownList('lang', $sSelected,$aListLang,array('class'=>$sClass,'data-targeturl'=>$sTargetURL));?>
<?php echo CHtml::dropDownList('langchanger', $sSelected,$aListLang,array('class'=>$sClass,'data-targeturl'=>$sTargetURL));?>
<!-- We don't have to add this button if in previewmode -->
<?php echo CHtml::htmlButton(gT("Change the language"),array('type'=>'submit','id'=>"changelangbtn",'value'=>'changelang','name'=>'changelang','class'=>'changelang jshide btn btn-default')); ?>
</div>
Expand Down
6 changes: 4 additions & 2 deletions templates/default/views/survey.pstpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<!-- Survey Description -->
<!-- Survey Description survey.pstpl -->
<div class="row" id="survey-header">
<div class="col-sm-12 ">
{CHECKJAVASCRIPT}
<h2 id="surveynametitle">{SURVEYNAME}</h2><br />
<p id="surveydescription">{SURVEYDESCRIPTION}</p>
<p id="surveydescription">
{SURVEYDESCRIPTION}
</p>
</div>
</div>

12 comments on commit f18dbca

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use use a lot multiline in description : better if it's a div and not a p.

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update name="lang" to name="langchanger" break esxisting system.

If you put {LANGUAGECHANGER} inside welcome.pstpl : it don't work.

Any reason to update this ?

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say double id between the language switch from menu and the one that user can include in surveylist/survey

@Shnoulle
Copy link
Collaborator

@Shnoulle Shnoulle commented on f18dbca Sep 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but name !==id .....

CHtml::dropDownList('lang', $sSelected,$aListLang,array('class'=>$sClass,'data-targeturl'=>$sTargetURL,'id'=>somealeatorystring));

here use aleatory string, but can use a static var here (i think , must test if we can use it in views)

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to change it: feel free to do it.

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes : you see the not(this) ?

You speak for id, i speak for name .....

@LouisGac
Copy link
Contributor

@LouisGac LouisGac commented on f18dbca Sep 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the IRC you said:

(17:17:14) shnoulle: I speak for remove LANGUAGECHANGER from header and put it inwelcome.pstpl

In the bug report you asked for:

With multilingual survey : there are 2 times the language dropdow. Because welcome use survey.pstp + welcome.pstpl.
I think the best is to leave the selector in survey.pstpl
https://bugs.limesurvey.org/view.php?id=10956

But whatever: Feel free to change whatever you think is needed.

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I say in survey.pstpl, noit in startpage.pstpl .....

You can want to show :

  1. language changer in header : default template
  2. language changer in welcome + question page : 2.06 behaviour (survey.pstpl + welcome.pstpl) (bug 10956) : i say in survey.p
  3. nowhere in template : only in survey content (any user can want that): for example only in groupdescription of first groupe

Actually only solution 1 work. You say on IRC : it's not a bug because it work with the dfault template ...; OK , LimeSurvey work only with included template .....
User don't have to upadet template a lot, they just be allowed to update some color ....

@LouisGac
Copy link
Contributor

@LouisGac LouisGac commented on f18dbca Sep 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what I say denis is that the language changer is making problem since at least 2014 (when you were already speaking about the nojs issues with language changer). This "component" probably need to be rewritten correctly, so it can handle so many instances as we want in a page, as question or as menu.

Refactoring each part of LimeSurvey that need to be refactored wasn't our goal. Our goal was to write a working bootstrap native template.

So sorry if we didn't make it universal and working for any template solution: that wasn't the goal.

Now, you can change whatever you want in the source code to make it easier for your templates to work on it. So precisely to change those kind of things.

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially reverted in b39ad5f .

@maziminke : you delete your comment ? You're tracked ;)

@maziminke
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shnoulle, yes, I removed my comment because I noticed your fix 3 minutes later.

Please sign in to comment.