Commits

Mike Griffith  committed 5f17563

alert user when leaving to go to twitter for oauth verification

  • Participants
  • Parent commits 6afbb6b

Comments (0)

Files changed (1)

File zine/plugins/twitter/templates/admin/twitter.html

   {% endtrans %}</p>
   <h2>Twitter Account Details</h2>
   {%- call form() %}
-    <p>oauth PIN: {{ form.oauth_pin(onchange="setOauthPinChanged()") }}</p>
-    <p><a href="{{ oauth_url }}" target="_blank">Reset oauth PIN</a></p>
+    <p>oauth PIN: {{ form.oauth_pin() }}</p>
+    <p><a id="oauth_url" href="{{ oauth_url }}" target="_blank">Reset oauth PIN</a></p>
     {{ form.oauth_pin_changed() }}
     {{ form.oauth_request_token_key() }}
     {{ form.oauth_request_token_secret() }}
     <script type="text/javascript">
-        function setOauthPinChanged() {
+    $(document).ready(function(){
+        $("input#f_oauth_pin").change(function(evt){
             $("input#f_oauth_pin_changed").val("1");
-        }
+        });
+        $("a#oauth_url").click(function(evt){
+            alert("You are being directed to twitter.com.\n"
+                + "When finished, copy the PIN number, return to this page, \n"
+                + "and enter it in the text box above.");
+        });
+    });
     </script>
     <h2>Other Settings</h2>
     <p>Tweet template: {{ form.message_template() }} (HINT: use {url} and {title} placeholders)</p>