권한관리와 포인트관리의 선택삭제 기능을 접근성에 맞게 수정

This commit is contained in:
chicpro
2013-06-04 14:51:17 +09:00
parent 672473a12c
commit 03eed11c49
4 changed files with 41 additions and 18 deletions

View File

@ -73,7 +73,7 @@ $colspan = 5;
<h2>설정된 관리권한 내역</h2>
<p>권한 <strong>r</strong>은 읽기권한, <strong>w</strong>는 쓰기권한, <strong>d</strong>는 삭제권한입니다.</p>
<form name="fauthlist" id="fauthlist" method="post" action="./auth_list_delete.php">
<form name="fauthlist" id="fauthlist" method="post" action="./auth_list_delete.php" onsubmit="return fauthlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
@ -129,7 +129,7 @@ $colspan = 5;
</table>
<div class="btn_list">
<button onclick="btn_check(this.form, 'delete')">선택삭제</button>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
<?php
@ -211,16 +211,21 @@ $colspan = 5;
</form>
<script>
$(function() {
$('#fauthlist').submit(function() {
if (!is_checked("chk[]")) {
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
function fauthlist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
});
});
return true;
}
</script>
<?php

View File

@ -9,7 +9,12 @@ if ($is_admin != 'super')
check_token();
for ($i=0; $i<count($chk); $i++)
$count = count($_POST['chk']);
if (!$count)
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = $chk[$i];

View File

@ -61,11 +61,6 @@ include_once ('./admin.head.php');
$colspan = 8;
?>
<script>
var list_update_php = '';
var list_delete_php = 'point_list_delete.php';
</script>
<script>
function point_clear()
{
@ -104,7 +99,7 @@ function point_clear()
<section class="cbox">
<h2>포인트 내역</h2>
<form name="fpointlist" id="fpointlist" method="post">
<form name="fpointlist" id="fpointlist" method="post" action="./point_list_delete.php" onsubmit="return fpointlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
@ -167,7 +162,7 @@ function point_clear()
</table>
<div class="btn_list">
<button onclick="btn_check(this.form, 'delete')">선택삭제</button>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
@ -215,6 +210,24 @@ function point_clear()
</section>
<script>
function fpointlist_submit(f)
{
if (!is_checked("chk[]")) {
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택삭제") {
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once ('./admin.tail.php');
?>

View File

@ -10,7 +10,7 @@ check_token();
$count = count($_POST['chk']);
if(!$count)
alert("선택삭제 하실 항목을 하나이상 선택해 주세요.");
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
for ($i=0; $i<$count; $i++)
{