add.html 12.1 KB
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[source]" value="{$source|htmlentities}"/>
    <div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('名称')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" placeholder="仅支持字母、数字、下划线">
        </div>
    </div>
    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('标题')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label for="c-type" class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
        <div class="col-xs-12 col-sm-4">
            <select name="row[type]" id="c-type" class="form-control selectpicker">
                {volist name="typeList" id="type"}
                <option value="{$key|htmlentities}">{$type|htmlentities}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group hidden tf tf-images tf-files">
        <label for="c-selectpage-table" class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-10">
            <div class="alert alert-danger-light" style="margin-bottom:0;">
                温馨提示:<br>
                1、建议将字段长度调整为1500或更高,否则可能出现图片过多时被截取的问题
            </div>
        </div>
    </div>
    <div class="form-group hidden tf tf-editor">
        <label for="c-selectpage-table" class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-10">
            <div class="alert alert-danger-light" style="margin-bottom:0;">
                温馨提示:<br>
                1、请确保你已经正常安装富文本编辑器插件
            </div>
        </div>
    </div>
    <div class="form-group hidden tf tf-selectpage tf-selectpages">
        <label for="c-selectpage-table" class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-10">
            <div class="alert alert-danger-light" style="margin-bottom:0;">
                温馨提示:<br>
                1、如果关联表有重要(隐私)数据,强烈不建议设定为关联表,以免造成信息泄漏<br>
                2、如果关联表仅展示用户相关数据,请在筛选条件中 <code>user_id:{user_id}</code><br>
                3、如果关联表存在<code>pid</code>字段,则可以在扩展信息中填写 <code>data-params='{"isTree":true}'</code>用于展示树状列表
            </div>
        </div>
    </div>
    <div class="form-group hidden tf tf-array">
        <label for="c-selectpage-table" class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-10">
            <div class="alert alert-danger-light" style="margin-bottom:0;">
                温馨提示:<br>
                1、如果需要自定义数组展示标题,你可以输入键名标题和键值标题<br>
                2、类型为数组时,验证规则只有 <code>必选</code>生效,其它规则均无效
            </div>
        </div>
    </div>
    <div class="form-group hidden tf tf-custom">
        <label for="c-selectpage-table" class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-10">
            <div class="alert alert-danger-light" style="margin-bottom:0;">
                温馨提示:<br>
                1、如需要自定义展示数据,可以在扩展信息中输入你的HTML代码<br>
                2、类型为自定义时,验证规则均无效
            </div>
        </div>
    </div>
    <div class="form-group hidden tf tf-number">
        <label for="c-decimals" class="control-label col-xs-12 col-sm-2">{:__('小数点长度')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-decimals" class="form-control" name="row[decimals]" type="number" value="0">
        </div>
    </div>
    <div class="form-group hidden tf tf-checkbox">
        <label for="c-minimum" class="control-label col-xs-12 col-sm-2">{:__('最少选择')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-minimum" class="form-control" name="row[minimum]" type="number">
        </div>
    </div>
    <div class="form-group hidden tf tf-selects tf-images tf-files tf-checkbox">
        <label for="c-maximum" class="control-label col-xs-12 col-sm-2">{:__('最大选择')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-maximum" class="form-control" name="row[maximum]" type="number">
        </div>
    </div>
    <div class="form-group hidden tf tf-selectpage tf-selectpages">
        <label for="c-selectpage-table" class="control-label col-xs-12 col-sm-2">{:__('关联表')}:</label>
        <div class="col-xs-12 col-sm-4">
            <select id="c-selectpage-table" name="row[setting][table]" class="form-control selectpicker" data-live-search="true">
                <option value="">{:__('请选择关联表')}</option>
                {foreach name="tableList" id="item"}
                <option value="{$key|htmlentities}" data-subtext="{$item|htmlentities}">{$key|htmlentities}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group hidden tf tf-selectpage tf-selectpages">
        <label for="c-selectpage-primarykey" class="control-label col-xs-12 col-sm-2">{:__('存储字段')}:</label>
        <div class="col-xs-12 col-sm-4">
            <select name="row[setting][primarykey]" class="form-control selectpicker" id="c-selectpage-primarykey"></select>
        </div>
    </div>
    <div class="form-group hidden tf tf-selectpage tf-selectpages">
        <label for="c-selectpage-field" class="control-label col-xs-12 col-sm-2">{:__('显示字段')}:</label>
        <div class="col-xs-12 col-sm-4">
            <select name="row[setting][field]" class="form-control selectpicker" id="c-selectpage-field"></select>
        </div>
    </div>
    <div class="form-group hidden tf tf-selectpage tf-selectpages">
        <label class="control-label col-xs-12 col-sm-2">{:__('筛选条件')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[setting][conditions]">
                <dd>
                    <ins>{:__('字段名')}</ins>
                    <ins>{:__('字段值')}</ins>
                </dd>

                <dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i> {:__('附加')}</a></dd>
                <textarea name="row[setting][conditions]" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>
        </div>
    </div>
    <div class="form-group hidden tf tf-array">
        <label for="c-array-key" class="control-label col-xs-12 col-sm-2">{:__('键名')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="text" name="row[setting][key]" class="form-control" id="c-array-key">
        </div>
    </div>
    <div class="form-group hidden tf tf-array">
        <label for="c-array-value" class="control-label col-xs-12 col-sm-2">{:__('键值')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="text" name="row[setting][value]" class="form-control" id="c-array-value">
        </div>
    </div>
    <div class="form-group hidden tf tf-select tf-selects tf-checkbox tf-radio tf-array">
        <label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('条目列表')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control" name="row[content]">value1|title1
value2|title2</textarea>
            <div class="alert alert-danger-light" style="margin-bottom:0;">
                温馨提示:<br>
                1、键值请不要加从0开始的顺序.可以隔开或者不从0开始。
            </div>
        </div>
    </div>
    <div class="form-group">
        <label for="c-defaultvalue" class="control-label col-xs-12 col-sm-2">{:__('默认值')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-defaultvalue" class="form-control" name="row[defaultvalue]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label for="c-rule" class="control-label col-xs-12 col-sm-2">{:__('验证规则')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-rule" class="form-control selectpage" data-source="facrm/fields/rulelist" data-multiple="true" name="row[rule]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label for="c-msg" class="control-label col-xs-12 col-sm-2">{:__('错误消息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-msg" class="form-control" name="row[msg]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label for="c-ok" class="control-label col-xs-12 col-sm-2">{:__('成功消息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ok" class="form-control" name="row[ok]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label for="c-tip" class="control-label col-xs-12 col-sm-2">{:__('提示消息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tip" class="form-control" name="row[tip]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label for="c-length" class="control-label col-xs-12 col-sm-2">{:__('字段长度')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-length" data-rule="required" class="form-control" name="row[length]" type="number" value="255">
        </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-isfilter" name="row[isfilter]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-isfilter" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </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-islist" name="row[islist]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-islist" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label for="c-extend" class="control-label col-xs-12 col-sm-2">{:__('扩展信息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-extend" class="form-control" name="row[extend]" data-tip="{:__('Extend tips')}"></textarea>
        </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="statusList" item="vo"}
                <label for="row[status]-{$key|htmlentities}"><input id="row[status]-{$key|htmlentities}" name="row[status]" type="radio" value="{$key|htmlentities}" {in name="key" value="normal" }checked{/in} /> {$vo|htmlentities}</label>
                {/foreach}
            </div>

        </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">{:__('确定')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('重置')}</button>
        </div>
    </div>
</form>