The only things that MSIE can render as table cells are... table cells!
| 6 | :id => 'passwords_do_not_match', :class => 'warning', | :id => 'passwords_do_not_match', :class => 'warning', | 6 |
|---|---|---|---|
| 7 | :style=> 'display:none' %> | :style=> 'display:none' %> | 7 |
| 8 | <% form_tag :controller => 'account', :action=> 'login' do %> | <% form_tag :controller => 'account', :action=> 'login' do %> | 8 |
| 9 | <div class="authorization_cell"> | <table> | 9 |
| 10 | <%= content_tag :label, 'User'.t, :for=> 'user_login'%><br /> | <tbody> | 10 |
| 11 | <%= text_field 'user', 'login', :size => 12, | <tr> | 11 |
| 12 | :value => flash[:desired_login] %> | <td class="authorization_cell"> | 12 |
| 13 | </div> | <%= content_tag :label, 'User'.t, :for=> 'user_login'%><br /> | 13 |
| 14 | <div class="authorization_cell"> | <%= text_field 'user', 'login', :size => 12, | 14 |
| 15 | <%= content_tag :label, 'Password'.t, :for=> 'user_password'%><br /> | :value => flash[:desired_login] %> | 15 |
| 16 | <%= password_field 'user', 'password', :size => 12 %> | </td> | 16 |
| 17 | </div> | <td class="authorization_cell"> | 17 |
| 18 | <div id="password_confirm" class="authorization_cell" style="display: none;"> | <%= content_tag :label, 'Password'.t, :for=> 'user_password'%><br /> | 18 |
| 19 | <%= content_tag :label, 'Confirmation'.t, :for=> 'user_password_confirmation'%> | <%= password_field 'user', 'password', :size => 12 %> | 19 |
| 20 | <%= password_field 'user', 'password_confirmation', | </td> | 20 |
| 21 | :size => 12, | <td id="password_confirm" class="authorization_cell" style="display: none;"> | 21 |
| 22 | :disabled => true %> | <%= content_tag :label, 'Confirmation'.t, :for=> 'user_password_confirmation'%><br /> | 22 |
| 23 | </div> | <%= password_field 'user', 'password_confirmation', | 23 |
| 24 | <div class="authorization_cell"> | :size => 12, | 24 |
| 25 | <input type="checkbox" id="chk_new_user" | :disabled => true %> | 25 |
| 26 | name="chk_new_user" class="checkbox" | </td> | 26 |
| 27 | onClick="tooglePasswordConfirmation(document.forms[0].chk_new_user.checked)" /> | <td class="authorization_cell"> | 27 |
| 28 | <%= 'New user?'.t %><br /> | <input type="checkbox" id="chk_new_user" | 28 |
| 29 | <input type='hidden' name='return_to' value="<%= request.env['REQUEST_URI'] -%>"/> | name="chk_new_user" class="checkbox" | 29 |
| 30 | <input class='button' type="submit" name="login" value="Login »" /> | onClick="tooglePasswordConfirmation(document.forms[0].chk_new_user.checked)" /> | 30 |
| 31 | </div> | <%= 'New user?'.t %><br /> | 31 |
<input type='hidden' name='return_to' value="<%= request.env['REQUEST_URI'] -%>"/> | 32 | ||
<input class='button' type="submit" name="login" value="Login »" /> | 33 | ||
</td> | 34 | ||
</tr> | 35 | ||
</tbody> | 36 | ||
</table> | 37 | ||
| 32 | <% if flash[:login_failure] %> | <% if flash[:login_failure] %> | 38 |
| 33 | <%= content_tag(:span, | <%= content_tag(:span, | 39 |
| 34 | 'Incorrect username or password. Please try again.'.t, | 'Incorrect username or password. Please try again.'.t, | 40 |
| 1 | <% if @login_not_available %> | <% if @login_not_available %> | 1 |
|---|---|---|---|
| 2 | <span class="warning" id="username_not_available"><%= 'Not available'.t -%></span> | <span class="warning" id="username_not_available"><%= 'Not available'.t -%></span> | 2 |
| 3 | <% else %> | <% end %> | 3 |
| 4 | <span style="position: absolute" /> | ||
| 5 | <% end %> |
| 51 | } | } | 51 |
|---|---|---|---|
| 52 | 52 | ||
| 53 | function tooglePasswordConfirmation(show) { | function tooglePasswordConfirmation(show) { | 53 |
| 54 | var elem = document.getElementById('password_confirm'); | var display = show ? '' : 'none'; | 54 |
| 55 | var state = show ? 'block' : 'none'; | document.getElementById("authentication_errors").style.display = display; | 55 |
| 56 | var action = show ? '#{url_for :controller => 'account', :action => 'signup'}' : '#{url_for :controller => 'account', :action => 'login'}' ; | document.getElementById('password_confirm').style.display = display; | 56 |
| 57 | 57 | ||
| 58 | document.getElementById("user_password_confirmation").disabled = !show; | document.getElementById("user_password_confirmation").disabled = !show; | 58 |
| 59 | document.getElementById("authentication_errors").style.display = state; | ||
| 60 | document.forms[0].action = action; | ||
| 61 | 59 | ||
| 62 | elem.style.display = state; | document.forms[0].action = show ? '#{url_for :controller => 'account', :action => 'signup'}' : '#{url_for :controller => 'account', :action => 'login'}'; | 60 |
| 63 | } | } | 61 |
| 64 | 62 | ||
| 65 | function check_password_confirmation() { | function check_password_confirmation() { | 63 |
| 64 more lines | |||
| 130 | } | } | 128 |
| 131 | return(objlist); | return(objlist); | 129 |
| 132 | } | } | 130 |
| 133 | JS | JS | 131 |
| 26 | margin: 0; | margin: 0; | 26 |
|---|---|---|---|
| 27 | padding: 0; | padding: 0; | 27 |
| 28 | position: relative; | position: relative; | 28 |
| 29 | height: 3em; | ||
| 30 | } | } | 29 |
| 31 | 30 | ||
| 32 | div.authorization_cell { | div.authorization_cell { | 31 |
| 305 more lines | |||
| 338 | padding: 0 3px 0 3px | padding: 0 3px 0 3px | 337 |
| 339 | } | } | 338 |
| 340 | 339 | ||
#authentication_errors { | 340 | ||
position: absolute; | 341 | ||
top: 0px; | 342 | ||
left: 0px; | 343 | ||
width: 100%; | 344 | ||
height: 0px; | 345 | ||
} | 346 | ||
| 347 | |||
| 341 | #username_not_available { | #username_not_available { | 348 |
| 342 | position: absolute; | position: absolute; | 349 |
| 343 | top: 12px; | top: 12px; | 350 |