DiverseYouthNightSchool/application/admin/view/xilufitness/brand/index/config.html

193 lines
15 KiB
HTML
Raw Normal View History

2024-11-04 10:49:10 +08:00
<style type="text/css">
@media (max-width: 375px) {
.edit-form tr td input {
width: 100%;
}
.edit-form tr th:first-child, .edit-form tr td:first-child {
width: 20%;
}
.edit-form tr th:nth-last-of-type(-n+2), .edit-form tr td:nth-last-of-type(-n+2) {
display: none;
}
}
.edit-form table > tbody > tr td a.btn-delcfg {
visibility: hidden;
}
.edit-form table > tbody > tr:hover td a.btn-delcfg {
visibility: visible;
}
</style>
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null, false)}
<ul class="nav nav-tabs">
{foreach $navBar as $index=>$vo}
<li class="{$index == 'mini' ?'active':''}"><a href="#tab-{$vo.name}" data-toggle="tab">{:__($vo.title)}</a></li>
{/foreach}
</ul>
</div>
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<!--@formatter:off-->
{foreach $navBar as $index=>$vo}
<div class="tab-pane fade {$vo.active ? 'active in' : ''}" id="tab-{$vo.name}">
<div class="widget-body no-padding">
<form id="{$vo.name}-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="">
{:token()}
<table class="table table-striped">
<thead>
<tr>
<th width="15%">{:__('Title')}</th>
<th width="68%">{:__('Value')}</th>
</tr>
</thead>
<tbody>
{foreach $vo.list as $item}
<tr data-favisible="{$item.visible|default=''|htmlentities}" data-name="{$item.name}" class="{if $item.visible??''}hidden{/if}">
<td>{$item.title}</td>
<input type="hidden" name="row[group]" value="{$index|default=''|htmlentities}" />
<input type="hidden" name="row[tip][]" value="{$item.tip|default=''|htmlentities}" />
<input type="hidden" name="row[rule][]" value="{$item.rule|default=''|htmlentities}" />
<input type="hidden" name="row[title][]" value="{$item.title|default=''|htmlentities}" />
<input type="hidden" name="row[type][]" value="{$item.type|default=''|htmlentities}" />
<input type="hidden" name="row[name][]" value="{$item.name|default=''|htmlentities}" />
<td>
<div class="row">
<div class="col-sm-8 col-xs-12">
{switch $item.type}
{case string}
<input type="text" name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
{/case}
{case password}
<input type="password" name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
{/case}
{case text}
<textarea name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" class="form-control" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}">{$item.value|htmlentities}</textarea>
{/case}
{case editor}
<textarea name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" id="editor-{$item.name}" class="form-control editor" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}">{$item.value|htmlentities}</textarea>
{/case}
{case array}
<dl class="fieldlist" data-name="row[{$item.name}]">
<dd>
<ins>{:isset($item["setting"]["key"])&&$item["setting"]["key"]?$item["setting"]["key"]:__('Array key')}</ins>
<ins>{:isset($item["setting"]["value"])&&$item["setting"]["value"]?$item["setting"]["value"]:__('Array value')}</ins>
</dd>
<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
<textarea name="row[{$item.name}][]" class="form-control hide" cols="30" rows="5">{$item.value|htmlentities}</textarea>
</dl>
{/case}
{case date}
<input type="text" name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
{/case}
{case time}
<input type="text" name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
{/case}
{case datetime}
<input type="text" name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
{/case}
{case datetimerange}
<input type="text" name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" value="{$item.value|htmlentities}" class="form-control datetimerange" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
{/case}
{case number}
<input type="number" name="row[{$item.name}][]" placeholder="{$item.placeholder|default=''|htmlentities}" value="{$item.value|htmlentities}" class="form-control" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
{/case}
{case checkbox}
<div class="checkbox">
{foreach name="item.content" item="vo"}
<label for="row[{$item.name}][]-{$key}"><input id="row[{$item.name}][]-{$key}" name="row[{$item.name}][]" type="checkbox" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
{/foreach}
</div>
{/case}
{case radio}
<div class="radio">
{foreach name="item.content" item="vo"}
<label for="row[{$item.name}]-{$key}"><input id="row[{$item.name}]-{$key}" name="row[{$item.name}][] type="radio" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
{/foreach}
</div>
{/case}
{case value="select" break="0"}{/case}
{case value="selects"}
<select name="row[{$item.name}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip}" {$item.type=='selects'?'multiple':''}>
{foreach name="item.content" item="vo"}
<option value="{$key}" {in name="key" value="$item.value" }selected{/in}>{$vo}</option>
{/foreach}
</select>
{/case}
{case value="image" break="0"}{/case}
{case value="images"}
<div class="form-inline">
<input id="c-{$item.name}" placeholder="{$item.placeholder|default=''|htmlentities}" class="form-control" size="50" name="row[{$item.name}][]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
<span><button type="button" id="faupload-{$item.name}" class="btn btn-danger faupload" data-input-id="c-{$item.name}" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span class="msg-box n-right" for="c-{$item.name}"></span>
<ul class="row list-inline faupload-preview" id="p-{$item.name}"></ul>
</div>
{/case}
{case value="file" break="0"}{/case}
{case value="files"}
<div class="form-inline">
<input id="c-{$item.name}" placeholder="{$item.placeholder|default=''|htmlentities}" class="form-control" size="50" name="row[{$item.name}][]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}" data-rule="{$item.rule|default=''|htmlentities}">
<span><button type="button" id="faupload-{$item.name}" class="btn btn-danger faupload" data-input-id="c-{$item.name}" data-mimetype="*" data-url="ajax/upload" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span class="msg-box n-right" for="c-{$item.name}"></span>
</div>
{/case}
{case switch}
<input id="c-{$item.name}" name="row[{$item.name}][]" type="hidden" value="{:$item.value?1:0}">
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-{$item.name}" data-yes="1" data-no="0">
<i class="fa fa-toggle-on text-success {if !$item.value}fa-flip-horizontal text-gray{/if} fa-2x"></i>
</a>
{/case}
{case bool}
<label for="row[{$item.name}]-yes"><input id="row[{$item.name}]-yes" name="row[{$item.name}][]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip}" /> {:__('Yes')}</label>
<label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}][]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" /> {:__('No')}</label>
{/case}
{case city}
<div style="position:relative">
<input type="text" name="row[{$item.name}][]" id="c-{$item.name}" value="{$item.value|htmlentities}" class="form-control" data-toggle="city-picker" data-tip="{$item.tip}" data-rule="{$item.rule}" />
</div>
{/case}
{case value="selectpage" break="0"}{/case}
{case value="selectpages"}
<input type="text" name="row[{$item.name}][]" id="c-{$item.name}" value="{$item.value|htmlentities}" class="form-control selectpage" data-source="{:url('general.config/selectpage')}?id={$item.id}" data-primary-key="{$item.setting.primarykey}" data-field="{$item.setting.field}" data-multiple="{$item.type=='selectpage'?'false':'true'}" data-tip="{$item.tip}" data-rule="{$item.rule}" />
{/case}
{case custom}
{/case}
{/switch}
</div>
<div class="col-sm-4"></div>
</div>
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
<tr>
<td></td>
<td>
<div class="layer-footer">
<button style="margin-left: 5%;" type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
</div>
{/foreach}
<!--@formatter:on-->
</div>
</div>
</div>