<form role="form" method="post" class="form-inline"
      action="{{ url_for('api_rel_edit', graph=graph.id, rel=rel.id) }}">
    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
    <input type="hidden" name="other" value="{{ rel.other.id }}" />
    <div class="form-group">
        <p class="form-control-static name">{{ rel.other.name }}</p>
    </div>
    <div class="form-group">
        <select name="ltype" class="form-control input-sm">
            {% for rtype in rel_types %}
            <option value="{{ rtype }}"
                {% if rtype == rel.type_name %} selected {% endif %}
                >{{ rtype }}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form-group">
        <input name="dotted" type="checkbox" class="form-control input-sm"
               {% if rel.dotted %}checked{% endif %} />
    </div>
    <div class="form-group buttons">
        <button name="_method" value="PUT" data-loading-text="..."
                class="btn btn-sm btn-info" title="{{ _("Update") }}">
            <span class="glyphicon glyphicon-edit"></span>
        </button>
        <button name="_method" value="DELETE" data-loading-text="..."
                class="btn btn-sm btn-warning" title="{{ _("Delete") }}">
            <span class="glyphicon glyphicon-remove"></span>
        </button>
    </div>
</form>
