make gui more consistent. add cancel button to create trigger. show which fields...
authorchriskl <chriskl>
Mon, 15 Dec 2003 15:42:45 +0000 (15:42 +0000)
committerchriskl <chriskl>
Mon, 15 Dec 2003 15:42:45 +0000 (15:42 +0000)
constraints.php
tables.php
tblproperties.php
triggers.php

index a46384ee5fbdab1a92f1fd4782f57af4001fd40f..76c14b27a0d4ab43a5bdbc4bedd0e1f9e00a3635 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List constraints on a table
         *
-        * $Id: constraints.php,v 1.23 2003/12/10 16:03:29 chriskl Exp $
+        * $Id: constraints.php,v 1.24 2003/12/15 15:42:45 chriskl Exp $
         */
 
        // Include application functions
                        echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                        echo "<table>\n";
                        echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
-                       echo "<th class=\"data\">{$lang['strdefinition']}</th></tr>\n";
+                       echo "<th class=\"data required\">{$lang['strdefinition']}</th></tr>\n";
 
                        echo "<tr><td class=\"data1\"><input name=\"name\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"",
                                htmlspecialchars($_POST['name']), "\" /></td>\n";
                        echo "<input type=\"hidden\" name=\"action\" value=\"save_add_check\" />\n";
                        echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
                        echo $misc->form;
-                       echo "<p><input type=\"submit\" name=\"ok\" value=\"{$lang['strok']}\" /> <input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
+                       echo "<p><input type=\"submit\" name=\"ok\" value=\"{$lang['stradd']}\" />\n";
+                       echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
                        echo "</form>\n";
 
                }
index d7928ae2e39e0e5c70f4d707d4a1b2a767491552..f53d1bc8ec55407397368ff1d42abe92118a78fa 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.41 2003/12/13 16:17:09 chriskl Exp $
+        * $Id: tables.php,v 1.42 2003/12/15 15:42:45 chriskl Exp $
         */
 
        // Include application functions
                                
                                echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                                echo "<table>\n";
-                               echo "<tr><th class=\"data\">{$lang['strname']}</th></tr>\n";
-                               echo "<tr><td class=\"data1\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", 
+                               echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n";
+                               echo "<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", 
                                        htmlspecialchars($_REQUEST['name']), "\" /></td></tr>\n";
-                               echo "<tr><th class=\"data\">{$lang['strnumfields']}</th></tr>\n";
-                               echo "<tr><td class=\"data1\"><input name=\"fields\" size=\"5\" maxlength=\"{$data->_maxNameLen}\" value=\"", 
+                               echo "<tr><th class=\"data left required\">{$lang['strnumfields']}</th>\n";
+                               echo "<td class=\"data\"><input name=\"fields\" size=\"5\" maxlength=\"{$data->_maxNameLen}\" value=\"", 
                                        htmlspecialchars($_REQUEST['fields']), "\" /></td></tr>\n";
                                if ($data->hasWithoutOIDs()) {
-                                       echo "<tr><th class=\"data\">{$lang['stroptions']}</th></tr>\n";
-                                       echo "<tr><td class=\"data1\"><input type=\"checkbox\" name=\"withoutoids\"", 
+                                       echo "<tr><th class=\"data left\">{$lang['stroptions']}</th>\n";
+                                       echo "<td class=\"data\"><input type=\"checkbox\" name=\"withoutoids\"", 
                                                (isset($_REQUEST['withoutoids']) ? ' checked="checked"' : ''), " />WITHOUT OIDS</td></tr>\n";
                                }
                                echo "</table>\n";
         * Ask for select parameters and perform select
         */
        function doSelectRows($confirm, $msg = '') {
-               global $database, $misc;
+               global $data, $misc;
                global $lang;
                global $PHP_SELF;
 
         * Show confirmation of empty and perform actual empty
         */
        function doEmpty($confirm) {
-               global $database, $misc;
+               global $data, $misc;
                global $lang;
                global $PHP_SELF;
 
         * Show confirmation of drop and perform actual drop
         */
        function doDrop($confirm) {
-               global $database, $misc;
+               global $data, $misc;
                global $lang, $_reload_browser;
                global $PHP_SELF;
 
index 8eb132958f23e3f422c61c914738c964ab14c325..7a858b3593cd0345eacf7e0118c4816a9ac7fefc 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tblproperties.php,v 1.31 2003/12/10 16:03:29 chriskl Exp $
+        * $Id: tblproperties.php,v 1.32 2003/12/15 15:42:45 chriskl Exp $
         */
 
        // Include application functions
                        
                        echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
                        echo "<table>\n";
-                       echo "<tr><th class=\"data\">{$lang['strname']}</th>\n";
+                       echo "<tr><th class=\"data required\">{$lang['strname']}</th>\n";
                        echo "<td class=\"data1\">";
                        echo "<input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", 
                                htmlspecialchars($_POST['name']), "\" /></td></tr>\n";
                        if ($data->hasAlterTableOwner()) {
-                               echo "<tr><th class=\"data\">{$lang['strowner']}</th>\n";
+                               echo "<tr><th class=\"data required\">{$lang['strowner']}</th>\n";
                                echo "<td class=\"data1\"><select name=\"owner\">";
                                while (!$users->EOF) {
                                        $uname = $users->f[$data->uFields['uname']];
 
                                // Output table header
                                echo "<table>\n<tr>";
-                               echo "<tr><th class=\"data\">{$lang['strfield']}</th><th class=\"data\">{$lang['strtype']}</th><th class=\"data\">{$lang['strlength']}</th></tr>";
+                               echo "<tr><th class=\"data required\">{$lang['strfield']}</th><th class=\"data required\">{$lang['strtype']}</th><th class=\"data\">{$lang['strlength']}</th></tr>";
 
                                echo "<tr><td><input name=\"field\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
                                        htmlspecialchars($_POST['field']), "\" /></td>";
 
                                // Output table header
                                echo "<table>\n<tr>";
-                               echo "<tr><th class=\"data\">{$lang['strfield']}</th><th class=\"data\">{$lang['strtype']}</th><th class=\"data\">{$lang['strnotnull']}</th><th class=\"data\">{$lang['strdefault']}</th></tr>";
+                               echo "<tr><th class=\"data required\">{$lang['strname']}</th><th class=\"data required\">{$lang['strtype']}</th><th class=\"data\">{$lang['strnotnull']}</th><th class=\"data\">{$lang['strdefault']}</th></tr>";
 
                                $column = &$data->getTableAttributes($_REQUEST['table'], $_REQUEST['column']);
                                $column->f['attnotnull'] = $data->phpBool($column->f['attnotnull']);
index 6df2f4815822dcd8e4a7fddd9abd64b9e068e8f0..c435ee1981c5275b946e0552756e4f181b67c820 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List triggers on a table
         *
-        * $Id: triggers.php,v 1.17 2003/12/10 16:03:29 chriskl Exp $
+        * $Id: triggers.php,v 1.18 2003/12/15 15:42:45 chriskl Exp $
         */
 
        // Include application functions
                echo "<td class=\"data1\">(<input type=\"text\" name=\"formTriggerArgs\" size=\"32\" />)</td>\n";
                echo "</tr></table>\n";
                echo "<p><input type=\"submit\" value=\"{$lang['strcreate']}\" />\n";
-               echo "<input type=\"reset\" value=\"{$lang['strreset']}\" /></p>\n";
+               echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>\n";
                echo "<input type=\"hidden\" name=\"action\" value=\"save_create\" />\n";
                echo "<input type=\"hidden\" name=\"table\" value=\"", htmlspecialchars($_REQUEST['table']), "\" />\n";
                echo $misc->form;
                        doAlter();
                        break;
                case 'save_create':
-                       doSaveCreate();
+                       if (isset($_POST['cancel'])) doDefault();
+                       else doSaveCreate();
                        break;
                case 'create':
                        doCreate();