[Rt-commit] rt branch, 4.0/auth-token-reset, created. rt-4.0.6-251-g1b39bc1

Thomas Sibley trs at bestpractical.com
Fri Aug 10 14:27:33 EDT 2012


The branch, 4.0/auth-token-reset has been created
        at  1b39bc1cc7450220d2648ebf8f0d95e136730228 (commit)

- Log -----------------------------------------------------------------
commit fafc139961f7a064950bcda627e6a2afe05f087e
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Dec 6 15:13:35 2011 -0500

    Move the signature and reset auth token boxes into the columns
    
    This makes them fit better with the rest of the page, and they certainly
    don't need to be full width.

diff --git a/share/html/User/Prefs.html b/share/html/User/Prefs.html
index a42ece5..ce5516e 100755
--- a/share/html/User/Prefs.html
+++ b/share/html/User/Prefs.html
@@ -102,6 +102,14 @@
   </tr>
 </table>
 </&>
+
+%if ($UserObj->Privileged) {
+<&| /Widgets/TitleBox, title => loc('Signature') &>
+<textarea cols="80" rows="5" name="Signature" class="signature" wrap="hard">
+<%$UserObj->Signature || ''%></textarea>
+</&>
+% }
+
 % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormLeftColumn' );
 </td>
 <td valign="top" class="boxcontainer">
@@ -159,29 +167,16 @@
 </table>
 </&>
 
-% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' );
-</td>
-</tr>
-
-
-<tr><td colspan="2" valign="top" class="boxcontainer">
-%if ($UserObj->Privileged) {
-<br />
-<&| /Widgets/TitleBox, title => loc('Signature') &>
-<textarea cols="80" rows="5" name="Signature" class="signature" wrap="hard">
-<%$UserObj->Signature || ''%></textarea>
-</&>
-% }
-</td></tr>
-
-<tr><td colspan="2" valign="top" class="boxcontainer">
 <&| /Widgets/TitleBox, title => loc('Secret authentication token'), id => "user-prefs-feeds" &>
 
-<p><&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b> below.</&></p>
+<&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b> below.</&>
 
 <& /Elements/Submit, Label => loc('Reset secret authentication token'), Name => "ResetAuthToken" &>
 </&>
-</td></tr>
+
+% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' );
+</td>
+</tr>
 
 </table>
 

commit 1b39bc1cc7450220d2648ebf8f0d95e136730228
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Aug 10 10:28:16 2012 -0700

    Two-step process to reset your AuthToken
    
    This prevents accidental resets which frustratingly break all your existing
    feeds.  The most common case is hitting Enter after changing details.  All your
    changed details were lost and your auth token was reset, leading to much
    frustration.
    
    JS is used to upgrade the button, so any folks without JS (or mechanized web
    scripts) will still see the one-click button.
    
    See [rt3 #19431].

diff --git a/share/html/NoAuth/css/base/forms.css b/share/html/NoAuth/css/base/forms.css
index 19af1b2..e2468fd 100755
--- a/share/html/NoAuth/css/base/forms.css
+++ b/share/html/NoAuth/css/base/forms.css
@@ -269,3 +269,10 @@ form div.submit div.buttons div.next {
 #formatbuttons {
     clear: both;
 }
+
+#ResetAuthTokenPrompt {
+    display: block;
+    text-align: right;
+    font-weight: bold;
+    text-decoration: underline;
+}
diff --git a/share/html/User/Prefs.html b/share/html/User/Prefs.html
index ce5516e..5595f23 100755
--- a/share/html/User/Prefs.html
+++ b/share/html/User/Prefs.html
@@ -171,7 +171,21 @@
 
 <&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b> below.</&>
 
-<& /Elements/Submit, Label => loc('Reset secret authentication token'), Name => "ResetAuthToken" &>
+<a href="#" id="ResetAuthTokenPrompt" style="display: none">
+  <&|/l&>I want to reset my secret token.</&>
+</a>
+<& /Elements/Submit,
+    Label       => loc('Reset secret authentication token'),
+    Name        => "ResetAuthToken",
+    id          => "ResetAuthTokenContainer" &>
+<script>
+    jQuery("#ResetAuthTokenContainer").hide();
+    jQuery("#ResetAuthTokenPrompt").show().click(function(ev){
+        jQuery(this).slideUp();
+        jQuery("#ResetAuthTokenContainer").slideDown();
+        ev.preventDefault();
+    });
+</script>
 </&>
 
 % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormRightColumn' );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list