26 lines
685 B
HTML
26 lines
685 B
HTML
<a href="/admin"> go Back </a> <br>
|
|
|
|
<section id="traits">
|
|
{%for trait in traits%}
|
|
<section id="{{trait['id']}}">
|
|
<p> Name: </p>
|
|
<input class="name_input" value="{{trait['name']}}">
|
|
<p> Description: </p>
|
|
<input class="desc_input" value="{{trait['desc']}}">
|
|
</section>
|
|
{%endfor%}
|
|
</section>
|
|
<button onclick="addNewInput()">Add new</button>
|
|
|
|
<p>Images are viewable in the npc views</p>
|
|
|
|
<script>
|
|
|
|
function addNewInput(){
|
|
let newTrait = traits.lastElementChild.cloneNode(true);
|
|
newTrait.querySelector(".name_input").value = "";
|
|
newTrait.querySelector(".desc_input").value = "";
|
|
traits.appendChild(newTrait);
|
|
}
|
|
|
|
</script> |