{% extends "base.html" %}

{% block title %}
	{{ _("Configure Git Update Detection") }} - {{ package.title }}
{% endblock %}

{% block content %}
	<a class="btn btn-secondary float-right" href="/help/update_config/">Help</a>
	<h1>{{ _("Configure Git Update Detection") }}</h1>

	<p>
		{{ _("When you push a change to your Git repository, ContentDB can create a new release automatically or send you a reminder.") }}
	</p>

	<p>
		{{ _("ContentDB will poll your Git repository every day, if your package is approved.") }}
		{{ _("You should consider using webhooks or the API for faster releases.") }}
	</p>

	{% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field %}
	<form method="POST" action="">
		{{ form.hidden_tag() }}

		{{ render_field(form.trigger, class_="mt-5") }}

		{{ render_field(form.ref, placeholder="Leave blank to use default branch",
				pattern="[A-Za-z0-9/._-]+") }}

		<p class="text-muted mb-4 mt-0">
			<small>
				<span class="fas fa-info mx-1"></span>

				{{ _("Currently, the branch name field is only used by the New Commit trigger.") }}
			</small>
		</p>


		{{ render_field(form.action) }}

		<p class="mt-5">
			{{ render_submit_field(form.submit) }}
			{{ render_submit_field(form.disable, class_="btn btn-secondary ml-2") }}
		</p>
	</form>
{% endblock %}
