예제 #1
0
 public function overwriteForm($return, $returnfull)
 {
     for ($x = 1; $x <= Schoolsetting::getTingkatanMax(); $x++) {
         $arr[$x] = $x;
     }
     $return['kelas_tingkatan'] = new Leap\View\InputSelect($arr, "kelas_tingkatan", "kelas_tingkatan", $this->kelas_tingkatan);
     $return['kelas_foto'] = new Leap\View\InputText("hidden", "kelas_foto", "kelas_foto", $this->kelas_foto);
     $return['kelas_aktiv'] = new Leap\View\InputSelect(array('0' => 0, '1' => 1), "kelas_aktiv", "kelas_aktiv", $this->kelas_aktiv);
     return $return;
 }
예제 #2
0
    public static function levelSelector($levelActual, $urlOnChange)
    {
        $t = time();
        ?>
        <select id="selectlevel_<?php 
        echo $t;
        ?>
" class="form-control">
            <?php 
        for ($x = 1; $x <= Schoolsetting::getTingkatanMax(); $x++) {
            if ($levelActual == $x) {
                $selected = "selected";
            } else {
                $selected = "";
            }
            ?>
                <option value="<?php 
            echo $x;
            ?>
" <?php 
            echo $selected;
            ?>
><?php 
            echo $x;
            ?>
</option>
            <?php 
        }
        ?>
        </select>
        <script type="text/javascript">
            $("#selectlevel_<?php 
        echo $t;
        ?>
").change(function () {
                var slc = $("#selectlevel_<?php 
        echo $t;
        ?>
").val();
                openLw(window.selected_page, "<?php 
        echo $urlOnChange;
        ?>
&klslevel=" + slc, "fade");
            });
        </script>
    <?php 
    }