]> git.wh0rd.org Git - tt-rss.git/commitdiff
misc prefs ui updates
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 25 Jan 2009 06:09:46 +0000 (07:09 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 25 Jan 2009 06:09:46 +0000 (07:09 +0100)
modules/pref-feeds.php
modules/pref-users.php
prefs.js

index e47387497608f36c607be025e4455b27ab4060f4..bcd79e74a51b5f49a9ac302e7226357e50428626 100644 (file)
                if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
                        print " <input type=\"submit\" class=\"button\"
                                id=\"top25_feeds_btn\"
-                               onclick=\"javascript:browseFeeds()\" value=\"".__('Other Feeds')."\">";
+                               onclick=\"javascript:browseFeeds()\" value=\"".__('More Feeds')."\">";
                }
 
                $feeds_sort = db_escape_string($_GET["sort"]);
index 08bc10821f5d2ca1209e74babc7160fd72bb9923..386c428b187005f430748fd984fff6b6d035440a 100644 (file)
                        $sort = "login";
                }
 
-               print "<div class=\"prefGenericAddBox\">
-                       <input id=\"uadd_box\"                  
-                               onkeyup=\"toggleSubmitNotEmpty(this, 'user_add_btn')\"
-                               onchange=\"toggleSubmitNotEmpty(this, 'user_add_btn')\"
-                               size=\"15\">&nbsp;";
-                       
                print "<input type=\"submit\" class=\"button\" 
-                       id=\"user_add_btn\" disabled=\"true\"
+                       id=\"user_add_btn\" 
                        onclick=\"javascript:addUser()\" value=\"".__('Create user')."\"></div>";
 
                if ($user_search) {
index 813d8df689b62179a22f7bb22ba8669eca7df5e3..5597dfdbe0eb65576015bdb13fea0132f4b6b4c6 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -328,29 +328,32 @@ function addFeedCat() {
                link.value = "";
 
        }
-
 }
+
 function addUser() {
 
        try {
 
-               var sqlexp = document.getElementById("uadd_box");
+               var login = prompt(__("Please enter login:"), "");
        
-               if (sqlexp.value.length == 0) {
-                       alert(__("Can't add user: no login specified."));
-               } else {
-                       notify_progress("Adding user...");
-       
-                       var query = "backend.php?op=pref-users&subop=add&login=" +
-                               param_escape(sqlexp.value);
-                               
-                       new Ajax.Request(query, {
-                               onComplete: function(transport) { 
-                                       userlist_callback2(transport); 
-                               } });
+               if (login == null) { 
+                       return false;
+               }
        
-                       sqlexp.value = "";
+               if (login == "") {
+                       alert(__("Can't create user: no login specified."));
+                       return false;
                }
+       
+               notify_progress("Adding user...");
+       
+               var query = "backend.php?op=pref-users&subop=add&login=" +
+                       param_escape(login);
+                               
+               new Ajax.Request(query, {
+                       onComplete: function(transport) { 
+                               userlist_callback2(transport); 
+                       } });
 
        } catch (e) {
                exception_error("addUser", e);