patashala/application/views/backend/admin/student_bulk_sections.php
Vivek a53135a78d Added based code
Added base code to the repo
2024-02-07 20:19:28 +05:30

38 lines
1.0 KiB
PHP
Executable File

<?php
$query = $this->db->get_where('section' , array('class_id' => $class_id));
if($query->num_rows() > 0):
$sections = $query->result_array();
?>
<div class="col-md-3">
<div class="form_group">
<label class="control-label" style="margin-bottom: 5px;"><?php echo get_phrase('section');?></label>
<select name="section_id" id="section_id" class="form-control selectboxit">
<?php foreach($sections as $row):?>
<option value="<?php echo $row['section_id'];?>"><?php echo $row['name'];?></option>
<?php endforeach;?>
</select>
</div>
</div>
<?php endif;?>
<script type="text/javascript">
$(document).ready(function() {
if($.isFunction($.fn.selectBoxIt))
{
$("select.selectboxit").each(function(i, el)
{
var $this = $(el),
opts = {
showFirstOption: attrDefault($this, 'first-option', true),
'native': attrDefault($this, 'native', false),
defaultText: attrDefault($this, 'text', ''),
};
$this.addClass('visible');
$this.selectBoxIt(opts);
});
}
});
</script>