add.html 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <div class="ibox-content">
  7. <form method="post" action="{:url('add')}" class="form-horizontal">
  8. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  9. <div class="form-group">
  10. <label class="col-sm-2 control-label">名称<span class="text-danger">*</span></label>
  11. <div class="col-sm-6">
  12. <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
  13. </div>
  14. </div>
  15. <div class="form-group">
  16. <label class="col-sm-2 control-label">时间代码<span class="text-danger">*</span></label>
  17. <div class="col-sm-6">
  18. <select name="time_id" class="form-control">
  19. <option value="">请选择</option>
  20. {foreach $time as $k=>$v}
  21. <option {if isset($info) && $info['time_id']==$v.id} selected {/if} value="{$v.id}">{$v.title}</option>
  22. {/foreach}
  23. </select>
  24. </div>
  25. </div>
  26. <div class="form-group">
  27. <label class="col-sm-2 control-label">运送对象<span class="text-danger">*</span></label>
  28. <div class="col-sm-6">
  29. <select name="cate" class="form-control">
  30. <option value="">请选择</option>
  31. {foreach $cate as $k=>$v}
  32. <option {if isset($info) && $info['cate']==$k} selected {/if} value="{$k}">{$v}</option>
  33. {/foreach}
  34. </select>
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label class="col-sm-2 control-label">目的空间</label>
  39. <div class="col-sm-6">
  40. {:widget_view('common/multiselect',['name'=>'ends','lists' => $ends, 'val' => isset($info)?$info['ends']:[]])}
  41. </div>
  42. </div>
  43. <div class="form-group">
  44. <label class="col-sm-2 control-label">任务优先级</label>
  45. <div class="col-sm-6">
  46. <select name="priority" class="form-control">
  47. {foreach $priority as $k=>$v}
  48. <option {if isset($info) && $info['priority']==$k} selected {/if} value="{$k}">{$v}</option>
  49. {/foreach}
  50. </select>
  51. </div>
  52. </div>
  53. <div class="form-group">
  54. <label class="col-sm-2 control-label">排序</label>
  55. <div class="col-sm-6">
  56. <input type="number" class="form-control" name="sort" value="{$info.sort|default='50'}">
  57. </div>
  58. </div>
  59. <div class="form-group">
  60. <label class="col-sm-2 control-label">状态</label>
  61. <div class="col-sm-6">
  62. <label class="cr-inline">
  63. <input type="radio" value="1" name="enable">正常&nbsp;&nbsp;
  64. </label>
  65. <label class="cr-inline">
  66. <input type="radio" value="0" name="enable">禁用
  67. </label>
  68. </div>
  69. </div>
  70. <div class="hr-line-dashed"></div>
  71. <div class="form-group">
  72. <div class="col-sm-6 col-sm-offset-2">
  73. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  74. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  75. </div>
  76. </div>
  77. </form>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. {/block}
  83. {block name="script"}
  84. <script>
  85. $(document).ready(function(){
  86. formSetValue("enable", {$info.enable|default=1});
  87. });
  88. </script>
  89. {/block}