Skip to content

Commit

Permalink
update smarty group block function to allow for bs4; update customcon…
Browse files Browse the repository at this point in the history
…trol to allow passing any text without encapsulating it
  • Loading branch information
dleffler committed Dec 19, 2017
1 parent b198e95 commit f9250cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions framework/core/forms/controls/customcontrol.php
Expand Up @@ -35,6 +35,10 @@ function __construct($html = "") {
$this->html = $html;
}

function toHTML($label,$name) {
return $this->controlToHTML($name, $label);
}

function controlToHTML($name,$label) {
return $this->html;
}
Expand Down
2 changes: 1 addition & 1 deletion framework/plugins/block.group.php
Expand Up @@ -49,7 +49,7 @@ function smarty_block_group($params,$content,&$smarty, &$repeat) {
if (bs3()) {
echo "<div class=\"control\"><p class=\"help-block\">", $params['description'], "</p></div>";
} elseif (bs4()) {
echo "<div class=\"control\"><p class=\"form-text\">",$params['description'],"</p></div>";
echo "<div class=\"control\"><small class=\"form-text text-muted\">",$params['description'],"</small></div>";
} else {
echo "<div class=\"control\"><div class=\"control-desc\">",$params['description'],"</div></div>";
}
Expand Down

0 comments on commit f9250cf

Please sign in to comment.