Skip to content

Commit

Permalink
fix bugs from turbo implementation. #881
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbaumann1 committed Nov 30, 2021
1 parent fbee67f commit b67103f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/devise/sessions/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="grid-x">
<div class="cell">
<%= f.text_field :uid, autocomplete: "email", placeholder: 'Email address', class: 'small-12 medium-4' %>
<%= f.text_field :uid, autocomplete: "email", placeholder: 'Email address' %>
</div>
</div>
<div class="grid-x ">
Expand Down
2 changes: 1 addition & 1 deletion app/views/grant_submissions/forms/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- disable_fields = !(@form.available? && current_user_may_edit)

:javascript
$(function(){Grant.FormBuilderSurvey.init();});
document.addEventListener('turbo:load', function(){Grant.FormBuilderSurvey.init();});
document.addEventListener("trix-initialize", function(event) {
var elementButtons = event.target.toolbarElement.querySelectorAll("button")
for (i=0; i<elementButtons.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
= csrf_meta_tags
= csp_meta_tag
= stylesheet_link_tag 'application', media: 'all', "data-turbo-track": "reload", defer: true
= stylesheet_link_tag wicked_pdf_asset_base64("pdf")
= wicked_pdf_stylesheet_link_tag "pdf"
= javascript_include_tag "application", "data-turbo-track": "reload", defer: true


Expand Down
1 change: 1 addition & 0 deletions config/initializers/mime_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf

# Added for wicked_pdf. https://github.com/mileszs/wicked_pdf
Mime::Type.register "application/pdf", :pdf

0 comments on commit b67103f

Please sign in to comment.