{% extends "repo_master.html" %}
{% from "_formhelper.html" import render_field_in_row %}
{% block title %}Remote Pull request {{ repo.name }}{% endblock %}
{% set tag = "home" %}
{% block repo %}
<h2>New remote pull-request</h2>
<p>
Remote pull-requests are pull-requests made from a project *not* hosted
on pagure or not hosted on the same pagure instance than the target project,
hosted on pagure.
</p>
<p>
If you wish to create a pull-request from a fork to a project on pagure,
visit your fork, go to the branch where you pushed your changes, it will
show the commits that can be merged with a red asterisk and click on the
"Pull-Request" button.
</p>
{% if form %}
<section class="new_project">
<form action="{{ url_for('.new_remote_request_pull', username=username,
repo=repo.name) }}" method="post">
<table>
{{ render_field_in_row(form.title, size=80) }}
{{ render_field_in_row(form.git_repo, size=80) }}
{{ render_field_in_row(form.branch_from, size=80) }}
<tr>
<td>To branch</td>
<td>
<select id="branch_select" name="branch_to">
{% if branch_to %}<option>{{ branch_to }}</option>{% endif %}
{% for branch in branches |reverse %}
{% if not branch_to or branch != branch_to %}
<option>{{ branch }}</option>
{% endif %}
{% endfor %}
</select>
</td>
</tr>
</table>
<p class="buttons indent">
<input type="submit" class="submit positive button" value="Preview">
{{ form.csrf_token }}
<a href="{{ url_for('view_repo', username=username, repo=repo.name)}}">
<input type="button" value="Cancel" />
</a>
</p>
</form>
</section>
{% endif %}
{% endblock %}