add_singer_view.php 3.49 KB
Newer Older
1 2 3
<div class="row">
    <div class="widget-box">
        <div class="widget-header">
4
            <p class="widget-title">Cập nhật thông tin Ca sĩ</p>
5 6 7 8
        </div>
        <div class="widget-body">
            <div class="widget-main">
                <?php
9
                $url = (isset($call_back) && $call_back) ? 'backend/cmsTrack/addSinger/'.$track[0]['id'].'/'.$call_back : 'backend/cmsTrack/addSinger/'.$track[0]['id'];
10
                $attributes = array('class' => 'form-horizontal', 'id' => 'myform');
11
                echo form_open_multipart(base_url($url), $attributes);
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
                ?>
                <div class="form-group">
                    <label class="col-lg-3"></label>
                    <div class="col-lg-3">
                        <input type="hidden" name="id" value="<?php echo $track[0]['id']; ?>" />
                        <?php
                        if(validation_errors()){echo form_error('id', '<div class="error">', '</div>');}
                        ?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3">Tên bài hát (*)</label>
                    <div class="col-lg-3">
                        <p><?php echo $track[0]['title']; ?></p>
                    </div>
                </div>
                <div class="form-group">
29
                    <label class="col-lg-3">Chọn Ca sĩ</label>
30
                    <div class="col-lg-3">
31 32
                        <select id='form-field-select-3' name="singer" style='width: 200px;'
                            class="chosen-select form-control" data-placeholder="Choose a State...">
33
                            <option value="0">- Chọn -</option>
34 35
                            <?php foreach ($list_user as $singers): ?>
                            <option value="<?php echo $singers['id']; ?>"
36
                                <?php if($singer && $singer == $singers['id']){ echo 'selected="selected"'; } else  echo ''; ?>>
37
                                <?php echo $singers['full_name']; ?>
38 39 40
                            </option>
                            <?php endforeach; ?>
                        </select>
41
                        <?php if(validation_errors()){echo form_error('singer', '<div class="error">', '</div>');} ?>
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-3">
                        <a href="<?php echo base_url('backend/cmsTrack/showTrack/'.$track[0]['id']);?>"
                            onclick="return confirm('Bạn có chắc chắn muốn quay lại trang chi tiết không?')">
                            <button type="button" class="btn btn-sm btn-default">
                                <i class="ace-icon fa fa-arrow-left"></i>Quay lại
                            </button>
                        </a>
                    </div>
                    <div class="col-lg-4">
                        <button class="btn btn-sm btn-primary" type="submit" name="btnSave">
                            <i class="ace-icon fa fa-check bigger-110"></i>Lưu lại
                        </button>
                    </div>
                </div>
                <?php echo form_close(); ?>
            </div>
62 63
        </div>
    </div>
64
</div><!-- /.row -->
65 66 67 68 69 70 71 72
<script>
    $(document).ready(function () {
        $('.chosen-select').chosen({
            allow_single_deselect: true,
            no_results_text: "Không có kết quả cần tìm"
        });
    });
</script>