You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
3.1 KiB

7 years ago
  1. <div class="container">
  2. <div class="ax-button-group">
  3. <div class="left">
  4. <h2><?=$board['brd_title']?> 글쓰기</h2>
  5. </div>
  6. </div>
  7. <div class="form-flex">
  8. <?=$form_open?>
  9. <?=validation_errors('<p class="alert alert-danger">')?>
  10. <div class="form-group">
  11. <label class="control-label">제목</label>
  12. <div class="controls">
  13. <input class="form-control" id="w_title" name="post_title" value="<?=element('post_title', $view)?>" required>
  14. </div>
  15. </div>
  16. <?php if(! defined('IS_REPLY_WRITE_FORM') && $use_notice) :?>
  17. <div class="form-group">
  18. <label class="control-label">공지</label>
  19. <div class="controls">
  20. <label class="w-check">
  21. <input type="checkbox" value="Y" name="post_notice" <?=element('post_notice',$view,'N')=='Y'?'checked':''?>><span>공지로 등록</span>
  22. </label>
  23. </div>
  24. </div>
  25. <?php endif;?>
  26. <div class="form-group">
  27. <label class="control-label">내용</label>
  28. <div class="controls">
  29. <?=get_editor('post_content', element('post_content', $view), '');?>
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. <label class="control-label">태그</label>
  34. <div class="controls">
  35. <input class="form-control" id="w_keywords" name="post_keywords" value="<?=element('post_keywords', $view)?>">
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label class="control-label">파일첨부</label>
  40. <div class="controls">
  41. [widget name="board_file_upload"]
  42. </div>
  43. </div>
  44. <?php if( $post_idx && count(element('file', $view, array())) > 0) :?>
  45. <div class="form-group">
  46. <label class="control-label">첨부된 파일</label>
  47. <div class="controls">
  48. <?php foreach($view['file'] as $attach) : ?>
  49. <div class="col-sm-3">
  50. <?php $img_url = ($attach['att_is_image'] == 'Y') ? base_url($attach['att_filename']) : base_url('assets/images/common/attach.png'); ?>
  51. <figure>
  52. <img class="img-responsive" src="<?=$img_url?>" <?=($attach['att_is_image'] != 'Y')?'style="max-width:64px;margin:auto"':''?>>
  53. <figcaption><?=$attach['att_origin']?></figcaption>
  54. </figure>
  55. <div class="checkbox">
  56. <label><input type="checkbox" name="del_file[]" value="<?=$attach['att_idx']?>"> 파일 삭제</label>
  57. </div>
  58. </div>
  59. <?php endforeach;?>
  60. </div>
  61. </div>
  62. <?php endif;?>
  63. <div class="text-center MT10">
  64. <button class="btn btn-primary">작성하기</button>
  65. </div>
  66. <?=$form_close?>
  67. </div>
  68. </div>