format xml and mke the warning better

This commit is contained in:
aronwk-aaron 2023-11-11 00:09:34 -06:00
parent a10b8d7975
commit bb63cfb8f5
2 changed files with 15 additions and 3 deletions

View File

@ -238,7 +238,7 @@ def upload(id):
flash("You accept all consequences from these actions", "danger")
log_audit(f"Updated {character_data.id}'s xml data")
return redirect(url_for('characters.view', id=id))
form.char_xml.data = character_data.xml_data
form.char_xml.data = ET.tostring(ET.indent(ET.XML(character_data.xml_data)), encoding='unicode')
return render_template("character/upload.html.j2", form=form)

View File

@ -9,10 +9,22 @@
{% endblock content_before %}
{% block content %}
<h3 style="color: orange;">PROCEED WITH CAUTION</h3>
<style>
.blink {
animation: blinker .5s linear infinite;
color: red;
font-family: sans-serif;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
</style>
<h3 class="text-center blink">PROCEED WITH CAUTION</h3>
<form method=post>
{{ form.csrf_token }}
<div class="card shadow-sm mx-auto pb-3 bg-dark border-primary" style="width: 20rem;">
<div class="card shadow-sm mx-auto pb-3 bg-dark border-primary" >
<div class="card-body">
{{ helper.render_field(form.char_xml) }}
{{ helper.render_submit_field(form.submit) }}