Example #1
0
File: List.php Project: hung5s/yap
echo $module . " Parameters";
?>
</h3>

<?php 
$output = FHtml::beginForm('', 'post', array('id' => 'frmModule'));
$output .= "<span>Select module to see setting param</span> ";
$output .= "<select name='module' id='lsModules'>";
foreach ($modules as $m) {
    if (empty($m['Module'])) {
        $m['Module'] = 'System';
    }
    $output .= "<option value='" . $m['Module'] . "' " . ($m['Module'] == $module ? "selected='selected'" : "") . ">" . $m['Module'] . "</option>";
}
$output .= "</select>";
$output .= FHtml::endForm();
echo $output;
if (count($params)) {
    $groups = array_keys($params);
    $i = 0;
    foreach ($groups as $group) {
        ?>
        <h2 class="title"><?php 
        echo $group;
        ?>
</h2>
        <table id="itemList_<?php 
        echo $i;
        ?>
" cellpadding="0" cellspacing="0" width="100%" class="view">
            <thead>
Example #2
0
        <label class="LongFieldname" for="param_<?php 
        echo $param->Name;
        ?>
"><?php 
        echo $param->Label;
        ?>
</label>
        <?php 
        echo $param->Html;
        ?>
    </div>
<?php 
    }
    //Last closing form
    echo "<div class=\"Action\" style=\"margin-left:250px\">" . FHtml::submitButton('Save') . "</div>";
    echo FHtml::endForm();
    echo "</div>";
    $cs = Yii::app()->ClientScript;
    $cs->registerScriptFile(Yii::app()->theme->BaseUrl . '/scripts/common.js', CClientScript::POS_BEGIN);
}
//If count ($params)
?>

<script>
function showSettingGroup(id){
    $('.SettingGroup').hide();
    $('#'+id).show();
}
$("#lsGroups").change(function(){
    showSettingGroup($("#lsGroups").val());
});
Example #3
0
File: List.php Project: hung5s/yap
<h3>Pages under permission control</h3>

<?php 
if (count($pages)) {
    ?>
    <ul>
    <?php 
    foreach ($pages as $name => $page) {
        ?>
        <li style="padding-left:<?php 
        echo $page['level'] . 'em';
        ?>
;">
            <?php 
        echo FHtml::link($page['description'] . ' (' . $name . ')', $this->createUrl('/Core/permission/editPage', array('name' => $name)));
        ?>
        </li>
    <?php 
    }
    ?>
    </ul>
<?php 
} else {
}