Edit.html 5.4 KB
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>

<div class="data.contentDatapanel">
    
    <form id="add-form" class="form-horizontal form-bordered" type="<%type%>" action="<%action%>">
        <div class="panel-group">
            <div class="panel-group" id="editor-group">
                <% if data %>
                <input type="hidden" id="id" value="<%data.id%>">
                <%/if%>
                <div class="pannel">
                    <div class="panel-heading">
                        <h4>添加控制器</h4>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">控制器名称:</label>
                                <div class="col-sm-3">
                                    <input type="text"  id="title" class="form-control" required value="<% if data%><% data.title %><%/if%>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">控制器链接地址:</label>
                                <div class="col-sm-3">
                                    <input type="text"  id="url" class="form-control" required value="<% if data%><% data.url %><%/if%>">
                                </div>
                                <span class="help-inline red">注:请填写带HTTP头的完整的URL地址</span>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">控制平台元值:</label>
                                <div class="col-sm-3">
                                    <input type="text"  id="metaKey" class="form-control" required value="<% if data%><% data.metaKey %><%/if%>">
                                </div>
                                <span class="help-inline red">注:平台元值为唯一值,请确认好再填写</span>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">价格:</label>
                                <div class="col-sm-3">
                                    <input type="text"  id="price" class="form-control" value="<% if data%><% data.price %><%/if%>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">平台类别选择</label>
                                <div class="col-sm-10">
                                    <label style="cursor: pointer;"><input type="checkbox" name="platform" value="iphone">IOS手机</label>
                                    <label style="cursor: pointer;"><input type="checkbox" name="platform" value="ipad">IOS Pad</label>
                                    <label style="cursor: pointer;"><input type="checkbox" name="platform" value="android">安卓手机</label>
                                    <label style="cursor: pointer;"><input type="checkbox" name="platform" value="androidpad">安卓Pad</label>
                                    <label style="cursor: pointer;"><input type="checkbox" name="platform" value="h5">手机网站</label>
                                    <label style="cursor: pointer;"><input type="checkbox" name="platform" value="web">网站</label>
                                    <label style="cursor: pointer;"><input type="checkbox" name="platform" value="platform">平台</label>
                                </div>
                                <input type="hidden" id="platform" value="<%if data%><% data.platform %><%/if%>" for="checkbox">
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="position">开启或关闭</label>
                                <div class="col-sm-3">
                                    <select id="status" name="status" tabindex="-1" class="select2-offscreen" style="width: 100px;">
                                        <option value="0" <%if data && data.status == 0%>selected<%/if%>>关闭</option>
                                        <option value="1" <%if data && data.status == 1%>selected<%/if%>>开启</option>
                                    </select>
                                </div>
                            </div>
                            <%if data%>
                            <div class="form-group">
                                <label class="col-sm-4 control-label">创建时间 :<% data.createTimeStr %> &nbsp;&nbsp;&nbsp;更改时间 :<% data.updateTimeStr %></label>
                            </div>
                            <%/if%>
                        </div>
                    </div>
                </div>

            </div>
            <div class="pannel">
            <div class="col-md-10"></div>
            <div class="col-md-2">
                <input id="add-btn" class="btn btn-success add-btn" type="button" value="保存"></input>
                <a href="/operations/gate/index" class="btn btn-default">取消</a>
            </div>
            </div>
        </div>
    </form>
</div>