Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/misc/origin-save.html
{% extends "../layout.html" %} | {% extends "../layout.html" %} | ||||
{% comment %} | {% comment %} | ||||
Copyright (C) 2018-2019 The Software Heritage developers | Copyright (C) 2018-2021 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 %} | ||||
{% load render_bundle from webpack_loader %} | {% load render_bundle from webpack_loader %} | ||||
{% load static %} | {% load static %} | ||||
Show All 15 Lines | |||||
</p> | </p> | ||||
<form id="swh-save-origin-form" class="needs-validation" novalidate> | <form id="swh-save-origin-form" class="needs-validation" novalidate> | ||||
{% csrf_token %} | {% csrf_token %} | ||||
<div class="form-row"> | <div class="form-row"> | ||||
<div class="col-md-1"></div> | <div class="col-md-1"></div> | ||||
<div class="form-group col-md-2"> | <div class="form-group col-md-2"> | ||||
<label for="swh-input-visit-type">Origin type</label> | <label for="swh-input-visit-type">Origin type</label> | ||||
<select id="swh-input-visit-type" class="form-control" required> | <select id="swh-input-visit-type" class="form-control" required onchange="swh.save.maybeDisplayExtraInputs();"> | ||||
{% comment %} <option selected value="">Choose...</option> {% endcomment %} | {% comment %} <option selected value="">Choose...</option> {% endcomment %} | ||||
</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.save.validateSaveOriginUrl(this)" required> | <input type="text" class="form-control" id="swh-input-origin-url" oninput="swh.save.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 class="col-md-2"> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
<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> | ||||
</div> | </div> | ||||
anlambert: you should add a paragraph above explaining how the bundle loader is working and why the fields… | |||||
Done Inline Actionsa plain html paragraph you mean, right? ardumont: a plain html paragraph you mean, right? | |||||
Not Done Inline Actionsyes anlambert: yes | |||||
<div id="optional-origin-forms" class="form-row"><!-- hidden by span --> | |||||
<div class="col-md-1"></div> | |||||
<div class="form-group col-md-6"> | |||||
<label for="swh-input-artifact-url">Artifact url</label> | |||||
<input type="text" class="form-control" id="swh-input-artifact-url"> | |||||
</div> | |||||
<div class="form-group col-md-3"> | |||||
<label for="swh-input-artifact-filename">Artifact filename</label> | |||||
<input type="text" class="form-control" id="swh-input-artifact-filename"> | |||||
</div> | |||||
<div class="form-group col-md-1"> | |||||
<label for="swh-input-artifact-version">Artifact version</label> | |||||
Not Done Inline ActionsIf you explain in the paragraph that each row corresponds to artifact info, you can drop the Artifact prefix in the labels. anlambert: If you explain in the paragraph that each row corresponds to artifact info, you can drop the… | |||||
<input type="text" class="form-control" id="swh-input-artifact-version"> | |||||
</div> | |||||
Done Inline Actions@anlambert That dom part does not display as i'd like (all aligned in one row), no idea what's wrong though. I want them as ^ so the view would be unified with the initial input form. <artifact-url> <artifact-filename> <artifact-version> Instead of being one inlined row like: <artifact-url> <artifact-filename> <artifact-version> Any idea what's wrong from the top of your head? I tried stuff to no avail (use span, ardumont: @anlambert That dom part does not display as i'd like (all aligned in one row), no idea what's… | |||||
Done Inline Actionsthe flex style mentioned early on fixed that ^. ardumont: the `flex` style mentioned early on fixed that ^. | |||||
</div> | |||||
</form> | </form> | ||||
<div class="swh-processing-save-request text-center" style="display: none;"> | <div class="swh-processing-save-request text-center" style="display: none;"> | ||||
<img src="{% static 'img/swh-spinner.gif' %}"> | <img src="{% static 'img/swh-spinner.gif' %}"> | ||||
<p>Processing "save code now" request ...</p> | <p>Processing "save code now" request ...</p> | ||||
</div> | </div> | ||||
<div id="swh-origin-save-request-status"> | <div id="swh-origin-save-request-status"> | ||||
</div> | </div> | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | <div class="tab-content"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<script> | <script> | ||||
swh.webapp.initPage('origin-save'); | swh.webapp.initPage('origin-save'); | ||||
swh.save.initOriginSave(); | swh.save.initOriginSave(); | ||||
</script> | </script> | ||||
{% endblock %} | {% endblock %} | ||||
No newline at end of file |
you should add a paragraph above explaining how the bundle loader is working and why the fields below are required.