mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 14:59:02 +00:00
Change ES settings, big refactor, removed recaptcha
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
|
||||
{% if show_captcha %}
|
||||
{{ recaptcha.get_code()|safe }}
|
||||
{{ captcha.get_code()|safe }}
|
||||
{% endif %}
|
||||
|
||||
<input type="submit" value="Login">
|
||||
|
||||
@@ -30,20 +30,12 @@
|
||||
<input class="form-control" name="q" id="q" placeholder="Query">
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
{% if show_captcha %}
|
||||
<script>function f(token) {
|
||||
document.getElementById("sfrm").submit();
|
||||
}</script>
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<button class="g-recaptcha btn btn-primary btn-shadow"
|
||||
data-sitekey="6LcCXWkUAAAAAJo2NR9_m09Obn5YmDrI97sGrr2f" data-callback="f">Search
|
||||
</button>
|
||||
{% else %}
|
||||
<input class="btn btn-primary btn-shadow" type="submit" value="Search">
|
||||
{% endif %}
|
||||
<input class="btn btn-primary btn-shadow" type="submit" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if show_captcha %}
|
||||
{{ captcha.get_code()|safe }}
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -110,21 +110,13 @@
|
||||
{# Search button #}
|
||||
<div class="form-group col-md-7">
|
||||
|
||||
{% if show_captcha %}
|
||||
<script>function f(token) {
|
||||
document.getElementById("sfrm").submit();
|
||||
}</script>
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<button id="s" class="g-recaptcha btn btn-primary btn-shadow"
|
||||
data-sitekey="6LcCXWkUAAAAAJo2NR9_m09Obn5YmDrI97sGrr2f" data-callback="f"
|
||||
style="float: right" onclick="document.getElementById('page').value = 0">Search
|
||||
</button>
|
||||
{% else %}
|
||||
<input id="s" class="btn btn-primary btn-shadow" type="submit" value="Search"
|
||||
style="float: right">
|
||||
{% endif %}
|
||||
<input id="s" class="btn btn-primary btn-shadow" type="submit" value="Search"
|
||||
style="float: right">
|
||||
</div>
|
||||
</div>
|
||||
{% if show_captcha %}
|
||||
{{ captcha.get_code()|safe }}
|
||||
{% endif %}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@@ -280,20 +272,12 @@
|
||||
//Next button
|
||||
function nextPage() {
|
||||
document.getElementById("page").value = parseInt(document.getElementById("page").value) + 1;
|
||||
{% if show_captcha %}
|
||||
grecaptcha.execute();
|
||||
{% else %}
|
||||
document.getElementById("sfrm").submit()
|
||||
{% endif %}
|
||||
document.getElementById("sfrm").submit();
|
||||
}
|
||||
|
||||
function prevPage() {
|
||||
document.getElementById("page").value = parseInt(document.getElementById("page").value) - 1;
|
||||
{% if show_captcha %}
|
||||
grecaptcha.execute();
|
||||
{% else %}
|
||||
document.getElementById("sfrm").submit()
|
||||
{% endif %}
|
||||
document.getElementById("sfrm").submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -3,15 +3,17 @@
|
||||
{% set current_page = "submit" %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container" >
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs card-header-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="normal-tab" data-toggle="tab" href="#normal" role="tab" aria-controls="normal" aria-selected="true">Single website</a>
|
||||
<a class="nav-link active" id="normal-tab" data-toggle="tab" href="#normal" role="tab"
|
||||
aria-controls="normal" aria-selected="true">Single website</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="bulk-tab" data-toggle="tab" href="#bulk" role="tab" aria-controls="bulk" aria-selected="false">Bulk</a>
|
||||
<a class="nav-link" id="bulk-tab" data-toggle="tab" href="#bulk" role="tab" aria-controls="bulk"
|
||||
aria-selected="false">Bulk</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -24,16 +26,12 @@
|
||||
<div class="form-group">
|
||||
<input class="form-control" name="url" id="url" placeholder="URL">
|
||||
</div>
|
||||
<div class="row">
|
||||
{% if show_captcha %}
|
||||
<div class="col">
|
||||
{{ recaptcha.get_code()|safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col">
|
||||
<input class="btn btn-primary" type="submit" value="Submit" title="Submit open directory">
|
||||
{% if show_captcha %}
|
||||
<div class="form-row">
|
||||
{{ captcha.get_code()|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<input class="btn btn-primary" type="submit" value="Submit" title="Submit open directory">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@@ -41,18 +39,17 @@
|
||||
{# Bulk #}
|
||||
<form action="/enqueue_bulk" method="POST">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" name="urls" id="urls" rows="10" placeholder="One URL per line, max. 10"></textarea>
|
||||
<textarea class="form-control" name="urls" id="urls" rows="10"
|
||||
placeholder="One URL per line, max. 10"></textarea>
|
||||
</div>
|
||||
<div class="row">
|
||||
{% if show_captcha %}
|
||||
<div class="col">
|
||||
{{ recaptcha.get_code()|safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col">
|
||||
<input class="btn btn-primary" type="submit" value="Submit" title="Submit open directories">
|
||||
{% if show_captcha %}
|
||||
<div class="form-row">
|
||||
{{ captcha.get_code()|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<input class="btn btn-primary" type="submit" value="Submit"
|
||||
title="Submit open directories">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,26 +68,26 @@
|
||||
<div class="card-header">Queued websites</div>
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Url</th>
|
||||
<th>Priority</th>
|
||||
<th>Task type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Url</th>
|
||||
<th>Priority</th>
|
||||
<th>Task type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for task in queue %}
|
||||
<tr>
|
||||
<td title="{{ task.url }}">{{ task.url | truncate(70)}}</td>
|
||||
<td>{{ task.priority }}</td>
|
||||
<td>{{ task.callback_type if task.callback_type else "NORMAL" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tbody>
|
||||
{% for task in queue %}
|
||||
<tr>
|
||||
<td title="{{ task.url }}">{{ task.url | truncate(70) }}</td>
|
||||
<td>{{ task.priority }}</td>
|
||||
<td>{{ task.callback_type if task.callback_type else "NORMAL" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user