afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-07-04 09:57 am

[dw-free] crossposter: /update.bml checkboxes end up in wrong state

[commit: http://hg.dwscoalition.org/dw-free/rev/167f8645244e]

http://bugs.dwscoalition.org/show_bug.cgi?id=1167

Hide crossposter checkboxes when trying to post to an alternate account
(clicking the "Switch" link). Also fixes the submit button text when there
are no custom friends groups.

Patch by [personal profile] kareila.

Files modified:
  • htdocs/js/entry.js
--------------------------------------------------------------------------------
diff -r 419d66008bc2 -r 167f8645244e htdocs/js/entry.js
--- a/htdocs/js/entry.js	Sat Jul 04 08:34:43 2009 +0000
+++ b/htdocs/js/entry.js	Sat Jul 04 09:56:53 2009 +0000
@@ -132,30 +132,32 @@ function altlogin (e) {
     var mood_preview = $('mood_preview');
     mood_preview.style.display = 'none';
 
-    f = document.updateForm;
-    if (! f) return false;
-    f.action = 'update.bml?altlogin=1';
-    
-    var custom_boxes = $('custom_boxes');
-    if (! custom_boxes) return false;
-    custom_boxes.style.display = 'none';
-    if (f.security) {
-        f.security.options[3] = null;
-    }
-    
-    f.security.selectedIndex = 0;
+    changeSubmit('Post to Journal');
 
-    if (e) {
-        e.cancelBubble = true;
-        if (e.stopPropagation) e.stopPropagation();
-    }
-
-    changeSubmit('Post to Journal');
+    $('xpostdiv').style.display = 'none';
 
     if ($('usejournal_username')) {
         changeSecurityOptions($('usejournal_username').value);
     } else {
         changeSecurityOptions('');
+    }
+
+    f = document.updateForm;
+    if (! f) return false;
+    f.action = 'update.bml?altlogin=1';
+    
+    if (f.security) {
+        f.security.options[3] = null;
+        f.security.selectedIndex = 0;
+    }
+
+    var custom_boxes = $('custom_boxes');
+    if (! custom_boxes) return false;
+    custom_boxes.style.display = 'none';
+
+    if (e) {
+        e.cancelBubble = true;
+        if (e.stopPropagation) e.stopPropagation();
     }
 
     return false;    
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org