From e684877c9495975e1da87a61ff2076530a387045 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 19 Sep 2019 02:21:51 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A6=AC=EC=85=8B=20=ED=99=94=EB=A9=B4?= =?UTF-8?q?=EC=97=90=EC=84=9C=20'=ED=9C=B4=EC=8B=9D=20=ED=84=B4=20?= =?UTF-8?q?=EC=8B=9C=20=EC=9E=A5=EC=88=98=20=ED=84=B4'=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/install.php | 89 +++++++++++++++++++++++++++++++++++++++++++++++ hwe/js/install.js | 23 ++++++++++++ 2 files changed, 112 insertions(+) diff --git a/hwe/install.php b/hwe/install.php index b4edf004..8abdee2f 100644 --- a/hwe/install.php +++ b/hwe/install.php @@ -152,6 +152,95 @@ if($session->userGrade < 5 && !$allowReset){ +
+ +
+
+
+ + + + +
+
+ 유효 시간 +
+ +
+
+
+ + +
diff --git a/hwe/js/install.js b/hwe/js/install.js index 10034b89..80108414 100644 --- a/hwe/js/install.js +++ b/hwe/js/install.js @@ -105,6 +105,17 @@ function scenarioPreview(){ } function formSetup(){ + $.validator.addMethod("autorun_user", function(value,element){ + if(value <= 0){ + return true; + } + + var parent = $(element).parent('.input-group'); + if(parent.find('input:checked').length == 0){ + return false; + } + return true; + }, "적어도 하나는 선택을 해야합니다."); $('#game_form').validate({ rules:{ turnterm:"required", @@ -116,6 +127,7 @@ function formSetup(){ show_img_level:"required", tournament_trig:"required", join_mode:'required', + autorun_user_minutes:{required: true, autorun_user: true, min:0} }, errorElement: "div", errorPlacement: function ( error, element ) { @@ -140,6 +152,15 @@ function formSetup(){ if(!$("#game_form").valid()){ return; } + + var autorun_user_minutes = parseInt($('#autorun_user_minutes').val()); + var autorun_user = []; + if(autorun_user_minutes > 0){ + $('.autorun_user_chk:checked').each(function(){ + autorun_user.push($(this).data('key')); + }); + } + $.ajax({ cache:false, type:'post', @@ -157,6 +178,8 @@ function formSetup(){ reserve_open:$('#reserve_open').val(), pre_reserve_open:$('#pre_reserve_open').val(), join_mode:$('#join_mode input:radio:checked').val(), + autorun_user_minutes:autorun_user_minutes, + autorun_user:autorun_user } }).then(function(result){ var deferred = $.Deferred();