1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Custom label option for progressbar(). Extra example code in _blank.php

This commit is contained in:
Cameron
2017-11-12 10:38:02 -08:00
parent ff06f83331
commit a3674a7bf0
2 changed files with 16 additions and 4 deletions

View File

@@ -1907,11 +1907,14 @@ class e_form
$label = $percVal;
}
if(!empty($options['label']))
{
$label = $options['label'];
}
$text = "<div class='progress ".$class."{$striped}' >
<div id='".$target."' class='progress-bar bar' role='progressbar' aria-valuenow='".intval($value)."' aria-valuemin='0' aria-valuemax='100' style='min-width: 2em;width: ".$percVal."'>";
<div id='".$target."' class='progress-bar bar ".$class."' role='progressbar' aria-valuenow='".intval($value)."' aria-valuemin='0' aria-valuemax='100' style='min-width: 2em;width: ".$percVal."'>";
$text .= $label;
$text .= "</div>
</div>";

View File

@@ -37,20 +37,29 @@ class _blank_front
$frm = e107::getForm(); // Form element class.
$ns = e107::getRender(); // render in theme box.
$text = '';
// $sc = e107::getScBatch('_blank',true, '_blank');
// $template = e107::getTemplate('_blank','_blank','default');
$text = '';
// $text = $tp->parseTemplate($template['start'],true, $sc);
if($rows = $sql->retrieve('blank','*',false,'',true)) // combined select and fetch function - returns an array.
{
// print_a($rows);
foreach($rows as $key=>$value) // loop throug
{
// $sc->setVars($value); // if shortcodes are enabled.
// $text .= $tp->parseTemplate($template['item'],true, $sc);
$text .= $tp->toHtml($value['blank_type'])."<br />";
}
// $text .= $tp->parseTemplate($template['end'],true, $sc);
$ns->tablerender("My Caption", $text);
}