Changeset - 40cfdd004bf6
[Not reviewed]
default
0 4 0
Mads Kiilerich - 10 years ago 2015-07-31 15:44:07
madski@unity3d.com
css: match on the readonly-ness instead of explicitly setting 'disabled' class on input elements

Note: the 'disabled' class is 'readonly' and different from the html/css
'disabled' concept.
4 files changed with 10 insertions and 13 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -1224,15 +1224,17 @@ div.label-summary label {
 
    color: #000000;
 
    font-size: 12px;
 
    margin: 0;
 
    padding: 7px 7px 6px;
 
}
 

	
 
input[readonly],
 
input.disabled {
 
    background-color: #F5F5F5 !important;
 
}
 

	
 
#content div.box div.form div.fields div.field div.input input.small {
 
    width: 30%;
 
}
 

	
 
#content div.box div.form div.fields div.field div.input input.medium {
 
    width: 55%;
kallithea/templates/admin/my_account/my_account_profile.html
Show inline comments
 
@@ -17,25 +17,23 @@ ${h.form(url('my_account'), method='post
 
                %endif
 
               </p>
 
           </div>
 
         </div>
 

	
 
        <% readonly = None %>
 
        <% disabled = "" %>
 
        <div class="fields">
 
            %if c.user.extern_type != c.EXTERN_TYPE_INTERNAL:
 
                <% readonly = "readonly" %>
 
                <% disabled = " disabled" %>
 
                <strong>${_('Your user is in an external Source of Record; some details cannot be managed here')}.</strong>
 
            %endif
 
             <div class="field">
 
                <div class="label">
 
                    <label for="username">${_('Username')}:</label>
 
                </div>
 
                <div class="input">
 
                  ${h.text('username',class_='medium%s' % disabled, readonly=readonly)}
 
                  ${h.text('username',class_='medium', readonly=readonly)}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="name">${_('First Name')}:</label>
kallithea/templates/admin/settings/settings_vcs.html
Show inline comments
 
@@ -61,23 +61,23 @@ ${h.form(url('admin_settings'), method='
 
            %if c.visual.allow_repo_location_change:
 
            <div class="field">
 
                <div class="label">
 
                    <label for="paths_root_path">${_('Location of repositories')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('paths_root_path',size=60,readonly="readonly", class_="disabled")}
 
                    ${h.text('paths_root_path',size=60,readonly="readonly")}
 
                    <span id="path_unlock" class="tooltip" style="cursor: pointer"
 
                            title="${_('Click to unlock. You must restart Kallithea in order to make this setting take effect.')}">
 
                        <div class="btn btn-small"><i id="path_unlock_icon" class="icon-lock"></i></div>
 
                    </span>
 
                    <span class="help-block">${_('Filesystem location where repositories are stored. After changing this value, a restart and rescan of the repository folder are both required.')}</span>
 
                </div>
 
            </div>
 
            %else:
 
            ## form still requires this but we cannot internally change it anyway
 
            ${h.hidden('paths_root_path',size=30,readonly="readonly", class_="disabled")}
 
            ${h.hidden('paths_root_path',size=30,readonly="readonly")}
 
            %endif
 
            <div class="buttons">
 
                ${h.submit('save',_('Save Settings'),class_="btn")}
 
                ${h.reset('reset',_('Reset'),class_="btn")}
 
           </div>
 
        </div>
 
@@ -87,10 +87,9 @@ ${h.form(url('admin_settings'), method='
 
    <script type="text/javascript">
 
        $(document).ready(function(){
 
            $('#path_unlock').on('click', function(e){
 
                $('#path_unlock_icon').removeClass('icon-lock');
 
                $('#path_unlock_icon').addClass('icon-lock-open-alt');
 
                $('#paths_root_path').removeAttr('readonly');
 
                $('#paths_root_path').removeClass('disabled');
 
            });
 
        });
 
    </script>
kallithea/templates/admin/users/user_edit_profile.html
Show inline comments
 
@@ -15,28 +15,26 @@ ${h.form(url('update_user', id=c.user.us
 
                            [${_('Current IP')}: ${c.ip_addr}]
 
                        %endif
 
                %endif
 
           </div>
 
        </div>
 
        <% readonly = None %>
 
        <% disabled = "" %>
 
        <div class="fields">
 
            %if c.user.extern_type != c.EXTERN_TYPE_INTERNAL:
 
             <div class="field">
 
               <% readonly = "readonly" %>
 
               <% disabled = " disabled" %>
 
               <strong>${_('This user is in an external Source of Record (%s); some details cannot be managed here.' % c.user.extern_type)}.</strong>
 
             </div>
 
            %endif
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="username">${_('Username')}:</label>
 
                </div>
 
                <div class="input">
 
                  ${h.text('username',class_='medium%s' % disabled, readonly=readonly)}
 
                  ${h.text('username',class_='medium', readonly=readonly)}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="email">${_('Email')}:</label>
 
@@ -48,40 +46,40 @@ ${h.form(url('update_user', id=c.user.us
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="extern_type">${_('Source of Record')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('extern_type',class_='medium disabled',readonly="readonly")}
 
                    ${h.text('extern_type',class_='medium',readonly="readonly")}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="extern_name">${_('Name in Source of Record')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('extern_name',class_='medium disabled',readonly="readonly")}
 
                    ${h.text('extern_name',class_='medium',readonly="readonly")}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="new_password">${_('New password')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.password('new_password',class_='medium%s' % disabled,readonly=readonly)}
 
                    ${h.password('new_password',class_='medium',readonly=readonly)}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="password_confirmation">${_('New password confirmation')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.password('password_confirmation',class_="medium%s" % disabled,readonly=readonly)}
 
                    ${h.password('password_confirmation',class_="medium",readonly=readonly)}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="firstname">${_('First Name')}:</label>
0 comments (0 inline, 0 general)