1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-09 07:25:21 +02:00

add confirmation

This commit is contained in:
Murod Khaydarov 2019-01-25 03:29:48 +03:00
parent f7cb2406d7
commit d6209f8578
No known key found for this signature in database
GPG key ID: C480BA53A8D274C5
3 changed files with 7 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -64,6 +64,11 @@ export default class Writing {
if (this.nodes.removeButton) { if (this.nodes.removeButton) {
this.nodes.removeButton.addEventListener('click', () => { this.nodes.removeButton.addEventListener('click', () => {
const isUserAgree = confirm("Are you sure?");
if (!isUserAgree) {
return
}
this.removeButtonClicked(); this.removeButtonClicked();
}); });
} }

View file

@ -53,9 +53,7 @@
{% endif %} {% endif %}
</div> </div>
{% if page is not empty %} {% if page is not empty %}
<main> <p><input type="text" class="uri-input" name="uri-input" placeholder="Uri(Optional)" value="{{ page.uri }}"></p>
<input type="text" class="uri-input" name="uri-input" placeholder="Uri(Optional)" value="{{ page.uri }}">
</main>
{% endif %} {% endif %}
</section> </section>
{% endblock %} {% endblock %}