{% import 'allura:templates/jinja_master/lib.html' as lib with context %}

  <form method="POST" action="update" enctype="multipart/form-data">
    <label class="grid-4">Name</label>
    <div class="grid-14">{{widget.display_field(widget.fields.name)}}</div>
    <label class="grid-4">Redirect</label>
    <div class="grid-14">{{widget.display_field(widget.fields.redirect)}}</div>
  {% if value.has_home_tool %}
    <label class="grid-4">Home Content (HTML)</label>
    <div class="grid-14">{{widget.display_field(widget.fields.homepage)}}</div>
    <label class="grid-4">Allow Browsing</label>
    <div class="grid-14">{{widget.display_field(widget.fields.allow_browse)}}</div>
  {% endif %}
    <label class="grid-4">Show Title</label>
    <div class="grid-14">{{widget.display_field(widget.fields.show_title)}}</div>
  {% if value.allow_custom_css %}
    <label class="grid-4">Custom CSS</label>
    <div class="grid-14">{{widget.display_field(widget.fields.css)}}</div>
  {% endif %}
    <label class="grid-4">Project Template</label>
    <div class="grid-14">{{widget.display_field(widget.fields.project_template)}}</div>
    <label class="grid-4">Icon</label>
    <div class="grid-14">
      {% if value.icon %}
        <img src="{{value.url()}}/icon" style="vertical-align: middle" alt=""/>
      {% endif %}
      {{widget.display_field(widget.fields.icon)}}
    </div>
    {% if value.features and value.features['google_analytics'] %}
    <label class="grid-4">Analytics Tracking ID</label>
    <div class="grid-14">{{widget.display_field(widget.fields.tracking_id)}}</div>
    {% endif %}
    <label class="grid-4">Project List URL</label>
    <div class="grid-14">{{widget.display_field(widget.fields.project_list_url)}}</div>
    <label class="grid-4">&nbsp;</label>
    <div class="grid-14"><input type="submit" value="Save"/></div>
  </form>
