include accessibility.css by default but view can choose to not include it

* call disable_accessibility_css! in view to not include css
pull/41/head
Jens Ulferts 13 years ago
parent 04a73ca6d1
commit 965e466362
  1. 8
      app/helpers/application_helper.rb
  2. 2
      app/views/account/login.rhtml
  3. 2
      app/views/account/lost_password.rhtml
  4. 2
      app/views/account/password_recovery.rhtml
  5. 2
      app/views/account/register.rhtml
  6. 2
      app/views/layouts/base.rhtml

@ -1146,6 +1146,14 @@ module ApplicationHelper
@top_menu_split
end
def disable_accessibility_css!
@accessibility_css_disabled = true
end
def accessibility_css_enabled?
!@accessibility_css_disabled
end
private
def wiki_helper

@ -1,3 +1,5 @@
<% disable_accessibility_css! %>
<% breadcrumb_paths(l(:label_login)) %>
<%= call_hook :view_account_login_top %>
<div id="login-form">

@ -1,3 +1,5 @@
<% disable_accessibility_css! %>
<h2><%=l(:label_password_lost)%></h2>
<div class="box">

@ -1,3 +1,5 @@
<% disable_accessibility_css! %>
<h2><%=l(:label_password_lost)%></h2>
<%= error_messages_for 'user' %>

@ -1,3 +1,5 @@
<% disable_accessibility_css! %>
<h2><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h2>
<% form_tag({:action => 'register'}, :class => "tabular") do %>

@ -22,7 +22,7 @@
<%= javascript_include_tag 'breadcrumb.js' %>
<%= javascript_include_tag 'chosen.js'%>
<%= stylesheet_link_tag 'chosen'%>
<% if User.current.impaired? %>
<% if User.current.impaired? && accessibility_css_enabled? %>
<%= stylesheet_link_tag 'accessibility' %>
<% end %>
<%= javascript_tag('jQuery.noConflict();') %>

Loading…
Cancel
Save