add customer edit and customer delete function

- minimal edit customer implemented (fixes #14)
 - change create customer (fixes #12)
 - minimal delete customer implemented (fixes #15)
 - update translations (addresses #16)

git-svn-id: file:///var/www/wwwusers/usr01/svn/pyalchemybiz/trunk@11 389c73d4-bf09-4d3d-a15e-f94a37d0667a
This commit is contained in:
Jan Dittberner 2009-02-08 21:07:22 +00:00
parent 08b4d46c84
commit 84191f4b2c
7 changed files with 74 additions and 12 deletions

View file

@ -3,7 +3,7 @@
<h1>${_('Customer management')}</h1>
<h2>${_('Create new customer')}</h2>
${h.start_form(h.url_for(action='create_process'), method='post')}
${h.start_form(h.url_for(action='process_create'), method='post')}
<div id="createcustomerform">
<label for="firstname">${_('First name:')}</label><br />
${h.text_field('firstname')}<br />

View file

@ -0,0 +1,15 @@
<%inherit file="/base.mako" />
<h1>${_('Customer management')}</h1>
<h2>${_('Edit customer')}</h2>
${h.start_form(h.url_for(action='process_edit'), method='post')}
<div id="editcustomerform">
<label for="firstname">${_('First name:')}</label><br />
${h.text_field('firstname', c.customer.person.firstname)}<br />
<label for="lastname">${_('Last name:')}</label><br />
${h.text_field('lastname', c.customer.person.lastname)}<br />
${h.submit(_('Save changes'))}
</div>
${h.end_form()}

View file

@ -4,7 +4,7 @@
<ul id="customers">
% for customer in c.customers:
<li>${customer | h} [${h.link_to(_('edit customer'), h.url_for(id=customer.id, action="edit"))}]</li>
<li>${customer | h} [${h.link_to(_('edit customer'), h.url_for(id=customer.id, action="edit"))}] [${h.link_to(_('delete customer'), h.url_for(id=customer.id, action="delete"))}]</li>
% endfor
</ul>