import.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <form id="import-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  2. <div class="form-group">
  3. <label class="control-label col-xs-12 col-sm-2">{:__('Cate_id')}:</label>
  4. <div class="col-xs-12 col-sm-8">
  5. <input id="c-cate_id" data-rule="required" data-source="exam/cate/selectpage" data-params='{"custom[kind]":"QUESTION","isTree":true}' class="form-control selectpage" name="row[cate_id]" type="text" value="">
  6. </div>
  7. </div>
  8. <!--<div class="form-group">
  9. <label class="control-label col-xs-12 col-sm-2">{:__('Exam_type_id')}:</label>
  10. <div class="col-xs-12 col-sm-8">
  11. <input id="c-exam_type_id" data-rule="required" data-source="exam_type/index" class="form-control selectpage" name="row[exam_type_id]" type="text" value="">
  12. </div>
  13. </div>-->
  14. <div class="form-group">
  15. <label class="control-label col-xs-12 col-sm-2">选择文件:</label>
  16. <div class="col-xs-12 col-sm-8">
  17. <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('exam/question/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
  18. <input type="hidden" id="file_url">
  19. <label id="question_count" class="m-l-10"></label>
  20. <!--<input id="test" type="button" value="test">-->
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. <label class="control-label col-xs-12 col-sm-2">模板文件:</label>
  25. <div class="col-xs-12 col-sm-8">
  26. <a href="/assets/addons/exam/template/import_template.xlsx?v=2" target="_blank" class="btn btn-success" title="点击下载模板文件"><i class="fa fa-download"></i> 点击下载模板文件</a>
  27. </div>
  28. </div>
  29. <div class="form-group layer-footer">
  30. <label class="control-label col-xs-12 col-sm-2"></label>
  31. <div class="col-xs-12 col-sm-8">
  32. <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
  33. <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
  34. </div>
  35. </div>
  36. </form>
  37. <script>
  38. var valid_result = true;
  39. </script>