aboutsummaryrefslogtreecommitdiffstats
path: root/templates/gitrefinery/editrepo.html
blob: 714a481da298b294e5f0e78a6fd9e041967720b5 (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
54
55
{% extends "base.html" %}
{% load i18n %}
{% load static %}

{% comment %}

  git-refinery-web - edit repo page template

  Copyright (C) 2017 Intel Corporation
  Licensed under the MIT license, see COPYING.MIT for details

{% endcomment %}


<!--
{% block title_append %} - {% if form.instance.pk %}edit repo{% else %}add repo{% endif %} {% endblock %}
-->



{% block content %}
{% autoescape on %}

        <ul class="breadcrumb">
            <li><a href="{% url 'repositories' %}">repositories</a> <span class="divider">&rarr;</span></li>
            <li class="active">{% if form.instance.pk %}{{ form.instance.name }}{% else %}add repo{% endif %}</li>
        </ul>

        <div class="container-fluid">
            <div class="row">
                <div class="page-header">
                    <h1>{% if form.instance.pk %}Edit {{ form.instance.name }}{% else %}Add repository{% endif %}</h1>
                </div>
            </div> <!--  end of row -->
        </div> <!-- end of container-fluid -->


<form id="edit_repo_form" method="post">
    {% csrf_token %}
    {{ form.as_p }}
<input type="submit" value="Save" class='btn btn-primary' />
<a href="{% if form.instance.pk %}{% url 'repository' form.instance.name %}{% else %}{% url 'repositories' %}{% endif %}" class='btn btn-default'>Cancel</a>
</form>

{% endautoescape %}

{% endblock %}

{% block scripts %}
<script>
    $(document).ready(function() {
        $("#edit_repo_form input:text, #edit_repo_form textarea").first().focus();
    });
</script>
{% endblock %}