Skip to content

Commit

Permalink
nice
Browse files Browse the repository at this point in the history
  • Loading branch information
drunkwolfs committed Jun 23, 2024
1 parent f16fac1 commit 7720340
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
12 changes: 11 additions & 1 deletion common.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,19 @@ function addNumberInput(){
function newUserAdded(){
$(".js-example-basic-single").select2({disabled: true});
document.getElementById("deleteNewClientBtn").style.display = "block";
document.getElementById("telegramInput").style.display = "block";
document.getElementById("DeliveryAddress").removeAttribute("readonly");
document.getElementById("ContactInput").removeAttribute("readonly");
}

function deleteClient(){
document.getElementById("deleteNewClientBtn").style.display = "none";
document.getElementById("DeliveryAddress").value = "";
document.getElementById("ContactInput").value = "";
document.getElementById("DeliveryAddress").setAttribute("readonly", "readonly");
document.getElementById("ContactInput").setAttribute("readonly", "readonly");
$('.cmbUser2').val(null).trigger('change');
}

function initNumberCounter(){
$(document).ready(function() {
$('body').on('click', '.number-minus, .number-plus', function(){
Expand Down
10 changes: 7 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@
<td colspan="2">
<table id="userElements" class="center">
<tbody>
<tr id="telegramInput" style="display: none;">
<td><label for="name">Telegram:</label></td>
<td><input type="text" id="name" name="name"></td>
<tr id="ContactInput">
<td><label for="сontactTag">Контактные данные:</label></td>
<td><input type="text" id="сontactTag" name="сontactTag" readonly="readonly"></td>
</tr>
<tr id="DeliveryAddress">
<td><label for="deliveryTag">Адрес доставки:</label></td>
<td><input type="text" id="deliveryTag" name="deliveryTag" readonly="readonly"></td>
</tr>
</tbody>
</table>
</td>
Expand Down

0 comments on commit 7720340

Please sign in to comment.