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