{% extends "settings.html" %}
{% block title %}
<title>Configure {{url_for("jobs.user", username=job.owner.username)}}/#{{job.id}}
  &mdash; {{ cfg("sr.ht", "site-name") }}</title>
{% endblock %}
{% block content %}
<form class="row" method="POST">
  {{csrf_token()}}
  <div class="col-md-6 d-flex flex-column">
    <fieldset class="form-group">
      <legend>Job Visibility</legend>
      <div class="form-check">
        <label class="form-check-label">
          <input
            class="form-check-input"
            type="radio"
            name="visibility"
            value="PUBLIC"
            {% if job.visibility.value == "PUBLIC" %}
            checked
            {% endif %}
            > Public
          <small id="visibility-public-help" class="form-text text-muted">
            Shown on your profile page
          </small>
        </label>
      </div>
      <div class="form-check">
        <label
            class="form-check-label"
            title="Visible to anyone with the link, but not shown on your profile"
          >
          <input
            class="form-check-input"
            type="radio"
            name="visibility"
            value="UNLISTED"
            {% if job.visibility.value == "UNLISTED" %}
            checked
            {% endif %}
            > Unlisted
          <small id="visibility-unlisted-help" class="form-text text-muted">
            Visible to anyone who knows the URL, but not shown on your profile
          </small>
        </label>
      </div>
      <div class="form-check">
        <label
          class="form-check-label"
          title="Only visible to you and your collaborators"
        >
          <input
            class="form-check-input"
            type="radio"
            name="visibility"
            value="PRIVATE"
            {% if job.visibility.value == "PRIVATE" %}
            checked
            {% endif %}
            > Private
          <small id="visibility-unlisted-help" class="form-text text-muted">
            Only visible to you and your collaborators
          </small>
        </label>
      </div>
      <div class="form-group">
        <label for="tags">Tags</label>
        <input type="text" class="form-control" name="tags" value="{{job.tags}}" />
      </div>
    </fieldset>
    {{ valid.summary() }}
    <span class="pull-right">
      <button type="submit" class="btn btn-primary">
        Save {{icon("caret-right")}}
      </button>
    </span>
  </div>
</form>
{% endblock %}
