Skip to content

Commit

Permalink
Dev: Remove all HTML errors
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 7, 2016
1 parent 3a66381 commit 93dfde4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
16 changes: 6 additions & 10 deletions application/controllers/admin/conditionsaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,8 @@ public function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
$aViewUrls['output'] .= gT("or");
}

$aViewUrls['output'] .= "\t<tr class='{$markcidstyle}'>\n"
."\t<td colspan='2'>"
.CHtml::form(array("/admin/conditions/sa/index/subaction/{$subaction}/surveyid/{$iSurveyID}/gid/{$gid}/qid/{$qid}/"), 'post', array('id'=>"conditionaction{$rows['cid']}",'name'=>"conditionaction{$rows['cid']}"))
."<table class='table' id='conditionstable'>\n"
$aViewUrls['output'] .= CHtml::form(array("/admin/conditions/sa/index/subaction/{$subaction}/surveyid/{$iSurveyID}/gid/{$gid}/qid/{$qid}/"), 'post', array('id'=>"conditionaction{$rows['cid']}",'name'=>"conditionaction{$rows['cid']}"))
."<table class='table conditionstable'>\n"
."\t<tr class='active'>\n";

if ( $subaction == "copyconditionsform" || $subaction == "copyconditions" )
Expand All @@ -434,7 +432,7 @@ public function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
. "</td>\n";
}
$aViewUrls['output'] .= ""
."<td class='col-md-4' id='questionnamecol'>\n"
."<td class='col-md-4 questionnamecol'>\n"
."\t<span>\n";

$leftOperandType = 'unknown'; // prevquestion, tokenattr
Expand Down Expand Up @@ -482,13 +480,13 @@ public function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
}

$aViewUrls['output'] .= "\t</span></td>\n"
."\t<td class='col-md-2' id='operatornametd'>\n"
."\t<td class='col-md-2 operatornametd'>\n"
."<span>\n" // .gT("Equals")."</font></td>"
.$method[trim ($rows['method'])]
."</span>\n"
."\t</td>\n"
."\n"
."\t<td class='col-md-3' id='questionanswertd'>\n"
."\t<td class='col-md-3 questionanswertd'>\n"
."<span>\n";

// let's read the condition's right operand
Expand Down Expand Up @@ -633,8 +631,7 @@ public function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
}

$aViewUrls['output'] .= CHtml::closeTag('td') . CHtml::closeTag('tr') .
CHtml::closeTag('table'). CHtml::closeTag('form') .
CHtml::closeTag('td') . CHtml::closeTag('tr');
CHtml::closeTag('table'). CHtml::closeTag('form');

$currentfield = $rows['cfieldname'];
}
Expand All @@ -651,7 +648,6 @@ public function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
$aViewUrls['output'] = $this->getController()->renderPartial('/admin/conditions/no_condition',$aData, true);
}

$aViewUrls['output'] .= CHtml::closeTag('table');
//// To close the div opened in condition header.... see : https://goo.gl/BY7gUJ
$aViewUrls['afteroutput'] = '</div></div></div>';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<tr>
<?php echo $initialCheckbox; ?>
<td><?php echo $scenariotext; ?>&nbsp;
<?php echo $scenariotext; ?>&nbsp;
<?php echo CHtml::form(array("/admin/conditions/sa/index/subaction/updatescenario/surveyid/{$surveyid}/gid/{$gid}/qid/{$qid}/"), 'post', array('style'=>'display: none','id'=>'editscenario'.$scenarionr['scenario']));?>
<label><?php eT("New scenario number:"); ?>&nbsp;
<input type='text' name='newscenarionum' size='3'/></label>
Expand All @@ -12,14 +11,10 @@
<input type='submit' class="btn btn-default" name='scenarioupdated' value='<?php eT("Update scenario"); ?>' />
<input type='button' class="btn btn-default" name='cancel' value='<?php eT("Cancel"); ?>' onclick="$('#editscenario<?php echo $scenarionr['scenario']; ?>').hide('slow');" />
</form>
</td>
<td>
<?php echo CHtml::form(array("/admin/conditions/sa/index/subaction/deletescenario/surveyid/{$surveyid}/gid/{$gid}/qid/{$qid}/"), 'post', array('style'=>'margin-bottom:0;','id'=>'deletescenario'.$scenarionr['scenario'],'name'=>'deletescenario'.$scenarionr['scenario']));?>
<?php if(isset($additional_content)) echo $additional_content; ?>
<input type='hidden' name='scenario' value='<?php echo $scenarionr['scenario'];?>' />
<input type='hidden' name='qid' value='<?php echo $qid;?>' />
<input type='hidden' name='sid' value='<?php echo $surveyid;?>' />
<input type='hidden' name='subaction' value='deletescenario' />
</form>
</td>
</tr>
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<div class='col-sm-2'>
<select class='form-control' name='method' id='method'>
<?php foreach ($method as $methodCode => $methodTxt): ?>
<option value='<?php echo $methodCode; ?>' <?php if ($methodCode == "=="): echo ' select="selected" '; endif; ?>>
<option value='<?php echo $methodCode; ?>' <?php if ($methodCode == "=="): echo ' selected="selected" '; endif; ?>>
<?php echo $methodTxt; ?>
</option>
<?php endforeach; ?>
Expand Down Expand Up @@ -171,7 +171,7 @@ class='form-control'
<div class='col-sm-5'>
<textarea name='ConditionRegexp' class='form-control' id='ConditionRegexp' rows='5' cols='113'><?php echo $EDITConditionRegexp; ?></textarea>
<div id='ConditionRegexpLabel'>
<a href=\"http://manual.limesurvey.org/wiki/Using_regular_expressions\" target=\"_blank\">
<a href="http://manual.limesurvey.org/wiki/Using_regular_expressions" target="_blank">
<?php eT("Regular expression"); ?>
</a>
</div>
Expand Down

0 comments on commit 93dfde4

Please sign in to comment.