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.

130 lines
4.9 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <?=form_open_multipart(NULL ,array('class'=>'form-flex','autocomplete'=>'off'))?>
  2. <input type="hidden" name="bng_key" value="<?=$bng_key?>">
  3. <input type="hidden" name="ban_idx" value="<?=element('ban_idx', $view)?>">
  4. <div class="form-group">
  5. <label class="control-label">배너 이름</label>
  6. <div class="controls">
  7. <input class="form-control" name="ban_name" value="<?=element('ban_name', $view)?>" required maxlength="50">
  8. </div>
  9. </div>
  10. <div class="form-group">
  11. <label class="control-label">배너 표시/숨김</label>
  12. <div class="controls">
  13. <label class="w-radio"><input type="radio" name="ban_status" value="Y" <?=element('ban_status',$view,'Y')=='Y'?'checked':''?>><span>표시</span></label>
  14. <label class="w-radio"><input type="radio" name="ban_status" value="H" <?=element('ban_status',$view,'Y')=='H'?'checked':''?>><span>숨김</span></label>
  15. </div>
  16. </div>
  17. <div class="form-group">
  18. <label class="control-label">배너 파일</label>
  19. <div class="controls">
  20. <input type="file" class="form-control" name="userfile">
  21. <?php if($banner_group['bng_width'] > 0) :?>
  22. <p class="help-block">권장 너비 : <?=$banner_group['bng_width']?>px</p>
  23. <?php endif;?>
  24. <?php if($banner_group['bng_height'] > 0) :?>
  25. <p class="help-block">권장 높이 : <?=$banner_group['bng_height']?>px</p>
  26. <?php endif;?>
  27. </div>
  28. </div>
  29. <hr>
  30. <div class="form-group">
  31. <label class="control-label">클릭시 이동</label>
  32. <div class="controls">
  33. <label class="w-radio"><input type="radio" name="ban_link_use" value="Y" <?=element('ban_link_use',$view,'N')=='Y'?'checked':''?>><span>사용</span></label>
  34. <label class="w-radio"><input type="radio" name="ban_link_use" value="N" <?=element('ban_link_use',$view,'N')=='N'?'checked':''?>><span>미사용</span></label>
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label class="control-label">이동 URL</label>
  39. <div class="controls">
  40. <input class="form-control" name="ban_link_url" value="<?=element('ban_link_url', $view)?>">
  41. </div>
  42. </div>
  43. <div class="form-group">
  44. <label class="control-label">이동 방식</label>
  45. <div class="controls">
  46. <label class="w-radio"><input type="radio" name="ban_link_type" value="Y" <?=element('ban_link_type',$view,'N')=='Y'?'checked':''?>><span>새 탭으로</span></label>
  47. <label class="w-radio"><input type="radio" name="ban_link_type" value="N" <?=element('ban_link_type',$view,'N')=='N'?'checked':''?>><span>현재창에서</span></label>
  48. </div>
  49. </div>
  50. <hr>
  51. <div class="form-group">
  52. <label class="control-label">표기 기간</label>
  53. <div class="controls">
  54. <select class="form-control form-control-inline" name="ban_timer_use">
  55. <option value="Y" <?=element('ban_timer_use', $view,'N')=='Y'?'selected':''?>>시간지정</option>
  56. <option value="N" <?=element('ban_timer_use', $view,'N')=='N'?'selected':''?>>항상표시</option>
  57. </select>
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label class="control-label">표기 시작시간</label>
  62. <div class="controls">
  63. <input class="form-control form-control-inline" name="ban_timer_start" value="<?=element('ban_timer_start', $view)?>">
  64. </div>
  65. </div>
  66. <div class="form-group">
  67. <label class="control-label">표기 종료시간</label>
  68. <div class="controls">
  69. <input class="form-control form-control-inline" name="ban_timer_end" value="<?=element('ban_timer_end', $view)?>">
  70. </div>
  71. </div>
  72. <hr>
  73. <?php
  74. for($i=1; $i<=5; $i++):
  75. if( $banner_group["bng_ext{$i}_use"] === 'Y' ) :
  76. ?>
  77. <div class="form-group">
  78. <label class="control-label"><?=$banner_group["bng_ext{$i}"]?></label>
  79. <div class="controls">
  80. <input class="form-control form-control-inline" name="ban_ext<?=$i?>" value="<?=element('ban_ext'.$i, $view)?>">
  81. </div>
  82. </div>
  83. <?php
  84. endif;
  85. endfor;
  86. ?>
  87. <div class="text-center MT10">
  88. <button class="btn btn-primary">저장하기</button>
  89. </div>
  90. <?=form_close()?>
  91. <script>
  92. $(function(){
  93. $('select[name="ban_timer_use"]').change(function(){
  94. if( $(this).find('option:selected').val() == 'Y' )
  95. {
  96. $('[name="ban_timer_start"],[name="ban_timer_end"]').removeAttr('disabled');
  97. }
  98. else {
  99. $('[name="ban_timer_start"],[name="ban_timer_end"]').val('').attr('disabled','disabled');
  100. }
  101. }).change();
  102. $('input[name="ban_link_use"]').change(function(){
  103. if( $('input[name="ban_link_use"]:checked').val() == 'Y' ) {
  104. $('input[name="ban_link_url"]').removeAttr('disabled');
  105. $('input[name="ban_link_type"]').removeAttr('disabled');
  106. }
  107. else {
  108. $('input[name="ban_link_url"]').attr('disabled','disabled');
  109. $('input[name="ban_link_type"]').attr('disabled','disabled');
  110. }
  111. }).change();
  112. });
  113. </script>