mirror of
https://github.com/sb745/NyaaV3.git
synced 2025-03-12 22:06:55 +02:00
103 lines
3.5 KiB
HTML
Executable file
103 lines
3.5 KiB
HTML
Executable file
{% extends "layout.html" %}
|
|
{% block title %}Upload Torrent :: {{ config.SITE_NAME }}{% endblock %}
|
|
{% block body %}
|
|
{% from "_formhelpers.html" import render_field %}
|
|
{% from "_formhelpers.html" import render_upload %}
|
|
{% from "_formhelpers.html" import render_markdown_editor %}
|
|
|
|
<h1>Upload Torrent</h1>
|
|
|
|
{% if not g.user %}
|
|
<p>You are not logged in, and are uploading anonymously.</p>
|
|
{% endif %}
|
|
|
|
|
|
<div id="upload-drop-zone"><span>Drop here!</span></div>
|
|
<form method="POST" enctype="multipart/form-data">
|
|
{{ upload_form.csrf_token }}
|
|
|
|
{% if config.ENFORCE_MAIN_ANNOUNCE_URL %}<p><strong>Important:</strong> Please include <kbd>{{ config.MAIN_ANNOUNCE_URL }}</kbd> in your trackers</p>{% endif %}
|
|
<div class="row">
|
|
<div class="col-xl-6">
|
|
{{ render_upload(upload_form.torrent_file, accept=".torrent") }}
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xl-6">
|
|
{{ render_field(upload_form.display_name, class_='form-control', placeholder='Display name') }}
|
|
</div>
|
|
<div class="col-xl-4">
|
|
{{ render_field(upload_form.category, class_='form-control')}}
|
|
</div>
|
|
</div>
|
|
<div class="row"></div>
|
|
<div class="row form-group">
|
|
<div class="col-xl-6">
|
|
{{ render_field(upload_form.information, class_='form-control', placeholder='Your website or IRC channel') }}
|
|
</div>
|
|
<div class="col-xl-6">
|
|
<label class="control-label">Torrent flags</label><br>
|
|
|
|
<div class="btn-group" data-toggle="buttons">
|
|
<label class="btn btn-default {% if not g.user %}active disabled{% endif %}" title="Upload torrent anonymously (don't display your username)">
|
|
{{ upload_form.is_anonymous(disabled=(False if g.user else ""), checked=(False if g.user else "")) }}
|
|
{% if not g.user %}<span class="glyphicon glyphicon-asterisk"></span>{% endif %}
|
|
{% if g.user %}<span class="glyphicon glyphicon-check"></span>{% endif %}
|
|
{% if g.user %}<span class="glyphicon glyphicon-unchecked"></span>{% endif %}
|
|
Anonymous
|
|
</label>
|
|
<label class="btn btn-grey" title="Hide torrent from listing">
|
|
{{ upload_form.is_hidden }}
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
<span class="glyphicon glyphicon-unchecked"></span>
|
|
Hidden
|
|
</label>
|
|
<label class="btn btn-danger" title="This torrent is derived from another release">
|
|
{{ upload_form.is_remake }}
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
<span class="glyphicon glyphicon-unchecked"></span>
|
|
Remake
|
|
</label>
|
|
<label class="btn btn-warning" title="This torrent is a complete batch (eg. season)">
|
|
{{ upload_form.is_complete }}
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
<span class="glyphicon glyphicon-unchecked"></span>
|
|
Complete
|
|
</label>
|
|
{% if g.user.is_trusted %}
|
|
<label class="btn btn-success active" title="Mark torrent trusted">
|
|
{{ upload_form.is_trusted(checked="") }}
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
<span class="glyphicon glyphicon-unchecked"></span>
|
|
Trusted
|
|
</label>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xl-12">
|
|
{{ render_markdown_editor(upload_form.description, field_name='description') }}
|
|
</div>
|
|
</div>
|
|
|
|
{% if config.USE_RECAPTCHA and not g.user %}
|
|
<div class="row">
|
|
<div class="col-xl-4">
|
|
{% for error in upload_form.recaptcha.errors %}
|
|
{{ error }}
|
|
{% endfor %}
|
|
{{ upload_form.recaptcha }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<br>
|
|
|
|
<div class="row">
|
|
<div class="form-group col-xl-6">
|
|
<input type="submit" value="Upload" class="btn btn-primary">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|