mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-05 06:13:55 +01:00
Improve notes display & edit
This commit is contained in:
parent
3846778d00
commit
b12ea84db4
3 changed files with 30 additions and 27 deletions
|
@ -1,10 +1,13 @@
|
||||||
<p>
|
<div class="row" id="notes">
|
||||||
|
<h4 class="mt-3">
|
||||||
|
Notes
|
||||||
<a hx-get="{% url "character:notes_change" pk=character.pk %}"
|
<a hx-get="{% url "character:notes_change" pk=character.pk %}"
|
||||||
hx-target="#notes"
|
hx-target="#notes"
|
||||||
hx-swap="innerHTML"
|
hx-swap="outerHTML"
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-pen-to-square"></i> Edit
|
<i class="fa-solid fa-pen-to-square"></i> Edit
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</h4>
|
||||||
{{ character.notes|linebreaks }}
|
{{ character.notes|linebreaks }}
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
<div class="row" id="notes">
|
||||||
<form>
|
<form>
|
||||||
<p>
|
<h4 class="mt-3">
|
||||||
|
Notes
|
||||||
<a hx-post="{% url "character:notes_change" pk=character.pk %}"
|
<a hx-post="{% url "character:notes_change" pk=character.pk %}"
|
||||||
hx-target="#notes"
|
hx-target="#notes"
|
||||||
hx-swap="innerHTML"
|
hx-swap="innerHTML"
|
||||||
|
@ -7,7 +9,8 @@
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
<i class="fa-solid fa-save"></i> Save
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</h4>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<textarea class="form-control" name="notes" rows="10">{{ character.notes }}</textarea>
|
<textarea class="form-control" name="notes" rows="10">{{ character.notes }}</textarea>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
|
@ -361,8 +361,5 @@
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<h4 class="mt-3">Notes</h4>
|
|
||||||
<div class="row" id="notes">
|
|
||||||
{% include "character/notes_display.html" %}
|
{% include "character/notes_display.html" %}
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue