add_master.php 2.39 KB
<?php
use backend\widgets\YHGImage\Common\Images as CommonImages;

$this->title = $this->params['main_title'].'-'.$this->params['sub_title'];
?>

<div class="col-md-6">
    <form id="form" method="POST" action="<?php echo $action?>">
        <div class="panel panel-default">
            <input type="hidden" name="opt" value="">
            <input type="hidden" name="master_id" value="<?php echo $row->master_id?>">
            <div class="panel-body">
                <div class="row">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">主播名称:<span class="asterisk">*</span></label>
                        <div class="col-sm-9">
                            <input type="text" name="name" class="form-control" required="required" value="<?php echo $row->name?>">(建议不超过4个汉字)
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">主播标签:<span class="asterisk">*</span></label>
                        <div class="col-sm-9">
                            <input type="text" name="meta" class="form-control" required="required" value="<?php echo $row->meta?>">(建议不超过4个汉字)
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">主播头像:<span class="asterisk">*</span></label>
                        <div class="col-sm-9">
                            <?=$uploader?>
                            <?php if ($row->pic):?>
                            <div class="file-item thumbnail upload-state-done"><img src="<?=CommonImages::getImageUrl($row->pic, 110, 110)?>"><div class="info">当前图片</div></div>
                            <?php endif;?>
                        </div>
                    </div>
                </div><!-- row -->
            </div><!-- panel-body -->
            <div class="panel-footer">
                <div class="row">
                    <div class="col-sm-9 col-sm-offset-3">
                        <button class="btn btn-primary mr5" id="upload_button">保存</button>
                        <a href="/live/master" class="btn btn-dark">取消</a>
                    </div>
                </div>
            </div><!-- panel-footer -->
        </div><!-- panel -->
    </form>

</div>