w

회원정보 수정 할때 비밀번호 필드는 숨겨 놓기

· 2023-03-29 (수) 15:26:21 · 6480

테마/register_form.skin.php 파일을 수정

토글로 체크 하면 나오도록 보여주는 소스입니다.

 

[code]

<?php

if ($is_member)

{

?>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>

// function by welcome - @

$(function() {
  $("#pass_question").on("click",function() {
    $(".answer").toggle(this.checked);
  });
});

</script>

<style>

.answer { display:none }

</style>

 

<tr class="question">
  <label for="pass_question">비밀번호 변경하시겠습니까?</label>
  <input id="pass_question" type="checkbox" name="pass_question" value="1" />
  <span class="item-text">Yes</span>
</tr>


<tr class="answer">
    <th scope="row"><label for="reg_mb_password">비밀번호<strong class="sound_only">필수</strong></label></th>
            <td><input type="password" name="mb_password" id="reg_mb_password" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20"></td>
        </tr>
<tr class="answer">
    <th scope="row"><label for="reg_mb_password_re">비밀번호 확인<strong class="sound_only">필수</strong></label></th>
    <td><input type="password" name="mb_password_re" id="reg_mb_password_re" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20"></td>
</tr>

 

<?php

}

else

{

?>

        <tr>
            <th scope="row"><label for="reg_mb_password">비밀번호<strong class="sound_only">필수</strong></label></th>
            <td><input type="password" name="mb_password" id="reg_mb_password" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20"></td>
        </tr>
        <tr>
            <th scope="row"><label for="reg_mb_password_re">비밀번호 확인<strong class="sound_only">필수</strong></label></th>
            <td><input type="password" name="mb_password_re" id="reg_mb_password_re" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20"></td>
        </tr>

<?php

}

?>

[/code]

댓글을 작성하시려면 로그인이 필요합니다.
+
제목 글쓴이 날짜 조회
23-03-29 조회 6,910
23-03-29 조회 6,481
23-03-24 조회 6,361
23-03-23 조회 7,649
23-03-23 조회 7,196
23-03-16 조회 7,474
23-03-16 조회 7,374
23-03-16 조회 7,752
23-03-11 조회 7,896
23-03-09 조회 7,145
23-03-08 조회 7,483
23-03-07 조회 7,315
23-03-06 조회 7,880
23-03-05 조회 7,014
23-03-03 조회 8,782
23-03-02 조회 7,969
23-03-02 조회 6,903
23-03-01 조회 6,616
23-02-20 조회 6,917
23-02-16 조회 7,595
23-02-16 조회 6,873
23-02-11 조회 7,246
23-02-10 조회 7,665
23-02-08 조회 7,086
23-02-06 조회 7,377
23-02-05 조회 7,493
23-02-02 조회 8,772
23-02-02 조회 8,268
23-02-02 조회 6,514
23-02-02 조회 7,010