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.

60 lines
2.4 KiB

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