Skip to content

Commit

Permalink
Dev: admin GUI Section 508 fixes (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
billdacat authored and Shnoulle committed Jul 7, 2017
1 parent 5cc2f0b commit 936bf62
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 20 deletions.
Expand Up @@ -6,7 +6,7 @@

<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"><?php echo $aAction['sModalTitle']; ?></h4>
<div class="modal-title h4"><?php echo $aAction['sModalTitle']; ?></div>
</div>

<div class="modal-body">
Expand Down
Expand Up @@ -4,7 +4,7 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"><?php eT('Error') ?></h4>
<div class="modal-title h4"><?php eT('Error') ?></div>
</div>
<div class="modal-body">
<?php eT('Please select at least one item');?>
Expand Down
Expand Up @@ -5,7 +5,7 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"><?php echo $aAction['sModalTitle']; ?></h4>
<div class="modal-title h4"><?php echo $aAction['sModalTitle']; ?></div>
</div>
<div class="modal-body">
<div class='modal-body-text'><?php echo $aAction['htmlModalBody']; ?></div>
Expand Down
11 changes: 9 additions & 2 deletions application/helpers/expressions/em_core_helper.php
Expand Up @@ -2465,10 +2465,17 @@ private function RDP_Tokenize($sSource,$bOnEdit=false)
static function ShowAllowableFunctions()
{
$em = new ExpressionManager();
$output = "<h3>Functions Available within Expression Manager</h3>\n";
$output = "<div class='h3'>Functions Available within Expression Manager</div>\n";
$output .= "<table border='1'><tr><th>Function</th><th>Meaning</th><th>Syntax</th><th>Reference</th></tr>\n";
foreach ($em->RDP_ValidFunctions as $name => $func) {
$output .= "<tr><td>" . $name . "</td><td>" . $func[2] . "</td><td>" . $func[3] . "</td><td><a href='" . $func[4] . "'>" . $func[4] . "</a>&nbsp;</td></tr>\n";
$output .= "<tr><td>" . $name . "</td><td>" . $func[2] . "</td><td>" . $func[3] . "</td><td>";

// 508 fix, don't output empty anchor tags
if ($func[4]) {
$output .= "<a href='" . $func[4] . "'>" . $func[4] . "</a>";
}

$output .= "&nbsp;</td></tr>\n";
}
$output .= "</table>\n";
return $output;
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/expressions/em_manager_helper.php
Expand Up @@ -8221,7 +8221,7 @@ function checkconditions(value, name, type, evt_type)
print LimeExpressionManager::GetRelevanceAndTailoringJavaScript();

// Print Table of questions
print "<h3>This is a test of dynamic relevance.</h3>";
print "<div class='h3'>This is a test of dynamic relevance.</div>";
print "Enter your name and age, and try all the permutations of answers to whether you have or want children.<br />\n";
print "Note how the text and sum of ages changes dynamically; that prior answers are remembered; and that irrelevant values are not included in the sum of ages.<br />";
print "<table class='table' border='1'><tr><td>";
Expand Down
8 changes: 4 additions & 4 deletions application/models/Survey.php
Expand Up @@ -883,7 +883,7 @@ public function getRunning()

// If the survey is not active, no date test is needed
if($this->active == 'N') {
$running = '<a href="'.App()->createUrl('/admin/survey/sa/view/surveyid/'.$this->sid).'" class="survey-state" data-toggle="tooltip" title="'.gT('Inactive').'"><span class="fa fa-stop text-warning"></span></a>';
$running = '<a href="'.App()->createUrl('/admin/survey/sa/view/surveyid/'.$this->sid).'" class="survey-state" data-toggle="tooltip" title="'.gT('Inactive').'"><span class="fa fa-stop text-warning"></span><span class="sr-only">'.gT('Inactive').'"</span</a>';
}
// If it's active, then we check if not expired
elseif ($this->expires != '' || $this->startdate != '') {
Expand Down Expand Up @@ -918,7 +918,7 @@ public function getRunning()
}
// If it's active, and doesn't have expire date, it's running
else {
$running = '<a href="'.App()->createUrl('/admin/survey/sa/view/surveyid/'.$this->sid).'" class="survey-state" data-toggle="tooltip" title="'.gT('Active').'"><span class="fa fa-play text-success"></span></a>';
$running = '<a href="'.App()->createUrl('/admin/survey/sa/view/surveyid/'.$this->sid).'" class="survey-state" data-toggle="tooltip" title="'.gT('Active').'"><span class="fa fa-play text-success"></span><span class="sr-only">'.gT('Active').'"</span></a>';
//$running = '<div class="survey-state"><span class="fa fa-play text-success"></span></div>';
}

Expand Down Expand Up @@ -1043,11 +1043,11 @@ public function getbuttons()
$button = '';

if (Permission::model()->hasSurveyPermission($this->sid, 'survey', 'update')) {
$button .= '<a class="btn btn-default" href="'.$sEditUrl.'" role="button" data-toggle="tooltip" title="'.gT('General settings & texts').'"><span class="fa fa-cog" ></span></a>';
$button .= '<a class="btn btn-default" href="'.$sEditUrl.'" role="button" data-toggle="tooltip" title="'.gT('General settings & texts').'"><span class="fa fa-cog" ></span><span class="sr-only">'.gT('General settings & texts').'</span></a>';
}

if(Permission::model()->hasSurveyPermission($this->sid, 'statistics', 'read') && $this->active=='Y' ) {
$button .= '<a class="btn btn-default" href="'.$sStatUrl.'" role="button" data-toggle="tooltip" title="'.gT('Statistics').'"><span class="fa fa-stats text-success" ></span></a>';
$button .= '<a class="btn btn-default" href="'.$sStatUrl.'" role="button" data-toggle="tooltip" title="'.gT('Statistics').'"><span class="fa fa-stats text-success" ></span><span class="sr-only">'.gT('Statistics').'</span></a>';
}

if (Permission::model()->hasSurveyPermission($this->sid, 'survey', 'create')) {
Expand Down
Expand Up @@ -45,7 +45,7 @@
<div class="menubar surveymanagerbar">
<div class="row container-fluid">
<div class="col-xs-12 col-md-12">
<h3 ><?php eT("Central participant database")?></h3>
<div class="h2"><?php eT("Central participant database")?></div>
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions application/views/admin/pluginmanager/index.php
Expand Up @@ -132,6 +132,10 @@
));
?>
</div>
<!-- 508 -->
<a name="activate"></a>
<a name="deactivate"></a>

<input id="ls_action_changestate_type" type="hidden" name="type" value="" />
<input id="ls_action_changestate_id" type="hidden" name="id" value="" />
<?php echo CHtml::endForm(); ?>
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/templates/templateeditorbar_view.php
Expand Up @@ -245,7 +245,7 @@ function copyprompt(text, defvalue, copydirectory, action)
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"><?php eT("Upload template file") ?></h4>
<div class="modal-title h4"><?php eT("Upload template file") ?></div>
</div>
<?php echo CHtml::form(array('admin/templates/sa/upload'), 'post', array('id'=>'importtemplate', 'name'=>'importtemplate', 'enctype'=>'multipart/form-data', 'onsubmit'=>'return validatefilename(this,"'.gT('Please select a file to import!', 'js').'");')); ?>
<div class="modal-body">
Expand All @@ -272,7 +272,7 @@ function copyprompt(text, defvalue, copydirectory, action)
<?php endif;?>

<div class="col-lg-12 templateeditor">
<h3><?php eT("Template editor:"); ?> <i><?php echo $templatename; ?></i></h3>
<div class="h3"><?php eT("Template editor:"); ?> <i><?php echo $templatename; ?></i></div>


<?php if(!is_template_editable($templatename)):?>
Expand Down
10 changes: 5 additions & 5 deletions application/views/admin/templates/templatesummary_view.php
Expand Up @@ -8,7 +8,7 @@
<div class="col-lg-12">

<?php App()->getClientScript()->registerPackage('jquery-ace'); ?>
<h4><?php echo sprintf(gT("Viewing file '%s'"),$editfile); ?></h4>
<div class="h4"><?php echo sprintf(gT("Viewing file '%s'"),$editfile); ?></div>

<?php if (!is_writable($templates[$templatename])):?>
<div class="alert alert-warning alert-dismissible" role="alert">
Expand Down Expand Up @@ -212,7 +212,7 @@ class = "<?php if($file == $relativePathEditfile ){echo 'text-danger';}else{echo
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel"><?php eT('Tip: How to display a picture in your template?'); ?></h4>
<div class="modal-title h4" id="myModalLabel"><?php eT('Tip: How to display a picture in your template?'); ?></div>
</div>
<div class="modal-body">
<?php eT('To use a picture in a .pstpl file:');?><br/>
Expand Down Expand Up @@ -240,9 +240,9 @@ class = "<?php if($file == $relativePathEditfile ){echo 'text-danger';}else{echo

<div class="row template-sum" style="margin-bottom: 100px;">
<div class="col-lg-12">
<h4>
<div class="h4">
<?php eT("Preview:"); ?>
</h4>
</div>
<div class="jumbotron message-box">
<input type='button' value='<?php eT("Mobile"); ?>' id='iphone' class="btn btn-default"/>
<input type='button' value='640x480' id='x640' class="btn btn-default" />
Expand All @@ -262,7 +262,7 @@ class = "<?php if($file == $relativePathEditfile ){echo 'text-danger';}else{echo
else
{ ?>
<p>
<iframe id='previewiframe' src='<?php echo $this->createUrl('admin/templates/sa/tmp/',array('id'=>$time)); ?>' height='768' name='previewiframe' style='width:95%;background-color: white;'>Embedded Frame</iframe>
<iframe id='previewiframe' title='Preview' src='<?php echo $this->createUrl('admin/templates/sa/tmp/',array('id'=>$time)); ?>' height='768' name='previewiframe' style='width:95%;background-color: white;'>Embedded Frame</iframe>
</p>
</div>
<?php
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/usergroup/usergroups_view.php
Expand Up @@ -89,13 +89,13 @@
</div>
</div>

<h4><?php
<div class="h4"><?php
if (!Permission::model()->hasGlobalPermission('superadmin','read'))
{
eT('Groups to which I belong');
}
?>
</h4>
</div>

<div class="row">
<div class="col-lg-12 content-right">
Expand Down

0 comments on commit 936bf62

Please sign in to comment.