Delete invoice ability. Need to think about storage system to finish invoice system...
This commit is contained in:
parent
52f6b7fc52
commit
90d533dd1c
10
TODO
10
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 :
|
||||
=================
|
||||
|
11
index.php
11
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();
|
||||
|
@ -83,6 +83,7 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Bouffe@Ulm - Installation</title>
|
||||
<link rel="stylesheet" media="screen" type="text/css" href="tpl/css/style.css" />
|
||||
<script type="text/javascript" src="tpl/js/main.js"></script>
|
||||
</head>
|
||||
<body id="install">
|
||||
<h1 class="center">Bouffe@Ulm - Installation</h1>
|
||||
@ -101,7 +102,7 @@
|
||||
<p><label for="mysql_host">MySQL host : </label><input type="text" name="mysql_host" id="mysql_host" value="<?php echo (!empty($_POST['mysql_host'])) ? htmlspecialchars($_POST['mysql_host']) : 'localhost';?>"/></p>
|
||||
|
||||
<p><label for="mysql_login">MySQL login : </label><input type="text" name="mysql_login" id="mysql_login" value="<?php echo (!empty($_POST['mysql_login'])) ? htmlspecialchars($_POST['mysql_login']) : '';?>"/></p>
|
||||
<p><label for="mysql_password">MySQL password : </label><input type="password" name="mysql_password" id="mysql_password"/></p>
|
||||
<p><label for="mysql_password">MySQL password : </label><input type="password" name="mysql_password" id="mysql_password"/> <a href="" onclick="toggle_password('mysql_password'); return false;"><img src="img/toggle_password.jpg" alt="Toggle visible"/></a></p>
|
||||
<p>
|
||||
<label for="mysql_db">Name of the MySQL database to use : </label><input type="text" name="mysql_db" id="mysql_db" value="<?php echo (!empty($_POST['mysql_db'])) ? htmlspecialchars($_POST['mysql_db']) : 'Bouffe@Ulm';?>"/><br/>
|
||||
<em>Note :</em> You <em>must</em> create this database first.
|
||||
@ -126,7 +127,7 @@
|
||||
<legend>Administrator</legend>
|
||||
<p><label for="admin_login">Username of the admin : </label><input type="text" name="admin_login" id="admin_login" <?php echo (!empty($_POST['admin_login'])) ? 'value="'.htmlspecialchars($_POST['admin_login']).'"' : '';?>/></p>
|
||||
<p><label for="admin_display_name">Displayed name for admin user : </label><input type="text" name="admin_display_name" id="admin_display_name" <?php echo (!empty($_POST['admin_display_name']) ? 'value="'.htmlspecialchars($_POST['admin_display_name']).'"' : '');?>/></p>
|
||||
<p><label for="admin_password">Password for the admin : </label><input type="password" name="admin_password" id="admin_password"/></p>
|
||||
<p><label for="admin_password">Password for the admin : </label><input type="password" name="admin_password" id="admin_password"/> <a href="" onclick="toggle_password('admin_password'); return false;"><img src="img/toggle_password.jpg" alt="Toggle visible"/></a></p>
|
||||
</fieldset>
|
||||
<p class="center"><input <?php echo (!empty($block_form)) ? 'disabled ' : '';?>type="submit" value="Install"></p>
|
||||
</form>
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
<p><label for="mysql_login">MySQL login : </label><input type="text" name="mysql_login" id="mysql_login" value="<?php echo $mysql_login;?>"/></p>
|
||||
<p>
|
||||
<label for="mysql_password">MySQL password : </label><input type="password" name="mysql_password" id="mysql_password"/><br/>
|
||||
<label for="mysql_password">MySQL password : </label><input type="password" name="mysql_password" id="mysql_password"/> <a href="" onclick="toggle_password('mysql_password'); return false;"><img src="tpl/tpl/img/toggle_password.jpg" alt="Toggle visible"/></a><br/>
|
||||
<em>Note :</em> Leave the above field blank if you don't want to change your password.
|
||||
</p>
|
||||
<p>
|
||||
@ -44,6 +44,10 @@
|
||||
<em>Note :</em> This is the base URL from which you access this page. You must keep the trailing "/" in the above address.
|
||||
</p>
|
||||
<p><label for="currency">Currency : </label><input type="text" name="currency" id="currency" size="3" value="<?php echo $currency;?>"/></p>
|
||||
<p>
|
||||
<label for="timezone">Timezone : </label><input type="text" name="timezone" id="timezone" value="<?php echo $timezone;?>"/><br/>
|
||||
<em>For example :</em> Europe/Paris. See the doc for more info.
|
||||
</p>
|
||||
</fieldset>
|
||||
<p class="center"><input type="submit" value="Update settings"></p>
|
||||
</form>
|
||||
|
@ -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';
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<p><label for="mysql_login">MySQL login : </label><input type="text" name="mysql_login" id="mysql_login" value="{$mysql_login}"/></p>
|
||||
<p>
|
||||
<label for="mysql_password">MySQL password : </label><input type="password" name="mysql_password" id="mysql_password"/><br/>
|
||||
<label for="mysql_password">MySQL password : </label><input type="password" name="mysql_password" id="mysql_password"/> <a href="" onclick="toggle_password('mysql_password'); return false;"><img src="img/toggle_password.jpg" alt="Toggle visible"/></a><br/>
|
||||
<em>Note :</em> Leave the above field blank if you don't want to change your password.
|
||||
</p>
|
||||
<p>
|
||||
|
Loading…
Reference in New Issue
Block a user