put the cost in the house change warning

master
Aevann 2023-10-04 19:58:10 +03:00
parent 7ee0488a86
commit ff155f0499
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ for (const element of setting_selects) {
}
element.addEventListener('change', () => {
if (element.id == "changing-house") {
if (confirm('Are you sure you want to change houses?')) {
if (confirm(`Are you sure you want to change houses?\nIt will cost you ${element.dataset.cost} coins or marseybux!`)) {
postToastReload(element,`/settings/personal?${element.name}=${element.value}`);
}
}

View File

@ -100,7 +100,7 @@
<p>Join a house (cost: {{cost}} coins or marseybux).</p>
{% endif %}
<div class="input-group">
<select id="changing-house"{% if cost > v.coins + v.marseybux or v.bite %}disabled{% endif %} autocomplete="off" id='house' class="form-control setting_select" form="profile-settings" name="house" data-nonce="{{g.nonce}}" data-reload="1">
<select data-cost="{{cost}}" id="changing-house"{% if cost > v.coins + v.marseybux or v.bite %}disabled{% endif %} autocomplete="off" id='house' class="form-control setting_select" form="profile-settings" name="house" data-nonce="{{g.nonce}}" data-reload="1">
{% for entry in HOUSES %}
<option value="{{entry}}" {% if v.house.startswith(entry) %} selected {% endif %}>
{{entry}}