diff --git a/TODO b/TODO index c350cd0..63fab3c 100755 --- a/TODO +++ b/TODO @@ -3,10 +3,11 @@ * tokens + ban system * remember me * htmlspecialchars => on users objects +* handle negative amounts +* Refactor load method to avoir load_* methods ! install.php : ============= -* Link beside password field to toggle visible / not visible * TRUNCATE before CREATE TABLE in install.php inc/Invoices.class.php : @@ -20,10 +21,11 @@ index.php?do=new_invoice : ========================== * Improve date handling for form display * Onchange not working as wanted +* Handle date/months index.php?do=settings : ======================= * Prefill the timezone field -* Fill the fields with POST -* Handle checkboxes in PHP ? -* JavaScript to handle singular / plural + months + +Manage paybacks : +================= diff --git a/index.php b/index.php index 0b8e850..11e5774 100644 --- a/index.php +++ b/index.php @@ -268,6 +268,17 @@ $tpl->draw('new_invoice'); break; + case 'delete_invoice': + if(!empty($_GET['id'])) { + $invoice = new Invoice(); + $invoice->setId($_GET['id']); + $invoice->delete(); + + header('location: index.php'); + exit(); + } + break; + default: $users_list = new User(); $users_list = $users_list->load_users(); diff --git a/install.php b/install.php index e0ecfba..0771dad 100644 --- a/install.php +++ b/install.php @@ -83,6 +83,7 @@ Bouffe@Ulm - Installation +

Bouffe@Ulm - Installation

@@ -101,7 +102,7 @@

-

+

Toggle visible


Note : You must create this database first. @@ -126,7 +127,7 @@ Administrator

/>

/>

-

+

Toggle visible

type="submit" value="Install">

diff --git a/tmp/settings.af3906cfde643ae7f290cfdc51cc9342.rtpl.php b/tmp/settings.af3906cfde643ae7f290cfdc51cc9342.rtpl.php index c617c6a..fca6810 100755 --- a/tmp/settings.af3906cfde643ae7f290cfdc51cc9342.rtpl.php +++ b/tmp/settings.af3906cfde643ae7f290cfdc51cc9342.rtpl.php @@ -25,7 +25,7 @@

-
+ Toggle visible
Note : Leave the above field blank if you don't want to change your password.

@@ -44,6 +44,10 @@ Note : This is the base URL from which you access this page. You must keep the trailing "/" in the above address.

+

+
+ For example : Europe/Paris. See the doc for more info. +

diff --git a/tpl/js/main.js b/tpl/js/main.js index 48608e0..cb6bb80 100644 --- a/tpl/js/main.js +++ b/tpl/js/main.js @@ -8,3 +8,10 @@ function guest_user_label(id) { else document.getElementById('guest_user_'+id+'_label').innerHTML = ' guest'; } + +function toggle_password(id) { + if(document.getElementById(id).type == 'password') + document.getElementById(id).type = 'text'; + else + document.getElementById(id).type = 'password'; +} diff --git a/tpl/settings.html b/tpl/settings.html index d5f2e3a..19b57af 100644 --- a/tpl/settings.html +++ b/tpl/settings.html @@ -22,7 +22,7 @@

-
+ Toggle visible
Note : Leave the above field blank if you don't want to change your password.