123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- {extend name="common/common2" /}
- {block name="main"}
- <style>
- .el-select .el-input.is-focus .el-input__inner {
- border-color: #18a689;
- }
- .el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
- color: #18a689;
- background-color: #fff;
- }
- .el-select-dropdown__item.selected {
- color: #18a689;
- font-weight: 700;
- }
- .el-select .el-input .el-select__caret {
- font-weight: bold;
- color: #555;
- }
- .el-input__inner {
- border-radius: 0px;
- }
- </style>
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <!--<div class="ibox-title">-->
- <!--<h5>{$title}</h5>-->
- <!--<div class="ibox-tools">-->
- <!--<a class="toback" href="{:url('index')}">-->
- <!--返回上一页-->
- <!--</a>-->
- <!--</div>-->
- <!--</div>-->
- <div class="ibox-content">
- <form method="post" action="{:url('add')}" class="form-horizontal">
- <div class="form-group">
- <label class="col-sm-2 control-label">接收群组</label>
- <div class="col-sm-6">
- <label class="cr-inline">
- <input type="radio" onclick="setGroup(1)" value="1" checked name="group">全体(请谨慎选择此项)
- </label>
- <label class="cr-inline">
- <input type="radio" onclick="setGroup(2)" value="2" name="group">指定某人
- </label>
- <label class="cr-inline">
- <input type="radio" onclick="setGroup(3)" value="3" name="group">指定角色
- </label>
- </div>
- </div>
- <div class="form-group" style="display: none;" id="user">
- <label class="col-sm-2 control-label">指定某人</label>
- <div class="col-sm-6">
- {:widget_view('common/multiselect',['name'=>'users','lists' =>$userAll, 'val' => []])}
- </div>
- </div>
- <div class="form-group" style="display: none;" id="role">
- <label class="col-sm-2 control-label">指定角色</label>
- <div class="col-sm-6">
- {:widget_view('common/multiselect',['name'=>'roles','lists' =>$rolesAll, 'val' =>[]])}
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">通知类型<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <select name="cate_id" class="form-control">
- {volist name="$cate" id="v"}
- <option value="{$v.id}">{$v.name}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">标题<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="text" class="form-control" required name="title">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">内容<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <textarea name="content" class="form-control" cols="30" rows="3" id="value"></textarea>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-6 col-sm-offset-2">
- <button class="btn btn-primary ajax-post" data-layer_c="1" target-form="form-horizontal" type="submit">确 定</button>
- <!--<a href="{:url('index')}" class="btn btn-default">取 消</a>-->
- <button class="btn cancel-btn btn-default" type="button">取 消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script>
- function setGroup(val) {
- if(val==1){
- $('#user').attr('style','display:none');
- $('#role').attr('style','display:none');
- }
- if(val==2){
- $('#user').attr('style','display:block');
- $('#role').attr('style','display:none');
- $("input[name=roles]").val('');
- }
- if(val==3){
- $('#user').attr('style','display:none');
- $('#role').attr('style','display:block');
- $("input[name=users]").val('');
- }
- }
- $(document).ready(function(){
- formSetValue("enable", {$info.enable|default=1});
- });
- </script>
- {/block}
|