Mercurial > kallithea
changeset 5342:40cfdd004bf6
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.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 31 Jul 2015 15:44:07 +0200 |
parents | 2b1928873c0a |
children | 39bac9410169 |
files | kallithea/public/css/style.css kallithea/templates/admin/my_account/my_account_profile.html kallithea/templates/admin/settings/settings_vcs.html kallithea/templates/admin/users/user_edit_profile.html |
diffstat | 4 files changed, 10 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/public/css/style.css Fri Jul 31 15:44:07 2015 +0200 +++ b/kallithea/public/css/style.css Fri Jul 31 15:44:07 2015 +0200 @@ -1227,9 +1227,11 @@ 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%; }
--- a/kallithea/templates/admin/my_account/my_account_profile.html Fri Jul 31 15:44:07 2015 +0200 +++ b/kallithea/templates/admin/my_account/my_account_profile.html Fri Jul 31 15:44:07 2015 +0200 @@ -20,11 +20,9 @@ </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"> @@ -32,7 +30,7 @@ <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>
--- a/kallithea/templates/admin/settings/settings_vcs.html Fri Jul 31 15:44:07 2015 +0200 +++ b/kallithea/templates/admin/settings/settings_vcs.html Fri Jul 31 15:44:07 2015 +0200 @@ -64,7 +64,7 @@ <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> @@ -74,7 +74,7 @@ </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")} @@ -90,7 +90,6 @@ $('#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>
--- a/kallithea/templates/admin/users/user_edit_profile.html Fri Jul 31 15:44:07 2015 +0200 +++ b/kallithea/templates/admin/users/user_edit_profile.html Fri Jul 31 15:44:07 2015 +0200 @@ -18,12 +18,10 @@ </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 @@ -33,7 +31,7 @@ <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> @@ -51,7 +49,7 @@ <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> @@ -60,7 +58,7 @@ <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> @@ -69,7 +67,7 @@ <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> @@ -78,7 +76,7 @@ <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>