Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/browse/origin-save.html
{% extends "./layout.html" %} | {% extends "./layout.html" %} | ||||
{% comment %} | {% comment %} | ||||
Copyright (C) 2018 The Software Heritage developers | Copyright (C) 2018 The Software Heritage developers | ||||
See the AUTHORS file at the top-level directory of this distribution | See the AUTHORS file at the top-level directory of this distribution | ||||
License: GNU Affero General Public License version 3, or any later version | License: GNU Affero General Public License version 3, or any later version | ||||
See top-level LICENSE file for more information | See top-level LICENSE file for more information | ||||
{% endcomment %} | {% endcomment %} | ||||
{% block header %} | |||||
{{ block.super }} | |||||
{% if grecaptcha_activated %} | |||||
<script src="https://www.google.com/recaptcha/api.js"></script> | |||||
{% endif %} | |||||
{% endblock %} | |||||
{% block navbar-content %} | {% block navbar-content %} | ||||
<h4>Save code now</h4> | <h4>Save code now</h4> | ||||
{% endblock %} | {% endblock %} | ||||
{% block browse-content %} | {% block browse-content %} | ||||
<ul class="nav nav-tabs" style="padding-left: 5px;"> | <ul class="nav nav-tabs" style="padding-left: 5px;"> | ||||
<li class="nav-item"><a class="nav-link active" data-toggle="tab" id="swh-origin-save-request-create-tab" href="#swh-origin-save-requests-create">Create save request</a></li> | <li class="nav-item"><a class="nav-link active" data-toggle="tab" id="swh-origin-save-request-create-tab" href="#swh-origin-save-requests-create">Create save request</a></li> | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | <form id="swh-save-origin-form" class="needs-validation" novalidate> | ||||
</select> | </select> | ||||
<div class="invalid-feedback">The origin type must be specified</div> | <div class="invalid-feedback">The origin type must be specified</div> | ||||
</div> | </div> | ||||
<div class="form-group col-md-6"> | <div class="form-group col-md-6"> | ||||
<label for="swh-input-origin-url">Origin url</label> | <label for="swh-input-origin-url">Origin url</label> | ||||
<input type="text" class="form-control" id="swh-input-origin-url" oninput="swh.browse.validateSaveOriginUrl(this)" required> | <input type="text" class="form-control" id="swh-input-origin-url" oninput="swh.browse.validateSaveOriginUrl(this)" required> | ||||
<div class="invalid-feedback">The origin url is not valid or does not reference a code repository</div> | <div class="invalid-feedback">The origin url is not valid or does not reference a code repository</div> | ||||
</div> | </div> | ||||
<div class="col-md-2"></div> | <div class="col-md-2"> | ||||
{% if not grecaptcha_activated %} | |||||
<div class="form-group"> | |||||
<label for="swh-input-origin-save-submit">​</label> | |||||
<button type="submit" id="swh-input-origin-save-submit" class="btn btn-default btn-block">Submit</button> | |||||
</div> | |||||
{% endif %} | |||||
</div> | |||||
</div> | </div> | ||||
{% if grecaptcha_activated %} | |||||
<div class="form-row"> | <div class="form-row"> | ||||
<div class="col-md-2"></div> | <div class="col-md-2"></div> | ||||
<div class="form-group col-md-4"> | <div class="form-group col-md-4"> | ||||
<div class="g-recaptcha" id="save-origin-recaptcha" data-sitekey="{{ grecaptcha_site_key }}"></div> | <div class="g-recaptcha" id="save-origin-recaptcha" data-sitekey="{{ grecaptcha_site_key }}"></div> | ||||
</div> | </div> | ||||
<div class="form-group col-md-1"> | <div class="form-group col-md-1"> | ||||
<label for="swh-input-origin-save-submit">​</label> | <label for="swh-input-origin-save-submit">​</label> | ||||
<button type="submit" id="swh-input-origin-save-submit" class="btn btn-default btn-block">Submit</button> | <button type="submit" id="swh-input-origin-save-submit" class="btn btn-default btn-block">Submit</button> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{% endif %} | |||||
</form> | </form> | ||||
<div id="swh-origin-save-request-status"> | <div id="swh-origin-save-request-status"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div id="swh-origin-save-requests-list" class="tab-pane mt-3"> | <div id="swh-origin-save-requests-list" class="tab-pane mt-3"> | ||||
<table id="swh-origin-save-requests" class="table swh-table swh-table-striped" width="100%"> | <table id="swh-origin-save-requests" class="table swh-table swh-table-striped" width="100%"> | ||||
<thead> | <thead> | ||||
Show All 10 Lines | |||||
</div> | </div> | ||||
<script> | <script> | ||||
swh.webapp.initPage('origin-save'); | swh.webapp.initPage('origin-save'); | ||||
swh.browse.initOriginSave(); | swh.browse.initOriginSave(); | ||||
</script> | </script> | ||||
{% endblock %} | {% endblock %} | ||||
No newline at end of file | No newline at end of file |