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.

74 lines
2.8 KiB

7 years ago
7 years ago
7 years ago
  1. <?=form_open(NULL, array('class'=>'form-flex','autocomplete'=>'off'))?>
  2. <input type="hidden" name="bng_idx" value="<?=element('bng_idx', $view)?>">
  3. <?=validation_errors('<p class="alert alert-danger">');?>
  4. <div data-ax-tbl>
  5. <div data-ax-tr>
  6. <div data-ax-td class="width-100">
  7. <div data-ax-td-label>그룹 고유 </div>
  8. <div data-ax-td-wrap>
  9. <input class="form-control" name="bng_key" value="<?=element('bng_key', $view)?>" required maxlength="10" <?=element('bng_key',$view)?'readonly':''?>>
  10. </div>
  11. </div>
  12. </div>
  13. <div data-ax-tr>
  14. <div data-ax-td class="width-100">
  15. <div data-ax-td-label>배너 그룹 이름</div>
  16. <div data-ax-td-wrap>
  17. <input class="form-control" name="bng_name" value="<?=element('bng_name', $view)?>" required maxlength="50">
  18. </div>
  19. </div>
  20. </div>
  21. <div data-ax-tr>
  22. <div data-ax-td>
  23. <div data-ax-td-label>권장 너비 (px)</div>
  24. <div data-ax-td-wrap>
  25. <input type="number" class="form-control text-right" name="bng_width" value="<?=element('bng_width', $view, 0)?>">
  26. </div>
  27. </div>
  28. <div data-ax-td>
  29. <div data-ax-td-label>권장 높이 (px)</div>
  30. <div data-ax-td-wrap>
  31. <input type="number" class="form-control text-right" name="bng_height" value="<?=element('bng_height', $view, 0)?>">
  32. </div>
  33. </div>
  34. </div>
  35. <?php for($i=1; $i<=5; $i++):?>
  36. <div data-ax-tr>
  37. <div data-ax-td>
  38. <div data-ax-td-label>추가필드 <?=$i?></div>
  39. <div data-ax-td-wrap>
  40. <input class="form-control form-control-inline" name="bng_ext<?=$i?>" value="<?=element('bng_ext'.$i, $view, '')?>">
  41. </div>
  42. </div>
  43. <div data-ax-td>
  44. <div data-ax-td-wrap>
  45. <label class="w-check"><input type="checkbox" data-toggle="disabled-checked" data-target='[name="bng_ext<?=$i?>"]' name="bng_ext<?=$i?>_use" value="Y" <?=element("bng_ext{$i}_use", $view, 'N')=='Y'?'checked':''?>><span>사용</span></label>
  46. </div>
  47. </div>
  48. </div>
  49. <?php endfor;?>
  50. </div>
  51. <div class="text-center MT10">
  52. <button class="btn btn-primary">저장하기</button>
  53. </div>
  54. <?=form_close()?>
  55. <script>
  56. $(function(){
  57. $('[data-toggle="disabled-checked"]').each(function(){
  58. $(this).change(function(){
  59. var $this = $(this);
  60. var checked = $this.prop('checked');
  61. var target = $this.data('target');
  62. if( checked ) {
  63. $(target).removeAttr('disabled');
  64. }
  65. else {
  66. $(target).attr('disabled','disabled');
  67. }
  68. }).change();
  69. });
  70. });
  71. </script>