Diff
Not logged in

Differences From:

File src/setup.c part of check-in [00b778bd58] - Added new config option with the rather unwieldy name 'anon-login-enable-captcha-filler' by stephan on 2009-12-07 22:42:42. Also file src/setup.c part of check-in [1c2d878d12] - Merge with trunk by btheado on 2009-12-13 01:16:13. [view]

To:

File src/setup.c part of check-in [91b9081425] - Add a khaki color skin. by drh on 2009-12-20 02:53:55. Also file src/setup.c part of check-in [76bc05d739] - merge with trunk by btheado on 2009-12-30 20:33:59. [view]

@@ -71,8 +71,10 @@
   setup_menu_entry("Timeline", "setup_timeline",
     "Timeline display preferences");
   setup_menu_entry("Tickets", "tktsetup",
     "Configure the trouble-ticketing system for this repository");
+  setup_menu_entry("Skins", "setup_skin",
+    "Select from a menu of prepackaged \"skins\" for the web interface");
   setup_menu_entry("CSS", "setup_editcss",
     "Edit the Cascading Style Sheet used by all pages of this repository");
   setup_menu_entry("Header", "setup_header",
     "Edit HTML text inserted at the top of every page");
@@ -270,9 +272,8 @@
   ** to the page that displays a list of users.
   */
   doWrite = cgi_all("login","info","pw") && !higherUser;
   if( doWrite ){
-    char const * anonLoginCheckedbox = PD("anonymousEnableAutofill",0);
     char zCap[50];
     int i = 0;
     int aa = P("aa")!=0;
     int ad = P("ad")!=0;
@@ -339,14 +340,8 @@
        "REPLACE INTO user(uid,login,info,pw,cap) "
        "VALUES(nullif(%d,0),%Q,%Q,%Q,'%s')",
       uid, P("login"), P("info"), zPw, zCap
     );
-    if( anonLoginCheckedbox && (*anonLoginCheckedbox) ){
-      db_set( "anon-login-enable-captcha-filler", "on", 0 );
-    }
-    else{
-      db_set( "anon-login-enable-captcha-filler", "off", 0 );
-    }
     cgi_redirect("setup_ulist");
     return;
   }
 
@@ -480,14 +475,9 @@
   @ </tr>
   @ <tr>
   @   <td align="right">Password:</td>
   if( strcmp(zLogin, "anonymous")==0 ){
-    int enabled = db_get_boolean( "anon-login-enable-captcha-filler", 0 );
-    char const * checked = enabled ? "checked=\"checked\"" : "";
-    /* User the password for "anonymous" as cleartext */
-    @   <td><input type="text" name="pw" value="%h(zPw)"/>
-    @   <br/>Enable password-filler button for anonymous login? <input type="checkbox" name="anonymousEnableAutofill" %s(checked)/><br/>
-    @   </td>
+    @   <td><input type="text" name="pw" value="%h(zPw)"></td>
   }else if( zPw[0] ){
     /* Obscure the password for all other users */
     @   <td><input type="password" name="pw" value="**********"></td>
   }else{
@@ -736,8 +726,17 @@
   @ for incoming web connections on internet addresses other than
   @ 127.0.0.1.</p></li>
 
   @ <hr>
+  onoff_attribute("Show javascript button to fill in CAPTCHA",
+                  "auto-captcha", "autocaptcha", 0);
+  @ <p>When enabled, a button appears on the login screen for user
+  @ "anonymous" that will automatically fill in the CAPTCHA password.
+  @ This is less secure that forcing the user to do it manually, but is
+  @ probably secure enough and it is certainly more convenient for
+  @ anonymous users.</p>
+
+  @ <hr>
   entry_attribute("Login expiration time", 6, "cookie-expire", "cex", "8766");
   @ <p>The number of hours for which a login is valid.  This must be a
   @ positive number.  The default is 8760 hours which is approximately equal
   @ to a year.</p>
@@ -784,8 +783,16 @@
   @ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or
   @ Zulu) instead of in local time.</p>
 
   @ <hr>
+  onoff_attribute("Show version differences by default",
+                  "show-version-diffs", "vdiff", 0);
+  @ <p>On the version-information pages linked from the timeline can either
+  @ show complete diffs of all file changes, or can just list the names of
+  @ the files that have changed.  Users can get to either page by
+  @ clicking.  This setting selects the default.</p>
+
+  @ <hr>
   entry_attribute("Max timeline comment length", 6,
                   "timeline-max-comment", "tmc", "0");
   @ <p>The maximum length of a comment to be displayed in a timeline.
   @ "0" there is no length limit.</p>
@@ -814,8 +821,17 @@
   @ <hr>
   onoff_attribute("Automatically synchronize with repository",
                   "autosync", "autosync", 1);
   @ <p>Automatically keeps your work in sync with a centralized server.</p>
+
+  @ <hr>
+  onoff_attribute("Show javascript button to fill in CAPTCHA",
+                  "auto-captcha", "autocaptcha", 0);
+  @ <p>When enabled, a button appears on the login screen for user
+  @ "anonymous" that will automatically fill in the CAPTCHA password.
+  @ This is less secure that forcing the user to do it manually, but is
+  @ probably secure enough and it is certainly more convenient for
+  @ anonymous users.</p>
 
   @ <hr>
   onoff_attribute("Sign all commits with GPG",
                   "clearsign", "clearsign", 1);
@@ -940,16 +956,19 @@
   }
   style_header("Edit CSS");
   @ <form action="%s(g.zBaseURL)/setup_editcss" method="POST">
   login_insert_csrf_secret();
-  @ Edit the CSS:<br />
+  @ Edit the CSS below:<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:
+  @ The default CSS is shown below for reference.  Other examples
+  @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
+  @ See also the <a href="setup_header">header</a> and
+  @ <a href="setup_footer">footer</a> editing screens.
   @ <blockquote><pre>
   @ %h(zDefaultCSS)
   @ </pre></blockquote>
   style_footer();
@@ -982,9 +1001,12 @@
   @ <input type="submit" name="submit" value="Apply Changes">
   @ <input type="submit" name="clear" value="Revert To Default">
   @ </form>
   @ <hr>
-  @ Here is the default page header:
+  @ The default header is shown below for reference.  Other examples
+  @ of headers can be seen on the <a href="setup_skin">skins page</a>.
+  @ See also the <a href="setup_editcss">CSS</a> and
+  @ <a href="setup_footer">footer</a> editing screeens.
   @ <blockquote><pre>
   @ %h(zDefaultHeader)
   @ </pre></blockquote>
   style_footer();
@@ -1016,9 +1038,12 @@
   @ <input type="submit" name="submit" value="Apply Changes">
   @ <input type="submit" name="clear" value="Revert To Default">
   @ </form>
   @ <hr>
-  @ Here is the default page footer:
+  @ The default footer is shown below for reference.  Other examples
+  @ of footers can be seen on the <a href="setup_skin">skins page</a>.
+  @ See also the <a href="setup_editcss">CSS</a> and
+  @ <a href="setup_header">header</a> editing screens.
   @ <blockquote><pre>
   @ %h(zDefaultFooter)
   @ </pre></blockquote>
   style_footer();
@@ -1064,13 +1089,17 @@
   @ <p>The current project logo has a MIME-Type of <b>%h(zMime)</b> and looks
   @ like this:</p>
   @ <blockquote><img src="%s(g.zTop)/logo" alt="logo"></blockquote>
   @
-  @ <form action="%s(g.zBaseURL)/setup_logo" method="POST"
-  @  enctype="multipart/form-data">
   @ <p>The logo is accessible to all users at this URL:
   @ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
-  @ To set a new logo image, select a file to use as the logo using
+  @ The logo may or may not appear on each
+  @ page depending on the <a href="setup_editcss">CSS</a> and
+  @ <a href="setup_header">header setup</a>.</p>
+  @
+  @ <form action="%s(g.zBaseURL)/setup_logo" method="POST"
+  @  enctype="multipart/form-data">
+  @ <p>To set a new logo image, select a file to use as the logo using
   @ the entry box below and then press the "Change Logo" button.</p>
   login_insert_csrf_secret();
   @ Logo Image file:
   @ <input type="file" name="im" size="60" accepts="image/*"><br>