[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1634] trunk
- Subject: SF.net SVN: ledger-smb: [1634] trunk
- From: ..hidden..
- Date: Tue, 18 Sep 2007 14:16:18 -0700
Revision: 1634
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1634&view=rev
Author: aurynn_cmd
Date: 2007-09-18 14:16:17 -0700 (Tue, 18 Sep 2007)
Log Message:
-----------
Creation of Edit/Create user templates. Addition of a Cancel button to the admin.pl, which take one back to the initial page.
Modified Paths:
--------------
trunk/UI/Admin/edit_group.html
trunk/UI/Admin/edit_user.html
trunk/UI/Admin/main.html
trunk/scripts/admin.pl
Modified: trunk/UI/Admin/edit_group.html
===================================================================
--- trunk/UI/Admin/edit_group.html 2007-09-18 16:57:56 UTC (rev 1633)
+++ trunk/UI/Admin/edit_group.html 2007-09-18 21:16:17 UTC (rev 1634)
@@ -1,13 +1,17 @@
<?lsmb import base.html?>
-<?lsmb if user.username ?>
+<?lsmb IF user.username ?>
<center><b>Edit User</b></center>
-<?lsmb else ?>
+<?lsmb ELSE ?>
<center><b>Create User</b></center>
-<?lsmb endif ?>
+<?lsmb ENDIF ?>
-<form name="submit_user" action="/admin.pl?"></form>
\ No newline at end of file
+<form name="submit_user" action="/admin.pl?">
+
+
+
+</form>
\ No newline at end of file
Modified: trunk/UI/Admin/edit_user.html
===================================================================
--- trunk/UI/Admin/edit_user.html 2007-09-18 16:57:56 UTC (rev 1633)
+++ trunk/UI/Admin/edit_user.html 2007-09-18 21:16:17 UTC (rev 1634)
@@ -0,0 +1,143 @@
+<div id="modify_user">
+ <font size="15">
+ <strong>
+ <?lsmb IF user.username ?>
+ Edit User <?lsmb user.username ?>
+ <?lsmb ELSE?>
+ New User
+ <?lsmb END?>
+ </strong>
+ </font>
+
+ <form method="POST" action="admin.pl?action=new_user">
+
+ <table>
+
+ <tr>
+ <td>
+ <select name="salutation">
+ <?lsmb FOREACH sal = salutations ?>
+ <option value="<?lsmb sal.id?>"><?lsmb sal.salutation?></option>
+ <?END?>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ First Name :<input type="textarea" name="first_name" value="<?lsmb user.first_name?>"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ Last Name :<input type="textarea" name="last_name" value="<?lsmb user.last_name?>"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Employee # :<input type="textarea" name="employeenumber" value="<?lsmb user.employeenumber?>"/>
+ </td>
+ </tr>
+ <hr/>
+ <?lsmb UNLESS user.username?>
+ <tr>
+ <td>
+ Username :<input type="textarea" name="username" value="<?lsmb user.last_name?>"/>
+ </td>
+ </tr>
+ <?lsmb END?>
+ <tr>
+ <td>Company Name</td>
+ <td>
+ <input type="textarea" name="companyname" value="<?lsmb user.companyname?>"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Address
+ </td>
+ <td>
+ <input type="textarea" name="address1" value="<?lsmb user.address1?>"/>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <input type="textarea" name="address2" value="<?lsmb user.address2?>"/>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <input type="textarea" name="address3" value="<?lsmb user.address3?>"/>
+ </td>
+ </tr>
+ <tr>
+ <td>City</td>
+ <td>
+ <input type="textarea" name="city" value="<?lsmb user.city?>"/>
+ </td>
+ </tr>
+ <tr>
+ <td>City</td>
+ <td>
+ <input type="textarea" name="city" value="<?lsmb user.city?>"/>
+ </td>
+ </tr>
+ <tr>
+ <td>State/Province</td>
+ <td>
+ <input type="textarea" name="state" value="<?lsmb user.state?>"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td>Zip/Postal code</td>
+ <td>
+ <input type="textarea" name="zipcode" value="<?lsmb user.zipcode?>"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Country</td>
+ <td>
+ <input type="textarea" name="country" value="<?lsmb user.city?>"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td>Contact Information</td>
+ <td><hr/></td>
+ </tr>
+
+ <tr>
+ <td>Home Phone</td>
+ <td>
+ <input type="textarea" name="homephone" value="<?lsmb user.homephone?>"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td>Work Phone</td>
+ <td>
+ <input type="textarea" name="workphone" value="<?lsmb user.workphone?>"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td>Email</td>
+ <td>
+ <input type="textarea" name="e_mail" value="<?lsmb user.e_mail?>"/>
+ </td>
+ </tr>
+
+ </table>
+
+ <table>
+ <tr>
+ <td><button value="new_user">Submit</button></td>
+ <td><button name="method" value="cancel">Cancel</td>
+ </tr>
+ </table>
+ </form>
+</div>
\ No newline at end of file
Modified: trunk/UI/Admin/main.html
===================================================================
--- trunk/UI/Admin/main.html 2007-09-18 16:57:56 UTC (rev 1633)
+++ trunk/UI/Admin/main.html 2007-09-18 21:16:17 UTC (rev 1634)
@@ -9,7 +9,7 @@
<?lsmb IF message?>
<strong><font color="red"><?lsmb message?></font></strong>
<?lsmb END?>
- <form name="userlist" method="POST" action="admin.pl">
+ <form name="userlist" method="GET" action="admin.pl">
<table>
<tr>
<td></td>
@@ -44,10 +44,10 @@
<hr/>
<div class="buttons">
- <button name="method" value="new_user">New User</button>
- <button name="method" value="new_group">New Group</button>
- <button name="method" value="delete_user">Delete User</button>
- <button name="method" value="delete_group">Delete Group</button>
+ <button name="action" value="new_user">New User</button>
+ <button name="action" value="new_group">New Group</button>
+ <button name="action" value="delete_user">Delete User</button>
+ <button name="action" value="delete_group">Delete Group</button>
</div>
</form>
</div>
\ No newline at end of file
Modified: trunk/scripts/admin.pl
===================================================================
--- trunk/scripts/admin.pl 2007-09-18 16:57:56 UTC (rev 1633)
+++ trunk/scripts/admin.pl 2007-09-18 21:16:17 UTC (rev 1634)
@@ -126,7 +126,7 @@
my ($class, $request) = @_;
my $template = LedgerSMB::Template->new( user=>$user,
- template=>'Admin/new_user', language=>$user->{language},
+ template=>'Admin/edit_user', language=>$user->{language},
format=>'HTML', path=>'UI');
$template->render();
@@ -143,6 +143,11 @@
$template->render();
}
+sub cancel {
+
+ __default(@_);
+}
+
sub __default {
my ($class, $request) = @_;
@@ -154,5 +159,4 @@
format=>'HTML', path=>'UI');
$template->render();
}
-
1;
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.