审查视图

application/admin/view/goods/add.html 14.5 KB
王晓刚 authored
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
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('广告类型')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="typeList" item="vo"}
                <label class="type" for="row[type]-{$key}"><input class="type" id="row[type]-{$key}" name="row[type]" type="radio" value="{$key}" {in name="key" value="3"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_name" data-rule="required" class="form-control" name="row[goods_name]" type="text">
        </div>
    </div>
    <div class="form-group video" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Video')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-video" class="form-control" name="row[video]" type="text">-->
            <div class="input-group">
                <input id="c-video" class="form-control" size="50" name="row[video]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-video" class="btn btn-danger plupload" data-input-id="c-video" data-mimetype="mp4,avi,flv,wmv" data-multiple="true" data-preview-id="p-video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-video" class="btn btn-primary fachoose" data-input-id="c-video" data-mimetype="mp4,avi,flv,wmv" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-video"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-video"></ul>
            <!--<div class="input-group">
                <input id="c-video" class="form-control" size="50" name="row[video]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-video" class="btn btn-danger plupload" data-input-id="c-video" data-mimetype="mp4,avi,flv,wmv" data-multiple="false" data-preview-id="p-video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-video" class="btn btn-primary fachoose" data-input-id="c-video" data-mimetype="mp4,avi,flv,wmv" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-video"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-video"></ul>-->
        </div>
    </div>
    <div class="form-group voice" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Voice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-voice" class="form-control" name="row[voice]" type="text">-->
            <div class="input-group">
                <input id="c-voice" class="form-control" size="50" name="row[voice]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-voice" class="btn btn-danger plupload" data-input-id="c-voice" data-mimetype="mp3" data-multiple="true" data-preview-id="p-voice"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-voice" class="btn btn-primary fachoose" data-input-id="c-voice" data-mimetype="mp3" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-voice"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-voice"></ul>
        </div>
    </div>
    <div class="form-group content2">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
王晓刚 authored
66
    <div class="form-group">
王晓刚 authored
67 68 69 70 71
        <label class="control-label col-xs-12 col-sm-2">{:__('最短观看时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-view_time" class="form-control" name="row[view_time]" type="number" value="0">
        </div>
    </div>
王晓刚 authored
72 73 74 75 76 77
    <div class="form-group view_time">
        <label class="control-label col-xs-12 col-sm-2">{:__('重新答题时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-anew_time" class="form-control" name="row[anew_time]" type="number" value="0">
        </div>
    </div>
王晓刚 authored
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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('限制性别')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="sexList" item="vo"}
                <label for="row[sex]-{$key}"><input id="row[sex]-{$key}" name="row[sex]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Min_age')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-min_age" class="form-control" name="row[min_age]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Max_age')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-max_age" class="form-control" name="row[max_age]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-area" data-toggle="addresspicker" data-input-id="c-area" data-lat-id="c-latitude" data-lng-id="c-longitude" class="form-control" name="row[area]" type="text" readonly="true">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-province" data-rule="required" class="form-control" name="row[province]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-city" data-rule="required" class="form-control" name="row[city]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('County')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-county" data-rule="required" class="form-control" name="row[county]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text">
        </div>
    </div>-->
    <div class="form-group hidden" readonly="true">
        <label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-longitude" class="form-control" name="row[longitude]" type="text">
        </div>
    </div>
    <div class="form-group hidden" readonly="true">
        <label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-latitude" class="form-control" name="row[latitude]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Distance')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-distance" class="form-control" name="row[distance]" type="number" value="0">
            <p class="text-warning">0为不限</p>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[start_time]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[end_time]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-url" class="form-control" name="row[url]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Exp')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-exp" class="form-control" name="row[exp]" type="number">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('View')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-view" class="form-control" name="row[view]" type="number" value="0">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('上架状态')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="userIsUpList" item="vo"}
                <label for="row[user_is_up]-{$key}"><input id="row[user_is_up]-{$key}" name="row[user_is_up]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <!--<a href="" title="添加"  class="dialogit">添加</a>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('题')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<a href="" title="添加" class="dialogit btn btn-success btn-embossed">添加</a>-->
            <!--<div id="toolbar" class="toolbar">
                <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('question/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
             </div>
            <table id="table" class="table table-striped table-bordered table-hover table-nowrap">

            </table>-->
            <dl class="fieldlist" data-template="questiontpl" data-name="row[question]">
                <dd>
                    <ins>{:__('问题类型')}</ins>
                    <ins>{:__('问题')}</ins>
                    <ins>{:__('正确答案')}</ins>
                    <ins>{:__('选项')}<span class="text-warning">多个选项使用英文格式逗号隔开</span></ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素,实际开发中textarea应该添加个hidden进行隐藏-->
王晓刚 authored
227
                <textarea name="row[question]" class="form-control hidden" cols="30" rows="5">[{"question_type":"","question_name":"","question_answer":"","option":""}]</textarea>
王晓刚 authored
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
            </dl>
            <script id="questiontpl" type="text/html">
                <dd class="form-inline">
                    <ins>
                        <select class="form-control" name="<%=name%>[<%=index%>][question_type]" style="width: 100%">
                            <option value="">请选择</option>
                            <option value="2">选择题</option>
                            <option value="1">填空题</option>
                        </select>
                    </ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][question_name]" class="form-control" value="" placeholder="问题"/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][question_answer]" class="form-control" value="" placeholder="正确答案"/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][option]" class="form-control" value="" placeholder="选项"/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <!--<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>