12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <form id="form" action="{:url('tpl/edit')}">
- <input type="hidden" name="id" value="{$info.id}"/>
- <table class="formtable" id="attr">
- <tr>
- <th>模板名称:</th>
- <td><input class="input" datatype="*" type="text" name="name" value="{$info.name}" /></td>
- </tr>
- {if empty($info.fields)}
- <tr>
- <th>模板类型</th>
- <td class="input-group">
- <input class="input w100" datatype="*" type="text" name="title[]" placeholder="模板标题"/>
- <select class="select" name="types[]">
- <option value="text" selected>文本输入</option>
- <option value="address">联系地址</option>
- <option value="number">整数数字</option>
- <option value="digit"">小数点数字</option>
- <option value="idcard">身份证输入</option>
- <option value="date">年月日时分</option>
- <option value="selector">选择器</option>
- </select>
- <input class="input w300" type="text" name="placeholder[]" placeholder="提示语"/>
- <span class="fn-cp ml5" id="add_attr"><i class="iconfont icon-add_icon"></i></span> <br />
- <input class="input w500 mt5" type="text" name="values[]" placeholder="默认值,多个以|线分开"/>
- </td>
- </tr>
- {else}
- {foreach $info.fields as $key => $vo}
- <tr>
- <th>{if !$key}模板类型{/if}</th>
- <td class="input-group">
- <input class="input w100" datatype="*" type="text" name="title[]" placeholder="模板标题" value="{$vo.title}"/>
- <select class="select" name="types[]">
- <option value="text" {$vo.types == 'text'?'selected':''}>文本输入</option>
- <option value="address" {$vo.types == 'address'?'selected':''}>联系地址</option>
- <option value="number" {$vo.types == 'number'?'selected':''}>整数数字</option>
- <option value="digit"" {$vo.types == 'digit'?'selected':''}>小数点数字</option>
- <option value="idcard" {$vo.types == 'idcard'?'selected':''}>身份证输入</option>
- <option value="date" {$vo.types == 'date'?'selected':''}>年月日时分</option>
- <option value="selector" {$vo.types == 'selector'?'selected':''}>选择器</option>
- </select>
- <input class="input w300" type="text" name="placeholder[]" placeholder="提示语" value="{$vo.placeholder}"/>
- {if !$key}
- <span class="fn-cp ml5" id="add_attr"><i class="iconfont icon-add_icon"></i></span>
- {else}
- <span class="fn-cp ml5" onclick="remove_attr(this)"><i class="iconfont icon-reduce_icon"></i></span>
- {/if} <br />
- <input class="input w500 mt5" type="text" name="values[]" placeholder="默认值,多个以|线分开" value="{$vo.values}"/>
- </td>
- </tr>
- {/foreach}
- {/if}
- </table>
- <table class="formtable">
- <tr>
- <th></th>
- <td>
- <input type="submit" value="确定" class="button button-blue submit" />
- <input type="reset" value="重置" class="button"/>
- </td>
- </tr>
- </table>
- </form>
- {include file="tpl:bottom" /}
|