핸드폰 번호에 - 넣어주기 수정
This commit is contained in:
@@ -42,7 +42,7 @@ public class AdminCreatePostController {
|
|||||||
bindingVO.getId(),
|
bindingVO.getId(),
|
||||||
bindingVO.getPassword(),
|
bindingVO.getPassword(),
|
||||||
bindingVO.getName(),
|
bindingVO.getName(),
|
||||||
"010"+bindingVO.getPhone1()+bindingVO.getPhone2(),
|
"010-"+bindingVO.getPhone1()+"-"+bindingVO.getPhone2(),
|
||||||
bindingVO.getRegionMainCode(),
|
bindingVO.getRegionMainCode(),
|
||||||
bindingVO.getAccountDisabled(),
|
bindingVO.getAccountDisabled(),
|
||||||
bindingVO.getRoleId()));
|
bindingVO.getRoleId()));
|
||||||
|
|||||||
@@ -89,19 +89,21 @@
|
|||||||
</td>
|
</td>
|
||||||
<th><label for="name">전화번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
<th><label for="name">전화번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
<td>
|
<td>
|
||||||
010-
|
<div class="d-flex">
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" required>
|
||||||
|
<option value="value1" selected>010</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input id="phone1" name="phone1" type="number" maxlength="4" th:field="*{phone1}"
|
<input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}">
|
||||||
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input id="phone2" name="phone2" type="number" maxlength="4" th:field="*{phone2}"
|
<input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}">
|
||||||
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
|
</div>
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="invalid-feedback fw-bold"
|
<div class="invalid-feedback fw-bold"
|
||||||
|
|||||||
@@ -75,20 +75,23 @@
|
|||||||
</td>
|
</td>
|
||||||
<th><label for="name">전화번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
<th><label for="name">전화번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></label></th>
|
||||||
<td>
|
<td>
|
||||||
010-
|
<div class="d-flex">
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" required>
|
||||||
|
<option value="value1" selected>010</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input id="phone1" name="phone1" type="number" maxlength="4"
|
<input type="number" id="phone1" name="phone1" placeholder=""
|
||||||
th:value="${bindingVO.phone != null ? bindingVO.phone.substring(3, 7) : ''}"
|
th:value="${bindingVO.phone != null ? bindingVO.phone.substring(4, 8) : ''}">
|
||||||
th:classappend="${#fields.hasErrors('phone')} ? 'is-invalid'"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
-
|
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input id="phone2" name="phone2" type="number" maxlength="4"
|
<input type="number" id="phone2" name="phone2" placeholder=""
|
||||||
th:value="${bindingVO.phone != null ? bindingVO.phone.substring(7, 11) : ''}"
|
th:value="${bindingVO.phone != null ? bindingVO.phone.substring(9, 13) : ''}">
|
||||||
th:classappend="${#fields.hasErrors('phone')} ? 'is-invalid'"/>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="invalid-feedback fw-bold"
|
<div class="invalid-feedback fw-bold"
|
||||||
@@ -197,7 +200,7 @@
|
|||||||
const phone1 = $('#phone1').val();
|
const phone1 = $('#phone1').val();
|
||||||
const phone2 = $('#phone2').val();
|
const phone2 = $('#phone2').val();
|
||||||
if (phone1 && phone2) {
|
if (phone1 && phone2) {
|
||||||
$('#phone').val('010' + phone1 + phone2);
|
$('#phone').val('010-' + phone1 + "-" + phone2);
|
||||||
} else {
|
} else {
|
||||||
$('#phone').val('');
|
$('#phone').val('');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user