summaryrefslogtreecommitdiff
path: root/templates/card/card_edit.twig
blob: a7f9aa71f05728a628111258e9a1fcf5d8364f75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{% extends 'card/card.twig' %}

{% block pagetitle %}
  Edit Card
{% endblock %}
{% block pagecontent %}
  <form action="/card/{{ card.id }}/edit" method="post" enctype="multipart/form-data">
    {% for meta in card.meta %}
      <p>
        <label>{{ meta.key }}</label><br>
        <input type="text" name="{{ meta.key }}" value="{{ meta.value }}">
      </p>
    {% endfor %}

    <input type="submit" value="Save">
  </form>

  <h4>Artworks</h4>
  {% for artwork in card.artworks %}
    <p>
      <img style='max-width: 100%; max-height:300px;' src='{{ artwork.path }}'>
      <button onclick="location.href='/artwork/{{ artwork.id }}/edit'">Edit</button>
      <button onclick="location.href='/artwork/{{ artwork.id }}'">Delete</button>
    </p>
  {% endfor %}
{% endblock %}