Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/apps/bandwagon/templates/bandwagon/includes/addedit.html
blob: 5a47825a66e16234c774007b941b9192b0b3afa1 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{{ csrf() }}

<div class="content">
  <h3>{{ _('Collection Description') }}</h3>
</div>
<fieldset>
  {{ field(form.name, _('Name:'), class='long') }}
  {% if form.slug %}
    <p id="collection-form-slug">
      {{ form.errors['slug']|safe }}
      <label>{{ form.slug.label|safe }}</label>
      {% set username = collection.author_username if collection else amo_user.username %}
      {% set slug_base = url('collections.user', username)|absolutify %}
      <span id="slug_edit"><span>{{ slug_base }}</span>{{ form.slug|safe }}</span>
      <span id="slug_readonly">
        {{ slug_base }}<span id="slug_value">{% if collection and collection.slug %}{{ collection.slug }}{% endif %}</span>
        <a id="edit_slug" href="#">{{ _('Edit') }}</a>
      </span>
    </p>
  {% endif %}
  <p>
    <label for="id_description">{{ form.description.label|safe }}</label> {{ _('(optional)') }}
    {{ form.description|safe }}
  </p>
    {{ form.icon|safe }}
  <div id="collection_listed">
    <label>{{ form.listed.label }}</label>
    {{ form.listed|safe }}
  </div>

  <div id="icon_form">
    <label for="id_icon">{{ form.icon.label|safe }}</label> {{ _('(optional)') }}
    <div id="icon_upload">
      {% if collection %}
        <div class="icon_preview">
          <img src="{{ collection.icon_url }}" alt="{{ _('Collection Icon') }}" />
         {% if collection.icontype %}
          <a href="{{ collection.delete_icon_url() }}" id="remove_icon">{{ _('Reset') }}</a>
          {% endif %}
        </div>
      {% endif %}

      {{ form.errors['icon']|safe }}
      {{ form.icon|safe }}

      <p class="note">
      {{ _('PNG and JPG supported.  Image will be resized to 32x32.') }}
      </p>
    </div>
  </div>

 </fieldset>