Ticket #996: 0001-edit_profile.html-Consistency-in-the-width-of-input-.patch

File 0001-edit_profile.html-Consistency-in-the-width-of-input-.patch, 2.1 KB (added by ayleph, 7 years ago)
  • mediagoblin/static/js/show_password.js

    From 670d75f1f748945cf4583eb6d04e2654a4276b83 Mon Sep 17 00:00:00 2001
    From: vijeth-aradhya <vijthaaa@gmail.com>
    Date: Fri, 20 Jan 2017 09:16:42 +0530
    Subject: [PATCH] edit_profile.html: Consistency in the width of input fields
    
    The width of all the input fields in user profile edit
    form (also forms which wtforms render div function) is 100%
    
    Fixes #996
    
    Signed-off-by: Andrew Browning <ayleph@thisshitistemp.com>
    ---
     mediagoblin/static/js/show_password.js               | 2 +-
     mediagoblin/templates/mediagoblin/utils/wtforms.html | 4 ++--
     2 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/mediagoblin/static/js/show_password.js b/mediagoblin/static/js/show_password.js
    index b3fbc862..12935124 100644
    a b  
    1818
    1919$(document).ready(function(){
    2020  //Create a duplicate password field. We could change the input type dynamically, but this angers the IE gods (not just IE6).
    21   $("#password").after('<input type="text" value="" name="password_clear" id="password_clear" /><label><input type="checkbox" id="password_boolean" />Show password</label>');
     21  $("#password").after('<input type="text" value="" name="password_clear" id="password_clear" style="width:100%" /><label><br/><input type="checkbox" id="password_boolean" />Show password</label>');
    2222  $('#password_clear').hide();
    2323  $('#password_boolean').click(function(){
    2424    if($('#password_boolean').prop("checked")) {
  • mediagoblin/templates/mediagoblin/utils/wtforms.html

    diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html
    index 7e16708c..e2921258 100644
    a b  
    4040    {{- render_label_p(field) }}
    4141    <div class="form_field_input">
    4242      {% if autofocus_first %}
    43         {{ field(autofocus=True) }}
     43        {{ field(autofocus=True, style="width:100%;") }}
    4444      {% else %}
    45         {{ field }}
     45        {{ field(style="width:100%;") }}
    4646      {% endif %}
    4747      {%- if field.errors -%}
    4848        {% for error in field.errors %}