마에스트로 로그인 화면 암호 내용 토글 버튼 기능 추가
This commit is contained in:
1 parent
e9e3bcda50
commit
5ee497bd4c
1 file changed
+13
@@ -9,6 +9,14 @@ $(document).ready(function() {
|
||||
})
|
||||
});
|
||||
|
||||
function togglePassword() {
|
||||
var $pw = $("#password");
|
||||
var show = $pw.attr("type") === "password";
|
||||
$pw.attr("type", show ? "text" : "password");
|
||||
$("#toggle_password").attr("aria-pressed", show)
|
||||
.find("span").toggleClass("oi-eye", !show).toggleClass("oi-lock-locked", show);
|
||||
}
|
||||
|
||||
function login() {
|
||||
var name = $("#maestro_name").val();
|
||||
var password = $("#password").val();
|
||||
@@ -79,7 +87,12 @@ function login() {
|
||||
<div class="form-group row">
|
||||
<label for="password" class="col-sm-2 col-form-label">* 암호</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="password" placeholder="Password">
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-outline-secondary" id="toggle_password" title="암호 보기/숨기기" aria-label="암호 보기/숨기기" aria-pressed="false" onClick="togglePassword()"><span class="oi oi-eye" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<p><br/></p>
|
||||
<button type="button" class="btn btn-primary btn-lg px-5" onClick="login()">로그인</button>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user