Check-in [adefb6c8db]
Not logged in
Overview

SHA1 Hash:adefb6c8dba43644c5fce844f4afbb19e4f4268f
Date: 2008-11-26 22:24:45
User: eric
Comment:Provide a "Revert to Default" button for editing CSS. Grammar fix on login page.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/login.c from [e06e3ddfda] to [fe758dc0b5].

@@ -194,11 +194,11 @@
   @ </tr>
   @ </table>
   if( g.zLogin==0 ){
     @ <p>To login
   }else{
-    @ <p>You are current logged in as <b>%h(g.zLogin)</b></p>
+    @ <p>You are currently logged in as <b>%h(g.zLogin)</b></p>
     @ <p>To change your login to a different user
   }
   @ enter the user-id and password at the left and press the
   @ "Login" button.  Your user name will be stored in a browser cookie.
   @ You must configure your web browser to accept cookies in order for

Modified src/setup.c from [0829a1a6e1] to [37e2870ec6].

@@ -814,24 +814,33 @@
 void setup_editcss(void){
   login_check_credentials();
   if( !g.okSetup ){
     login_needed();
   }
+  db_begin_transaction();
+  if( P("clear")!=0 ){
+    db_multi_exec("DELETE FROM config WHERE name='css'");
+    cgi_replace_parameter("css", zDefaultCSS);
+  }else{
+    textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS);
+  }
   style_header("Edit CSS");
   @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST">
   login_insert_csrf_secret();
   @ Edit the CSS:<br />
   textarea_attribute("", 40, 80, "css", "css", zDefaultCSS);
   @ <br />
   @ <input type="submit" name="submit" value="Apply Changes">
+  @ <input type="submit" name="clear" value="Revert To Default">
   @ </form>
   @ <hr>
   @ Here is the default CSS:
   @ <blockquote><pre>
   @ %h(zDefaultCSS)
   @ </pre></blockquote>
   style_footer();
+  db_end_transaction(0);
 }
 
 /*
 ** WEBPAGE: setup_header
 */