mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-23 02:45:33 +08:00
63 lines
2.4 KiB
HTML
63 lines
2.4 KiB
HTML
<!--
|
||
Copyright 2012-2026 ShopeX (https://www.shopex.cn)
|
||
|
||
Licensed under the Apache License, Version 2.0 (the "License");
|
||
you may not use this file except in compliance with the License.
|
||
You may obtain a copy of the License at
|
||
|
||
http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
Unless required by applicable law or agreed to in writing, software
|
||
distributed under the License is distributed on an "AS IS" BASIS,
|
||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
See the License for the specific language governing permissions and
|
||
limitations under the License.
|
||
-->
|
||
|
||
<div class="form-layout">
|
||
<form method="post" action="<{$url}>" id="form-common">
|
||
<h3><{$title}></h3>
|
||
|
||
<{foreach from=$formGroups item=group}>
|
||
<div class="form-layout-block">
|
||
<div class="form-layout-fields form-layout-fields-column">
|
||
|
||
<{foreach from=$group item=item key=key}>
|
||
<div class="form-field">
|
||
<span class="form-field-label">
|
||
<{if $item.required == true}><em class="c-red">*</em><{/if}>
|
||
<{$item.label}>:
|
||
</span>
|
||
|
||
<{if $item.type == 'radio'}>
|
||
<div class="form-radios">
|
||
<{input type="radio" name=$key options=$item.options value=$item.value|default:$item.default}>
|
||
</div>
|
||
<{elseif $item.type == 'select'}>
|
||
<{input type="select" name=$key options=$item.options value=$item.value}>
|
||
<{elseif $item.type == 'checkbox'}>
|
||
<div class="form-checkbox">
|
||
<{foreach item=cbItem key=cbKey from=$item.options}>
|
||
<label>
|
||
<input type="checkbox" name="<{$key}>[]" value="<{$cbKey}>" <{if $item.value == $cbKey }>checked<{/if}> > <{$cbItem}>
|
||
</label>
|
||
<{/foreach}>
|
||
</div>
|
||
<{else}>
|
||
<input class="form-input" name="<{$key}>" value="<{$item.value}>" vtype="<{$item.vtype}>" placeholder="<{$item.placeholder}>" />
|
||
<{/if}>
|
||
|
||
<{if $item.description}><p class="form-remark"><{$item.description}></p><{/if}>
|
||
</div>
|
||
<{/foreach}>
|
||
</div>
|
||
</div>
|
||
<{/foreach}>
|
||
|
||
<div class="table-action">
|
||
<{button label="提交" class="btn-primary" type="submit" name="submit"}>
|
||
</div>
|
||
|
||
</form>
|
||
</div>
|