Guest User

Untitled

a guest
May 28th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. <div id="doctors_edit_form">
  2.  
  3. <%= render :partial => 'profile_tabs' %>
  4.  
  5. <div id="general_information" class="profile_tabs">
  6. <% form_for current_user do |f| -%>
  7. <%= render :partial => 'shared/fields_profile_general', :locals => { :f => f } %>
  8. <div><%= submit_tag 'Save General Information' %></div>
  9. <% end -%>
  10. </div> <%# general_information -%>
  11.  
  12. <div id="profile_information" class="profile_tabs">
  13. <% form_for @doctor do |f| -%>
  14. <%= render :partial => 'fields', :locals => { :f => f } %>
  15. <% end -%>
  16. <div class="tab_footer"><%= submit_tag 'Save' %></div>
  17. </div> <%# profile_information %>
  18.  
  19. </div> <%# doctors_edit_form %>
  20.  
  21. <script type="text/javascript" charset="utf-8">
  22. document.observe('dom:loaded', initShowWindow);
  23. function initShowWindow(e) {
  24. $$('.profile_tabs').each(function (elt) {
  25. elt.observe('click', hideMatchingWindow);
  26. });
  27. };
  28.  
  29. function hideMatchingWindow(e) {
  30. var id = e.element().id.replace(/(.*)_information/, $1);
  31. console.log(id);
  32. // $(id).hide();
  33. // this.show();
  34. }
  35.  
  36. </script>
Add Comment
Please, Sign In to add comment