createcourse.html.php 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  3. <?php
  4. $webRoot = $this->app->getWebRoot();
  5. $jsRoot = $webRoot . "js/";
  6. js::import($jsRoot . 'uploader/min.js');
  7. css::import($jsRoot . 'uploader/min.css');
  8. js::set('uid', $uid);
  9. js::set('module', $module);
  10. $urlParams = "module=$module&uid=$uid";
  11. ?>
  12. <?php $requiredFields = $config->traincourse->create->requiredFields;?>
  13. <div class="main-content" id="mainContent">
  14. <div class="center-block">
  15. <div class="main-header">
  16. <h2><?php echo $lang->traincourse->createCourse;?></h2>
  17. </div>
  18. <form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='ajaxForm'>
  19. <table class='table table-form'>
  20. <tbody>
  21. <tr>
  22. <th><?php echo $lang->traincourse->category;?></th>
  23. <td><?php echo html::select('category', $categoryPairs, '', "class='form-control chosen' autocomplete='off'" . (strpos($requiredFields, 'category') !== false ? ' required' : ''));?></td>
  24. <td> </td>
  25. </tr>
  26. <tr>
  27. <th><?php echo $lang->traincourse->courseName;?></th>
  28. <td><?php echo html::input('name', '', "class='form-control' autocomplete='off' required");?></td>
  29. </tr>
  30. <tr>
  31. <th><?php echo $lang->traincourse->teacher;?></th>
  32. <td><?php echo html::input('teacher', '', "class='form-control' autocomplete='off'" . (strpos($requiredFields, 'teacher') !== false ? ' required' : ''));?></td>
  33. </tr>
  34. <tr>
  35. <th><?php echo $lang->traincourse->courseCover;?></th>
  36. <td>
  37. <div id='imageUploader' class="uploader" data-ride="uploader" data-url="<?php echo $this->createLink('file', 'ajaxUploadLargeFile', $urlParams)?>">
  38. <div class="uploader-message text-center">
  39. <div class="content"></div>
  40. <button type="button" class="close">x</button>
  41. </div>
  42. <div class="uploader-files file-list file-list-grid" data-drag-placeholder="<?php echo $lang->traincourse->drag?>"></div>
  43. <div class="uploader-actions">
  44. <button type="button" class="btn btn-link uploader-btn-browse"><i class="icon icon-plus"></i> <?php echo $lang->traincourse->uploadCover?></button>
  45. <button type='button' class='btn btn-link uploader-btn-start'><i class='icon icon-arrow-up'></i><?php echo $this->lang->file->beginUpload;?></button>
  46. </div>
  47. </div>
  48. </td>
  49. </tr>
  50. <tr>
  51. <th><?php echo $lang->traincourse->desc;?></th>
  52. <td colspan='2'><?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
  53. </tr>
  54. </tbody>
  55. <tfoot>
  56. <tr>
  57. <td colspan='3' class='text-center form-actions'>
  58. <?php echo html::submitButton();?>
  59. <?php echo html::backButton();?>
  60. </td>
  61. </tr>
  62. </tfoot>
  63. </table>
  64. </form>
  65. </div>
  66. </div>
  67. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>