Skip to content

Commit

Permalink
Merge branch 'answers_html' of https://github.com/LimeSurvey/LimeSurvey
Browse files Browse the repository at this point in the history
… into answers_html
  • Loading branch information
Tammo ter Hark committed Oct 26, 2016
2 parents 0a2dc76 + 6e7e797 commit 619958c
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 70 deletions.
2 changes: 1 addition & 1 deletion application/core/packages/limesurvey/survey.css
Expand Up @@ -95,7 +95,7 @@
}

/* in inline form : width need to be auto */
.form-inline .ls-input-group{display: inline-table;vertical-align: middle;}
.form-inline .ls-input-group{display: inline-table;vertical-align: middle;width:auto}
.form-inline .input-group .ls-input-group-extra{width: auto;white-space: initial;}
.form-inline .ls-input-group .ls-input-group-extra{width: auto;white-space: initial;}

Expand Down
1 change: 1 addition & 0 deletions application/helpers/replacements_helper.php
Expand Up @@ -291,6 +291,7 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de
{
$_therearexquestions = gT("There are {NUMBEROFQUESTIONS} questions in this survey."); //Note this line MUST be before {NUMBEROFQUESTIONS}
};
$_therearexquestions = "<div class='question-count-text'>".$_therearexquestions."</div>";
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions application/views/survey/questions/arrays/column/answer.php
Expand Up @@ -20,12 +20,12 @@ class="answers-list radio-list <?php echo ($i % 2)?'ls-odd':'ls-even';?> <?php i
<!-- @todo : control if radiogroup can be used in col : https://www.w3.org/TR/wai-aria/roles -->
<?php endforeach; ?>
</colgroup>
<thead>
<tr class=''>
<thead><!-- The global concept is hard to understand : must control if aria-labelledby for radio-group is OK and if we can add aria-hidden here -->
<tr class='ls-heading'><!-- unsure for ls-heading class here -->
<td>&nbsp;</td>
<?php
foreach ($aQuestions as $i=>$question): ?>
<th id="answertext<?php echo $question['myfname'];?>" class="answertext control-label <?php if($question['errormandatory']){ echo " error-mandatory";} ?>">
<th id="answertext<?php echo $question['myfname'];?>" class="answertext control-label <?php if($question['errormandatory']){ echo " has-error error-mandatory";} ?>">
<?php echo $question['question']; ?>
</th>
<?php endforeach; ?>
Expand Down
Expand Up @@ -23,7 +23,7 @@
<!-- Header -->

<thead>
<tr>
<tr class="ls-heading">
<td>&nbsp;</td>
<th class='left-header'><?php echo $leftheader; ?></th>
<td>&nbsp;</td>
Expand Down
Expand Up @@ -5,10 +5,10 @@
?>

<!-- thead -->
<th class="th-5"><?php eT("Increase");?></th>
<th class="th-6"><?php eT("Same");?></th>
<th class="th-7"><?php eT("Decrease");?></th>
<th class=""><?php eT("Increase");?></th>
<th class=""><?php eT("Same");?></th>
<th class=""><?php eT("Decrease");?></th>
<?php if($no_answer):?>
<th class="th-8"><?php eT("No answer");?></th>
<th class=""><?php eT("No answer");?></th>
<?php endif;?>
<!-- end of thead -->
Expand Up @@ -28,8 +28,8 @@
<?php endif;?>
</colgroup>

<thead>
<tr aria-hidden="true">
<thead aria-hidden="true">
<tr class="ls-heading">
<td>&nbsp;</td>

<?php foreach ($labelans as $ld): ?>
Expand Down
Expand Up @@ -14,7 +14,7 @@
</tbody>

<tbody>
<tr class="repeat headings hidden-xs" aria-hidden="true">
<tr class="ls-heading ls-repeat-heading hidden-xs" aria-hidden="true">
<th>&nbsp;</th>
<?php foreach ($labelans as $ld): ?>
<td>
Expand Down
4 changes: 2 additions & 2 deletions application/views/survey/questions/arrays/texts/answer.php
Expand Up @@ -47,8 +47,8 @@
<?php endif;?>
</colgroup>

<thead>
<tr class="ls-heading" aria-hidden="true">
<thead aria-hidden="true">
<tr class="ls-heading">
<td>
&nbsp;
</td>
Expand Down
Expand Up @@ -21,8 +21,8 @@
echo $sColumns;
?>
</colgroup>
<thead>
<tr class="ls-heading" aria-hidden="true">
<thead aria-hidden="true">
<tr class="ls-heading">
<td>&nbsp;</td>
<?php
// rows/cell/thead.php
Expand Down
Expand Up @@ -5,10 +5,10 @@
?>

<!-- thead -->
<th class="dontread"><?php eT('Yes');?></th>
<th class="dontread"><?php eT('Uncertain');?></th>
<th class="dontread"><?php eT('No');?></th>
<th><?php eT('Yes');?></th>
<th><?php eT('Uncertain');?></th>
<th><?php eT('No');?></th>
<?php if($no_answer):?>
<th class="dontread"><?php eT('No answer'); ?></th>
<th><?php eT('No answer'); ?></th>
<?php endif;?>
<!-- end of thead -->
2 changes: 1 addition & 1 deletion templates/basic/pstpl/welcome.pstpl
Expand Up @@ -5,6 +5,6 @@
<div class="welcome">
<div class="surveywelcome">
{WELCOME}
{if(!is_empty(THEREAREXQUESTIONS),"<div class='therearexquestions'>"+THEREAREXQUESTIONS+"</div>","")}
{THEREAREXQUESTIONS}
</div>
</div>
6 changes: 3 additions & 3 deletions templates/test/pstpl/completed.pstpl
@@ -1,4 +1,4 @@
<div id="completed">
<div>{COMPLETED}</div>
{if(!is_empty(URL),"<div class='url url-end'>"+URL+"</div>","")}
<div class="completed-wrapper">
<div class='completed-text'>{COMPLETED}</div>
{URL}
</div>
16 changes: 2 additions & 14 deletions templates/test/pstpl/endpage.pstpl
@@ -1,16 +1,4 @@

</div><!--end #main-->
<div id="navigation" class="aside">
<!-- Place for some navigation -->
</div>
<div id="extra" class="aside">
<!-- Place for some extra -->
</div>
</div><!--end #content -->
<div id="footer" class="footer">
<div class="container">
<p class="text-muted">A place for user manager text and link (legal notice / website link : must be removed when releasing.</p>
</div>
<!-- -->
</div>
<!-- Here it a place for a footer -->

</div><!-- end container-->
7 changes: 4 additions & 3 deletions templates/test/pstpl/load.pstpl
@@ -1,9 +1,10 @@
<div class='load-page'>
<div class="h2">{LOADHEADING}</div>
{LOADERROR}
<div class="h3">{LOADHEADING}</div>
{LANGUAGECHANGER}
<div class="well">
{LOADMESSAGE}
{LOADERROR}
<div class="form-load">{LOADFORM}</div>
<div class='url-wrapper url-return-wrapper'>{RETURNTOSURVEY}</div>
</div>
<div class='text-center'><div class='btn btn-sm'>{RETURNTOSURVEY}</div></div>
</div>
16 changes: 10 additions & 6 deletions templates/test/pstpl/navigator.pstpl
@@ -1,6 +1,10 @@
<p class="navigator row">{NAVIGATOR}</p>
<!-- Review this par : using div ? -->
{if(!is_empty(SAVE) or !is_empty(CLEARALL),"<ul class='list-unstyled list-inline save-clear'>","")}
{if(!is_empty(SAVE),"<li>"+SAVE+"</li>","")}
{if(!is_empty(CLEARALL),"<li>"+CLEARALL+"</li>","")}
{if(!is_empty(SAVE) or !is_empty(CLEARALL),"</ul>","")}
<div class="navigator row hidden-xs">
<div class="col-sm-6 text-left">{MOVEPREVBUTTON}</div>
<div class="col-sm-6 text-right">{MOVENEXTBUTTON}</div>
</div>
<div class="navigator text-center visible-xs-block">{NAVIGATOR}</div>
<!-- Need improvment -->
<ul class='list-unstyled list-inline save-clear-list'>
<li>{CLEARALL}</li><!-- btn-link in core ? -->
<li>{SAVE}</li>
</ul>
8 changes: 4 additions & 4 deletions templates/test/pstpl/question.pstpl
@@ -1,16 +1,16 @@
<div {QUESTION_ESSENTIALS} class="question-wrapper {QUESTION_CLASS} {QUESTION_MAN_CLASS} {QUESTION_INPUT_ERROR_CLASS}">
<div {QUESTION_ESSENTIALS} class="well question-wrapper {QUESTION_CLASS} {QUESTION_MAN_CLASS} {QUESTION_INPUT_ERROR_CLASS}">
<div class="question-text-wrapper">
{QUESTION_MANDATORY}
{if(!is_empty(QUESTION_NUMBER),"<span class='label label-default question-number'>"+QUESTION_NUMBER+"</span>","")}
{if(!is_empty(QUESTION_CODE),"<span class='label label-info question-code'>"+QUESTION_CODE+"</span>","")}
<div class="question-text">{QUESTION_TEXT}</div>
<div class="question-text h3 text-info">{QUESTION_TEXT}</div>
</div>
<div class="help-wrapper">
{QUESTION_MAN_MESSAGE}
{QUESTION_VALID_MESSAGE}
{QUESTION_FILE_VALID_MESSAGE} <!-- unsure still used -->
{if(!is_empty(trim(strip_tags(QUESTION_HELP))),"<div class='help'>"+QUESTION_HELP+"</div>","")}<!-- in 2.06 : come from qanda_helper -->
{QUESTION_HELP} <!-- EM dynamic help -->
</div>
<div class="answers-wrapper clearfix">{ANSWER}</div>
{if(!is_empty(QUESTIONHELP),"<div class='question-help clearfix'>"+QUESTIONHELP+"</div>","")}
<div class='question-help clearfix'>{QUESTIONHELP}</div>
</div>
10 changes: 5 additions & 5 deletions templates/test/pstpl/register.pstpl
@@ -1,6 +1,6 @@
<div id="register">
{if(REGISTERERROR,"<div class='alert alert-danger' role='alert'>"+REGISTERERROR+"</div>")}
<div class='h3'>{REGISTERMESSAGE1}</div>
<div class='h4'>{REGISTERMESSAGE2}</div>
<div class="form register-form">{REGISTERFORM}</div>
<div class="register well">
<div class='h3'>{REGISTERMESSAGE1}</div>
<div>{REGISTERMESSAGE2}</div>
{REGISTERERROR}
<div class="register-form">{REGISTERFORM}</div>
</div>
16 changes: 8 additions & 8 deletions templates/test/pstpl/save.pstpl
@@ -1,11 +1,11 @@
<div class="h1">{SURVEYNAME}</div>

<div class='h1 save-page'>{SURVEYNAME}</div>
<div id="save">
<div class="h3">{SAVEHEADING}</div>
{SAVEERROR}
<div class="savemessage">{SAVEMESSAGE}</div>
{if(SAVEALERT,"<div class='alert alert-info' role='alert'>"+SAVEALERT+"</div>","")}
<div class="form">{SAVEFORM}</div>

<div class='url url-return'>{RETURNTOSURVEY}</div>
<div class="well">
{SAVEMESSAGE}
{SAVEERROR}
<div class="text-success">{SAVEALERT}</div>
<div class="form-save">{SAVEFORM}</div>
<div class='url-wrapper url-return-wrapper'>{RETURNTOSURVEY}</div>
</div>
</div>
5 changes: 2 additions & 3 deletions templates/test/pstpl/startpage.pstpl
Expand Up @@ -32,6 +32,5 @@
</div>
</div>
</div>
<div id="content">
<div id="main" class="container-fluid">
{FLASHMESSAGE}<!-- To be reviewed -->
<div id="content" class="container-fluid">
{FLASHMESSAGE}<!-- To be reviewed -->
2 changes: 1 addition & 1 deletion templates/test/pstpl/survey.pstpl
@@ -1,5 +1,5 @@
<div class="h1">{SURVEYNAME}</div>
{if(!is_empty(SURVEYDESCRIPTION),'<div class="jumbotron surveydescrition">'+SURVEYDESCRIPTION+'</div>','')}
<div class="lead surveydescrition">{SURVEYDESCRIPTION}</div>

<!-- Because without JS : LANGUAGECHANGER NEED to be in the form -->
{LANGUAGECHANGER}
Expand Down
4 changes: 2 additions & 2 deletions templates/test/pstpl/welcome.pstpl
@@ -1,10 +1,10 @@
{CHECKJAVASCRIPT}
<div class="h1">{SURVEYNAME}</div>
{if(!is_empty(SURVEYDESCRIPTION),'<div class="jumbotron surveydescrition">'+SURVEYDESCRIPTION+'</div>','')}
<div class="lead surveydescrition">{SURVEYDESCRIPTION}</div>
{LANGUAGECHANGER}
<div class="welcome">
<div class="surveywelcome">
{WELCOME}
{if(!is_empty(THEREAREXQUESTIONS),"<div class='therearexquestions'>"+THEREAREXQUESTIONS+"</div>","")}
{THEREAREXQUESTIONS}
</div>
</div>

0 comments on commit 619958c

Please sign in to comment.