diff --git a/.gitignore b/.gitignore
index d064533..c468a2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ Pipfile.lock
**/work_data/*
**/__pycache__/*
coinmanager/static/*
+coinmanager/db.sqlite3
diff --git a/ISSUES b/ISSUES
index 1a016da..1caf580 100644
--- a/ISSUES
+++ b/ISSUES
@@ -1,22 +1,15 @@
# griechenland
-- 2015: 2€ sondermünze mit Titel "85-15 Gr. Demokratie" gibts nicht
-- hier gibts 2 x das jahr 2016, ich habe die untere genommen
+- 2015 sondermünze: Titel "85-15 Gr. Demokratie" gibts nicht
+- 2 x zeile 2016, ich habe die untere genommen
# irland
-- 2006, 20 Cent: hier steht ein A, was heißt das?
+- 2006 20 Cent: hier steht A
# italien
-- was bedeutet die blaue kreuz farbe? insbesondere 2012 2 cent wurde von lea gefunden (und jeanette?).
-- 2010 sondermünze 1: was heißt a?
-
-# malta
-- auch hier ist wieder die blaue kreuz farbe
+- 2010 sondermünze 1: hier steht a
# Niederlande
-- 2007 sondermünze hjier steht ein F
-
-# slowenien
-- auch hier ist wieder die blaue kreuz farbe
+- 2007 sondermünze: hier steht F
# blaue kreuze
zypern, slowenien, malta, italien
diff --git a/coinmanager/coinc/static/coinc/main.js b/coinmanager/coinc/static/coinc/main.js
index f723641..f12b186 100644
--- a/coinmanager/coinc/static/coinc/main.js
+++ b/coinmanager/coinc/static/coinc/main.js
@@ -231,6 +231,45 @@ $(document).ready(function() {
// Buttons
//
+ // login
+ $('#do_login').click(function() {
+ let modal = new Modal('login', login);
+ modal.show();
+ });
+
+ function login(args, form_data) {
+ $.ajax({
+ type: 'POST',
+ url: '/coinc/accounts/login/',
+ data: form_data,
+ success: function(response) {
+ window.open(window.location.href, '_self');
+ //detach('#login');
+ //$('button#do_login').addClass('d-none');
+ //$('button#begin_edit').removeClass('d-none');
+ //$('button#do_logout').removeClass('d-none');
+ }
+ });
+
+ }
+
+ // logout
+ $('#do_logout').click(function() {
+ let data = { csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val() };
+ $.ajax({
+ type: 'POST',
+ data: data,
+ url: '/coinc/accounts/logout/',
+ success: function(response) {
+ window.open(window.location.href, '_self');
+ //detach('login');
+ //$('button#do_logout').addClass('d-none');
+ //$('button#begin_edit').addClass('d-none');
+ //$('button#do_login').removeClass('d-none');
+ }
+ });
+ });
+
// go home
$('thead tr:first-child th').click(function() {
diff --git a/coinmanager/coinc/static/coinc/modules/modal.mjs b/coinmanager/coinc/static/coinc/modules/modal.mjs
index 2a71e05..b5bebd6 100644
--- a/coinmanager/coinc/static/coinc/modules/modal.mjs
+++ b/coinmanager/coinc/static/coinc/modules/modal.mjs
@@ -93,7 +93,9 @@ class Modal {
/*submit modal */
submit() {
let response = {};
- $(this.div + ' input[type=text]').each(function() {
+ $(this.div + ' input[type=text], ' +
+ this.div + ' input[type=password], ' +
+ this.div + ' input[type=hidden]').each(function() {
response[$(this).attr('name')] = $(this).val();
});
this.callback(this.callback_arguments, response);
diff --git a/coinmanager/coinc/static/coinc/styles.css b/coinmanager/coinc/static/coinc/styles.css
index 16c5e2c..acd1663 100644
--- a/coinmanager/coinc/static/coinc/styles.css
+++ b/coinmanager/coinc/static/coinc/styles.css
@@ -47,9 +47,9 @@ a:visited {
/* Controlbar */
-button#begin_edit {
+div#button_control {
position: fixed;
- z-index: 1060;
+ z-index: 1030;
right: 15px;
bottom: 15px;
}
diff --git a/coinmanager/coinc/templates/coinc/controlbar.html b/coinmanager/coinc/templates/coinc/controlbar.html
index 9387442..0dd940f 100644
--- a/coinmanager/coinc/templates/coinc/controlbar.html
+++ b/coinmanager/coinc/templates/coinc/controlbar.html
@@ -2,7 +2,15 @@
div.{{ user.name }} { background-color: {{ user.color }} !important; }{% endfor %}
-
+
+ {% csrf_token %}
+ {% if user.is_authenticated %}
+
+
+ {% else %}
+
+ {% endif %}
+