mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 22:48:03 +01:00
Align equipment update with damage reduction
This commit is contained in:
parent
3a949fe2d7
commit
1479a4fe53
3 changed files with 47 additions and 36 deletions
|
@ -1,12 +1,23 @@
|
||||||
<p class="card-text">
|
<div class="card" id="equipment">
|
||||||
|
<h5 class="card-header">
|
||||||
|
Équipement
|
||||||
<a hx-get="{% url "character:equipment_change" pk=character.pk %}"
|
<a hx-get="{% url "character:equipment_change" pk=character.pk %}"
|
||||||
hx-target="#equipment"
|
hx-target="#equipment"
|
||||||
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>
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
{{ character.equipment|linebreaksbr|default:"Rien ici..." }}
|
{{ character.equipment|linebreaksbr|default:"Rien ici..." }}
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
{{ character.money_pp }} pp,
|
||||||
|
{{ character.money_po }} po,
|
||||||
|
{{ character.money_pa }} pa,
|
||||||
|
{{ character.money_pc }} pc
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<form>
|
<form id="equipment">
|
||||||
<p>
|
<div class="card">
|
||||||
|
<h5 class="card-header">
|
||||||
|
Équipement
|
||||||
<a hx-post="{% url "character:equipment_change" pk=character.pk %}"
|
<a hx-post="{% url "character:equipment_change" pk=character.pk %}"
|
||||||
hx-target="#equipment"
|
hx-target="#equipment"
|
||||||
hx-swap="innerHTML"
|
hx-swap="innerHTML"
|
||||||
|
@ -7,7 +9,16 @@
|
||||||
>
|
>
|
||||||
<i class="fa-solid fa-save"></i> Save
|
<i class="fa-solid fa-save"></i> Save
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</h5>
|
||||||
|
<div class="card-body">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<textarea class="form-control" name="equipment" rows="10">{{ character.equipment }}</textarea>
|
<textarea class="form-control" name="equipment" rows="10">{{ character.equipment }}</textarea>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
{{ character.money_pp }} pp,
|
||||||
|
{{ character.money_po }} po,
|
||||||
|
{{ character.money_pa }} pa,
|
||||||
|
{{ character.money_pc }} pc
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -329,19 +329,8 @@
|
||||||
{% include "character/damage_reduction_display.html" %}
|
{% include "character/damage_reduction_display.html" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 col-lg-4 mb-3">
|
<div class="col-md-12 col-lg-4 mb-3">
|
||||||
<div class="card">
|
|
||||||
<h5 class="card-header">Équipement</h5>
|
|
||||||
<div class="card-body" id="equipment">
|
|
||||||
{% include "character/equipment_display.html" %}
|
{% include "character/equipment_display.html" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
|
||||||
{{ character.money_pp }} pp,
|
|
||||||
{{ character.money_po }} po,
|
|
||||||
{{ character.money_pa }} pa,
|
|
||||||
{{ character.money_pc }} pc
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<h4>Voies & Capacités</h4>
|
<h4>Voies & Capacités</h4>
|
||||||
<div class="row gy-3">
|
<div class="row gy-3">
|
||||||
|
|
Loading…
Reference in a new issue