251 lines
13 KiB
HTML
251 lines
13 KiB
HTML
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||
<input type="hidden" name="row[source]" value="{$source}"/>
|
||
<input type="hidden" name="row[source_id]" value="{$source_id}"/>
|
||
<div class="form-group">
|
||
<label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||
<div class="col-xs-12 col-sm-4">
|
||
<input id="c-name" data-rule="required; length(2~30); fieldname" 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">{:__('Title')}:</label>
|
||
<div class="col-xs-12 col-sm-4">
|
||
<input id="c-title" data-rule="required; length(~30)" 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">{:__('Type')}:</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}">{$type}</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">{:__('Decimals')}:</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">{:__('Minimum')}:</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">{:__('Maximum')}:</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">{:__('Selectpage table')}:</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="">{:__('Please select table')}</option>
|
||
{foreach name="tableList" id="item"}
|
||
<option value="{$key}" data-subtext="{$item}">{$key}</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">{:__('Selectpage primarykey')}:</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">{:__('Selectpage field')}:</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">{:__('Selectpage conditions')}:</label>
|
||
<div class="col-xs-12 col-sm-8">
|
||
<dl class="fieldlist" data-name="row[setting][conditions]">
|
||
<dd>
|
||
<ins>{:__('Field title')}</ins>
|
||
<ins>{:__('Field value')}</ins>
|
||
</dd>
|
||
|
||
<dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i> {:__('Append')}</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">{:__('Array key')}:</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">{:__('Array value')}:</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-radio tf-checkbox tf-select tf-selects tf-array">
|
||
<label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Content List')}:</label>
|
||
<div class="col-xs-12 col-sm-8">
|
||
<textarea id="c-content" data-rule="required" class="form-control" name="row[content]" placeholder="一行一条记录,格式:存储值|显示值">value1|title1
|
||
value2|title2</textarea>
|
||
</div>
|
||
</div>
|
||
{if in_array($source, ['model', 'diyform'])}
|
||
<div class="form-group">
|
||
<label class="control-label col-xs-12 col-sm-2">{:__('Isfilter')}:</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 hidden" id="filterdom">
|
||
<label for="c-filterlist" class="control-label col-xs-12 col-sm-2">{:__('Filterlist')}:</label>
|
||
<div class="col-xs-12 col-sm-8">
|
||
<textarea id="c-filterlist" class="form-control" name="row[filterlist]" placeholder="一行一条记录,格式:搜索值|显示值">value1|title1
|
||
value2|title2</textarea>
|
||
<div style="margin-top:5px;" class="text-muted"><span class="hidden tf tf-radio tf-checkbox tf-select tf-selects tf-array">为空时将使用数据列表,</span>用于前台列表筛选使用</div>
|
||
</div>
|
||
</div>
|
||
{/if}
|
||
<div class="form-group">
|
||
<label for="c-defaultvalue" class="control-label col-xs-12 col-sm-2">{:__('Defaultvalue')}:</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">{:__('Rule')}:</label>
|
||
<div class="col-xs-12 col-sm-4">
|
||
<input id="c-rule" class="form-control selectpage" data-source="cms/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">{:__('Validate Msg')}:</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">{:__('Validate Ok')}:</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">{:__('Validate Tip')}:</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">{:__('Length')}:</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">{:__('Isorder')}:</label>
|
||
|
||
<div class="col-xs-12 col-sm-8">
|
||
<input id="c-isorder" name="row[isorder]" type="hidden" value="0">
|
||
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-isorder" 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>
|
||
{if in_array($source, ['model', 'diyform'])}
|
||
<div class="form-group">
|
||
<label class="control-label col-xs-12 col-sm-2">{:__('Iscontribute')}:</label>
|
||
<div class="col-xs-12 col-sm-8">
|
||
<input id="c-iscontribute" name="row[iscontribute]" type="hidden" value="0">
|
||
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-iscontribute" 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>
|
||
{/if}
|
||
<div class="form-group">
|
||
<label for="c-extend" class="control-label col-xs-12 col-sm-2">{:__('Extend')}:</label>
|
||
<div class="col-xs-12 col-sm-8">
|
||
<textarea id="c-extend" class="form-control" name="row[extend]" placeholder="{:__('Extend tips')}" data-tip="{:__('Extend tips')}"></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||
<div class="col-xs-12 col-sm-8">
|
||
|
||
<div class="radio">
|
||
{foreach name="statusList" item="vo"}
|
||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal" }checked{/in} /> {$vo}</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-primary btn-embossed disabled">{:__('OK')}</button>
|
||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||
</div>
|
||
</div>
|
||
</form>
|