group.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="tabs-container">
  4. <ul class="nav nav-tabs">
  5. {volist name="type" id="v"}
  6. <li {if condition="$key eq $id"}class="active"{/if}>
  7. <a href="{:url('group',['id'=>$key])}">{$v}配置</a>
  8. </li>
  9. {/volist}
  10. </ul>
  11. <div class="tab-content">
  12. <div id="tab-1" class="tab-pane active">
  13. <div class="panel-body">
  14. <div class="col-sm-6">
  15. <form method="post" action="{:url('save')}" class="form-config">
  16. {volist name="list" id="config"}
  17. <div class="form-group">
  18. <label class="control-label">{$config.title}<span class="text-muted">{if condition="$config['remark']"}({$config.remark}){/if}</span></label>
  19. {switch name="config.type" }
  20. {case value="0"}
  21. <input type="number" class="form-control " name="{$config.name}" value="{$config.value}">
  22. {/case}
  23. {case value="1"}
  24. <input type="text" class="form-control " name="{$config.name}" value="{$config.value}">
  25. {/case}
  26. {case value="2|3"}
  27. <textarea name="{$config.name}" class="form-control" rows="3">{$config.value}</textarea>
  28. {/case}
  29. {case value="4"}
  30. <select name="{$config.name}" class="form-control">
  31. {volist name=":model('Config')->parseConfigAttr($config['extra'])" id="vo"}
  32. <option value="{$key}" {eq name="config.value" value="$key"}selected{/eq}>{$vo}</option>
  33. {/volist}
  34. </select>
  35. {/case}
  36. {case value="7"}
  37. {:widget_view('common/upimg',['name'=>$config['name'],'multi'=>0,'val'=>$config['value']?$config['value']:''])}
  38. {/case}
  39. {/switch}
  40. </div>
  41. {/volist}
  42. <div class="form-group">
  43. <button class="btn btn-primary ajax-post" target-form="form-config" type="submit">保 存</button>
  44. <a href="" class="btn btn-default">刷新</a>
  45. </div>
  46. </form>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. {/block}