mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 12:41:30 +00:00
add showConfigGroup()
This commit is contained in:
parent
4eba2e3283
commit
0224793366
|
@ -225,6 +225,37 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
|
||||||
<?php
|
<?php
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
protected function showConfigGroup($title, $name, $allowempty=false, $multiple=false, $size=0) { /* {{{ */
|
||||||
|
$settings = $this->params['settings'];
|
||||||
|
$dms = $this->params['dms'];
|
||||||
|
?>
|
||||||
|
<tr title="<?= getMLText($title."_desc") ?>">
|
||||||
|
<td><?= getMLText($title) ?></td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$groups = $dms->getAllGroups();
|
||||||
|
if($groups) {
|
||||||
|
if(is_array($settings->{"_".$name}))
|
||||||
|
$selections = $settings->{"_".$name};
|
||||||
|
else
|
||||||
|
$selections = explode(',', $settings->{"_".$name});
|
||||||
|
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$name.($multiple ? "[]" : "")."\"".($multiple ? " multiple" : "").($size ? " size=\"".$size."\"" : "")." data-placeholder=\"".getMLText("select_group")."\" style=\"width: 100%;\">";
|
||||||
|
if($allowempty)
|
||||||
|
echo "<option value=\"\"></option>";
|
||||||
|
foreach($groups as $curgroup) {
|
||||||
|
echo "<option value=\"".$curgroup->getID()."\"";
|
||||||
|
if(in_array($curgroup->getID(), $selections))
|
||||||
|
echo " selected";
|
||||||
|
echo ">".htmlspecialchars($curgroup->getName())."</option>";
|
||||||
|
}
|
||||||
|
echo "</select>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
protected function showConfigFolder($title, $name, $allowempty=false, $multiple=false, $size=0) { /* {{{ */
|
protected function showConfigFolder($title, $name, $allowempty=false, $multiple=false, $size=0) { /* {{{ */
|
||||||
$settings = $this->params['settings'];
|
$settings = $this->params['settings'];
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user