Index: trunk/bin/module_maker/form_template.cli.php
===================================================================
--- trunk/bin/module_maker/form_template.cli.php	(revision 44)
+++ trunk/bin/module_maker/form_template.cli.php	(revision 51)
@@ -62,18 +62,11 @@
         if (preg_match('/.*_id$/i', $field)) {
             $output[$field] = <<<E_O_F
-    <tr>
-        <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td>
-        <td>
-            <select name="$field" class="small">
-            <\x3fphp printSelectForm('<##>_tbl', "CONCAT(<##>_id, '&mdash;', <##>)", '$field', \$frm['$field'], true, 'ORDER BY $field ASC'); \x3f>
-            </select>
-            <span class="commandtext">
-                <span class="commanditem"><a href="<\x3fphp echo App::oHREF('<##>.php?op=add&boomerang=true'); \x3f>" onClick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo _("Add <##>") \x3f></a></span>
-                <\x3fphp if ('' != \$frm['<##>_id']) { \x3f>
-                    <span class="commanditem"><a href="<\x3fphp echo App::oHREF('<##>.php?op=edit&boomerang=true&<##>_id=' . \$frm['<##>_id']); \x3f>" onClick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo sprintf(_("Edit <##> <em>%s</em>"), \$frm['<##>']) \x3f></a></span>
-                <\x3fphp } \x3f>
-            </span>
-        </td>
-    </tr>
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<select name="$field" id="$field" class="small"><\x3fphp printSelectForm('<##>_tbl', "CONCAT(<##>_id, '&mdash;', <##>)", '$field', \$frm['$field'], true, 'ORDER BY $field ASC'); \x3f></select>
+    <span class="commanditem commandtext"><a href="<\x3fphp echo App::oHREF('<##>.php?op=add&boomerang=true'); \x3f>" onClick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo _("Add <##>") \x3f></a></span>
+    <\x3fphp if ('' != \$frm['<##>_id']) { \x3f>
+    <span class="commanditem commandtext"><a href="<\x3fphp echo App::oHREF('<##>.php?op=edit&boomerang=true&<##>_id=' . \$frm['<##>_id']); \x3f>" onClick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo sprintf(_("Edit <##> <em>%s</em>"), \$frm['<##>']) \x3f></a></span>
+    <\x3fphp } \x3f>
 E_O_F;
             continue;
@@ -83,14 +76,11 @@
         if (preg_match('/file|image/i', $field)) {
             $output[$field] = <<<E_O_F
-    <tr>
-        <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td>
-        <td>
-            <input type="file" name="$field" />
-            <\x3fphp if ('' != \$upload->getFilenameGlob(getFormData('$primary_key') . '_*') && getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f>
-            <div class="help"><\x3fphp printf(_("The current file <a href=\"%s/%2\\\$s\"><strong>%2\\\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/<##>', \$upload->getFilenameGlob(getFormData('$primary_key') . '_*')) \x3f></div>
-            <\x3fphp } \x3f>
-            <div class="help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload->getParam('valid_file_extensions'))) \x3f></div>
-        </td>
-    </tr>
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<input type="file" name="$field" id="$field" />
+    <\x3fphp if ('' != \$upload->getFilenameGlob(getFormData('$primary_key') . '_*') && getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f>
+    <div class="help"><\x3fphp printf(_("The current file <a href=\"%s/%2\\\$s\"><strong>%2\\\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/<##>', \$upload->getFilenameGlob(getFormData('$primary_key') . '_*')) \x3f></div>
+    <\x3fphp } \x3f>
+    <div class="help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload->getParam('valid_file_extensions'))) \x3f></div>
 E_O_F;
             continue;
@@ -100,10 +90,7 @@
         if (preg_match('/pass/i', $field)) {
             $output[$field] = <<<E_O_F
-    <tr>
-        <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td>
-        <td>
-            <input type="password" class="medium" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" />
-        </td>
-    </tr>
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<input type="password" class="medium" size="50" name="$field" id="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" />
 E_O_F;
             continue;
@@ -115,12 +102,7 @@
         case 'enum' :
             $output[$field] = <<<E_O_F
-    <tr>
-        <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td>
-        <td>
-            <select name="$field">
-            <\x3fphp printSetSelectForm('$db_tbl', '$field', \$frm['$field'], true); \x3f>
-            </select>
-        </td>
-    </tr>
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<select name="$field" id="$field"><\x3fphp printSetSelectForm('$db_tbl', '$field', \$frm['$field'], true); \x3f></select>
 E_O_F;
             break;
@@ -129,10 +111,7 @@
         case 'set' :
             $output[$field] = <<<E_O_F
-    <tr>
-        <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td>
-        <td>
-            <\x3fphp printSetCheckboxes('$db_tbl', '$field', \$frm['$field'], 1) \x3f>
-        </td>
-    </tr>
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<\x3fphp printSetCheckboxes('$db_tbl', '$field', \$frm['$field'], 1) \x3f>
 E_O_F;
             break;
@@ -141,34 +120,34 @@
         case 'toggle' :
             $output[$field] = <<<E_O_F
-    <tr>
-        <td>&nbsp;</td>
-        <td>
-            <input type="checkbox" name="$field" <\x3fphp frmChecked(!empty(\$frm['$field'])) \x3f> /><label><\x3fphp echo _("$title"); \x3f></label>
-        </td>
-    </tr>
-E_O_F;
-            break;
-
-        // Textarea
-        case 'tinytext' :
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<input type="checkbox" name="$field" id="$field" <\x3fphp frmChecked(!empty(\$frm['$field'])) \x3f> /><label class="left"><\x3fphp echo _("Check this box to $title"); \x3f></label>
+E_O_F;
+            break;
+
+        // Textarea small
         case 'text' :
+        case 'tinyblob' :
+        case 'blob' :
+            $output[$field] = <<<E_O_F
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<textarea class="large short" cols="75" rows="4" name="$field" id="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea>
+E_O_F;
+            break;
+
+        // Textarea big
         case 'mediumtext' :
         case 'longtext' :
-        case 'tinyblob' :
-        case 'blob' :
         case 'mediumblob' :
         case 'longblob' :
             $output[$field] = <<<E_O_F
-    <tr>
-        <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td>
-        <td>
-            <textarea class="large" cols="75" rows="4" name="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea>
-        </td>
-    </tr>
-E_O_F;
-            break;
-
-
-        // Text
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<textarea class="large tall" cols="75" rows="4" name="$field" id="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea>
+E_O_F;
+            break;
+
+        // Number
         case 'tinyint' :
         case 'bit' :
@@ -188,5 +167,13 @@
         case 'dec' :
         case 'numeric' :
-
+        default :
+            $output[$field] = <<<E_O_F
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<input type="text" class="tiny" size="12" name="$field" id="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" />
+E_O_F;
+            break;
+
+        // Date
         case 'date' :
         case 'datetime' :
@@ -194,15 +181,22 @@
         case 'time' :
         case 'year' :
-
+        default :
+            $output[$field] = <<<E_O_F
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<input type="text" class="medium" size="25" name="$field" id="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" />
+E_O_F;
+            break;
+
+        // Text
         case 'char' :
         case 'varchar' :
+        case 'tinytext' :
+        case 'tinyblob' :
         default :
             $output[$field] = <<<E_O_F
-    <tr>
-        <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td>
-        <td>
-            <input type="text" class="medium" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" />
-        </td>
-    </tr>
+
+<label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label>
+<input type="text" class="medium" size="50" name="$field" id="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" />
 E_O_F;
             break;
Index: trunk/bin/module_maker/list_template.cli.php
===================================================================
--- trunk/bin/module_maker/list_template.cli.php	(revision 44)
+++ trunk/bin/module_maker/list_template.cli.php	(revision 51)
@@ -107,8 +107,8 @@
 
 <\x3fphp \$fv->printErrorMessages(); \x3f>
-<form action="<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>" method="post">
-<\x3fphp App::printHiddenSession(false); \x3f>
 
 <div id="commandbox">
+<form action="<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>" method="get">
+<\x3fphp App::printHiddenSession(false); \x3f>
     <span class="nowrap commandtext"><a href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . '?op=add'); \x3f>"><\x3fphp echo _("Add <##>"); \x3f></a></span>
     <br />
@@ -119,8 +119,10 @@
     </select>
     <input type="submit" name="list" value="<\x3fphp echo _("Search"); \x3f>" />
+</form>
 </div>
 
 <?php include 'list_info.ihtml'; \x3f>
 
+<form action="<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>" method="post">
 <table class="list">
     <tr>
@@ -147,6 +149,6 @@
     <\x3fphp for (\$i = 0; \$i <= \$page->last_item - \$page->first_item && \$page->total_items > 0; \$i++) { \x3f>
     <tr>
-        <td class="nowrap"><a title="<\x3fphp printf(_("Edit %s"), oTxt(\$list[\$i]['______RECORD_NAME______'])) \x3f>" href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . '?op=edit&$primary_key=' . \$list[\$i]['$primary_key']); \x3f>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0"></a> &nbsp;</td>
-        <td class="nowrap"><a title="<\x3fphp printf(_("Versions of %s"), oTxt(\$list[\$i]['______RECORD_NAME______'])) \x3f>" href="<\x3fphp echo App::oHREF("/admin/versions.php?record_table=$db_tbl&record_key=$primary_key&boomerang=true&record_val=" . \$list[\$i]['$primary_key']); \x3f>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> &nbsp;</td>
+        <td class="nowrap"><a title="<\x3fphp printf(_("Edit %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . '?op=edit&$primary_key=' . \$list[\$i]['$primary_key']); \x3f>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0"></a> &nbsp;</td>
+        <td class="nowrap"><a title="<\x3fphp printf(_("Versions of %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo App::oHREF("/admin/versions.php?record_table=$db_tbl&record_key=$primary_key&boomerang=true&record_val=" . \$list[\$i]['$primary_key']); \x3f>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> &nbsp;</td>
 
 E_O_F;
@@ -162,5 +164,5 @@
 
 echo isset($op) ? '' : <<<E_O_F
-        <td class="nowrap" align="right"><a title="<\x3fphp printf(_("Delete %s"), oTxt(\$list[\$i]['______RECORD_NAME______'])) \x3f>" href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . "?op=del&$primary_key=" . \$list[\$i]['$primary_key']); \x3f>" onClick="javascript:return confirm('<\x3fphp printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt(\$list[\$i]['______RECORD_NAME______'])) \x3f>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0"></a> &nbsp;</td>
+        <td class="nowrap" align="right"><a title="<\x3fphp printf(_("Delete %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . "?op=del&$primary_key=" . \$list[\$i]['$primary_key']); \x3f>" onClick="javascript:return confirm('<\x3fphp printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt(\$list[\$i]['<##>'])) \x3f>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0"></a> &nbsp;</td>
     </tr>
     <\x3fphp } \x3f>
Index: trunk/bin/module_maker/module.cli.php
===================================================================
--- trunk/bin/module_maker/module.cli.php	(revision 44)
+++ trunk/bin/module_maker/module.cli.php	(revision 51)
@@ -205,5 +205,5 @@
 
 $search['admin_form_tag_init'] = '/%ADMIN_FORM_TAG_INIT%/';
-$replace['admin_form_tag_init'] = "<form method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\">";
+$replace['admin_form_tag_init'] = '<form method="post" action="<\x3fphp echo \$_SERVER[\'PHP_SELF\']; \x3f>" class="sc-form">';
 $search['admin_upload_include'] = '/%ADMIN_UPLOAD_INCLUDE%/';
 $replace['admin_upload_include'] = '';
@@ -221,5 +221,5 @@
 if ($upload_file_capability) {
     // Form arguments
-    $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"<##>\" />";
+    $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\" class=\"sc-form\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"<##>\" />";
 
     // Include statement.
Index: trunk/bin/module_maker/skel/adm_form.ihtml
===================================================================
--- trunk/bin/module_maker/skel/adm_form.ihtml	(revision 44)
+++ trunk/bin/module_maker/skel/adm_form.ihtml	(revision 51)
@@ -6,14 +6,8 @@
 <input type="hidden" name="%PRIMARY_KEY%" value="<?php echo $frm['%PRIMARY_KEY%']; ?>" />
 
-<table>
-    <tr>
-        <td>&nbsp;</td>
-        <td><?php printSubmitButtons($frm['submit_buttons']); ?></td>
-    </tr>
+<?php printSubmitButtons($frm['submit_buttons']); ?>
+
 %ADM_FORM_TABLE_ROWS%
-    <tr>
-        <td>&nbsp;</td>
-        <td><?php printSubmitButtons($frm['submit_buttons']); ?></td>
-    </tr>
-</table>
+
+<?php printSubmitButtons($frm['submit_buttons']); ?>
 </form>
Index: trunk/bin/module_maker/skel/adm_list.ihtml
===================================================================
--- trunk/bin/module_maker/skel/adm_list.ihtml	(revision 44)
+++ trunk/bin/module_maker/skel/adm_list.ihtml	(revision 51)
@@ -1,8 +1,8 @@
 
 <?php $fv->printErrorMessages(); ?>
+
+<div id="commandbox">
 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
 <?php App::printHiddenSession(false); ?>
-
-<div id="commandbox">
     <span class="nowrap commandtext"><a href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add %ITEM_TITLE%"); ?></a></span>
     <br />
@@ -13,6 +13,6 @@
     </select>
     <input type="submit" value="<?php echo _("Search"); ?>" />
+</form>
 </div>
-</form>
 
 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
