Commits

Anonymous committed fbf588b

fix some oddities in ui.

Comments (0)

Files changed (3)

static/js/src/friendpaste.js

         this.privacy.addEventListener('click', this.handlePrivacy.bind(this), false);
             
         this.showPrivacy = false;
+        if (this.privacy.classList.has('setPrivacy'))
+            this.showPrivacy = true;
+
         document.querySelector("#paste_snippet").focus();
     },
 
         } else {
             password.value = "";
             pselect.options.selectedIndex = 0;
+            if (ppassword.classList.has('errors'))
+                ppassword.classList.remove('errors');
+
             try {
                  pselect.removeEventListener('change', enablePassword, false);
             } catch (e) {}

templates/paste/index.html

             <li><strong>Paste text:</strong><ul>{% for e in form.snippet.errors %}<li>{{ e }}</li>{% endfor %}</ul></li>
             {% endif %}
             {% if form.privacy.errors %}
-            <li><strong>Paste password:</strong><ul>{% for e in form.password.errors %}<li>{{ e }}</li>{% endfor %}</ul></li>
+            <li><strong>Paste password:</strong><ul>{% for e in form.privacy.errors %}<li>{{ e }}</li>{% endfor %}</ul></li>
             {% endif %}
         </ul>
         {% endif %}
                 }}<p class="tip">Removal/Lock code is a password to let you
         <strong>remove</strong> or 
         <strong>lock edit</strong> of paste you upload.</p></li>
-            <li><span class="privacy">Privacy settings</span>
+            <li><span class="privacy{% if form.data['privacy'] != "open"%} setPrivacy{% endif %}">Privacy settings</span>
             <ol id="privacy"{% if form.data['privacy'] == "open"%} class="hidden"{% endif %}>
                 <li>{{ form.privacy.label }}{{ form.privacy }}</li>
                     <li{% if form.privacy.errors %}

templates/paste/view.html

         </header>
         
         <div id="paste_wrapper">
-
             <div id="paste" class="highlight">
             {{ snippet.content|highlight(snippet.language, reviews_counts) }}
             </div>