mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
stuff working
This commit is contained in:
@@ -29,4 +29,22 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function openRecipe(id) {
|
||||
url = "{% url 'get_file_link' recipe_id=12345 %}".replace(/12345/, id);
|
||||
|
||||
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function () {
|
||||
if (this.readyState === 4 && this.status === 200) {
|
||||
console.log(this.response);
|
||||
window.open(this.responseText, '_blank');
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", url, true);
|
||||
xhttp.send();
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
19
cookbook/templates/storage/import.html
Normal file
19
cookbook/templates/storage/import.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
{% load django_tables2 %}
|
||||
|
||||
{% block title %}{% trans 'Import Recipes' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>
|
||||
{% trans 'Import Recipes' %}
|
||||
<small class="text-muted">{% trans 'Import Recipes from Dropbox Storage' %}</small>
|
||||
</h3>
|
||||
|
||||
<form method="POST" class="post-form">{% csrf_token %}
|
||||
{% crispy form %}
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user