2020-08-27 01:44:06 +00:00
{% extends "base.html" %}
{% load static %}
2020-07-28 03:26:45 +00:00
{% load i18n %}
2019-04-22 23:07:39 +00:00
2020-07-28 03:26:45 +00:00
{% block breadcrumbs %}
< div class = "breadcrumbs" >
< a href = "{% url 'admin:index' %}" > {% trans 'Home' %}< / a >
{% if title %} › {{ title }}{% endif %}
< / div >
{% endblock %}
2020-07-01 17:23:59 +00:00
2020-08-27 01:44:06 +00:00
{% block extra_head %}
< link rel = "stylesheet" href = "{% static 'add.css' %}" / >
{% endblock %}
{% block body %}
2020-07-28 03:26:45 +00:00
< div style = "max-width: 550px; margin: auto; float: none" >
< br / > < br / >
{% if stdout %}
< h1 > Add new URLs to your archive: results< / h1 >
< pre id = "stdout" >
{{ stdout | safe }}
< br / > < br / >
< / pre >
< br / >
< center >
< a href = "/add" id = "submit" > Add more URLs ➕ < / a >
< / center >
{% else %}
2020-08-28 14:58:32 +00:00
< form id = "add-form" method = "POST" class = "p-form" > {% csrf_token %}
2020-07-28 03:26:45 +00:00
< h1 > Add new URLs to your archive< / h1 >
< br / >
{{ form.as_p }}
< center >
< button role = "submit" id = "submit" > Add URLs and archive ➕ < / button >
< / center >
2020-07-01 17:29:56 +00:00
< / form >
2020-07-28 03:26:45 +00:00
< br / > < br / > < br / >
< center id = "delay-warning" style = "display: none" >
< b > < i > This page will be unresponsive until the process is completely finished.< / i > < / b >
< br / > < br / >
< div >
Warning: it may take several minutes to finish adding!< br / >
< br / >
Progress will be displayed in the < code > archivebox server< / code > stdout,< br / >
and on this page once the archiving process completes.< br / >
< br / >
< small > (it's safe to leave this page, adding will continue in the background)< / small >
< / div >
< / center >
< script >
document.getElementById('add-form').addEventListener('submit', function(event) {
setTimeout(function() {
document.getElementById('add-form').innerHTML = '< center > < h3 > Adding URLs to index and running archive methods...< h3 > < br / > < div class = "loader" > < / div > < br / > (see terminal for progress)< / center > '
document.getElementById('delay-warning').style.display = 'block'
}, 200)
return true
})
< / script >
{% endif %}
< / div >
{% endblock %}
2020-07-01 17:23:59 +00:00
2020-07-28 03:26:45 +00:00
{% block sidebar %}{% endblock %}