roomedit.php
6.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
use yii\web\View;
use yii\helpers\Html;
use backend\widgets\YHGImage\Common\Images as CommonImages;
$this->title = $this->params['main_title'].'-'.$this->params['sub_title'];
?>
<?php
$this->registerCssFile('/css/select2.css',array('postion'=>View::POS_END));
$this->registerJsFile('/js/My97DatePicker/WdatePicker.js',array('postion'=>View::POS_END));
$this->registerJsFile('/js/select2.min.js',array('postion'=>View::POS_END));
?>
<script type="text/javascript">
<?php $this->beginBlock('javascript');?>
jQuery(document).ready(function() {
// Select2
jQuery(".select-basic").select2();
});
<?php
$this->endBlock();
$this->registerJs($this->blocks['javascript'],View::POS_END)
?>
</script>
<div class="col-md-6">
<form id="form" method="POST" action="">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-3 control-label">房间号: </label>
<div class="col-sm-9">
<?=$model->room_id ? : '保存后生成'?>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">直播标题: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<input type="text" name="title" class="form-control" required="required" value="<?=$model->title?>">(建议不超过18个汉字)
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">水印文案: </label>
<div class="col-sm-5">
<input type="text" name="watermark" class="form-control" value="<?=$model->watermark?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">所属应用: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<?php echo Html::dropDownList('app', $model->app,Yii::$app->params['config']['app'], ['class' => 'width300 select-basic']);?>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">主播: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<?php echo Html::dropDownList('master_id', $model->master_id,$masters, ['class' => 'width300 select-basic', 'required'=>"required"]);?>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">预告开始时间: </label>
<div class="col-sm-5">
<input type="text" name="starting_time" class="form-control" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d %H:%m:%s'})" value="<?=$model->starting_time ? date('Y-m-d H:i:s',$model->starting_time) : ''?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">房间密钥: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<input type="text" name="secret" class="form-control" required="required" value="<?=$model->secret?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否精选: </label>
<div class="col-sm-2">
<?php echo Html::dropDownList('best', $model->best,Yii::$app->params['config']['best'], ['class' => 'form-control']);?>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">马甲状态: </label>
<div class="col-sm-2">
<?php echo Html::dropDownList('vest', $model->vest,Yii::$app->params['config']['vest'], ['class' => 'form-control']);?>
</div>
</div>
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label">直播状态: </label>
<div class="col-sm-2">
<?php echo Html::dropDownList('living', $model->living,Yii::$app->params['config']['room_living'], ['class' => 'form-control']);?>
</div>
</div>
<div class="form-group" id="uploader">
<label class="col-sm-3 control-label">头图: <span class="asterisk">*</span></label>
<div class="col-sm-9">
<?=$uploader?>
<?php if ($model->pic):?>
<div class="file-item thumbnail upload-state-done"><img src="<?=CommonImages::getImageUrl($model->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="<?=$_refer?>" class="btn btn-dark">取消</a>
</div>
</div>
</div><!-- panel-footer -->
</div><!-- panel -->
</form>
</div>