From 5d48741019ff31a373ef0a8d8fe234d8d215c81e Mon Sep 17 00:00:00 2001 From: braydonjustice Date: Wed, 27 Nov 2024 23:27:08 -0800 Subject: [PATCH] Changed pages save button to 'submit' type to stop simpleform from injecting classes into the button. Fixes button color being white instead fo blue. --- app/views/hyrax/pages/_form.html.erb | 96 ++++++++++++++++++++++++++++ config/locales/hyrax.en.yml | 1 + 2 files changed, 97 insertions(+) create mode 100644 app/views/hyrax/pages/_form.html.erb diff --git a/app/views/hyrax/pages/_form.html.erb b/app/views/hyrax/pages/_form.html.erb new file mode 100644 index 000000000..1044dd37c --- /dev/null +++ b/app/views/hyrax/pages/_form.html.erb @@ -0,0 +1,96 @@ +<%# Copied from Hyrax v5.0.1 to correct button coloring since simpleform overrides hyku classes. %> +<%= render "shared/nav_safety_modal" %> +
+ + + +
+
+
+ <%= simple_form_for ContentBlock.for(:about), url: hyrax.page_path(ContentBlock.for(:about)), html: { class: 'nav-safety' } do |f| %> +
+
+ <%= f.label :about %>
+ <%= f.text_area :about, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+ <%= simple_form_for ContentBlock.for(:help), url: hyrax.page_path(ContentBlock.for(:help)), html: { class: 'nav-safety' } do |f| %> +
+
+ <%= f.label :help %>
+ <%= f.text_area :help, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+ <%= simple_form_for ContentBlock.for(:agreement), url: hyrax.page_path(ContentBlock.for(:agreement)), html: { class: 'nav-safety' } do |f| %> +
+
+ <%= f.label :agreement %>
+ <%= f.text_area :agreement, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+
+ <%= simple_form_for ContentBlock.for(:terms), url: hyrax.page_path(ContentBlock.for(:terms)), html: { class: 'nav-safety' } do |f| %> +
+
+ <%= f.label :terms %>
+ <%= f.text_area :terms, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %> +
+
+ + <% end %> +
+
+
+ +
+<%= tinymce :content_block %> \ No newline at end of file diff --git a/config/locales/hyrax.en.yml b/config/locales/hyrax.en.yml index c18a64c8f..8def5a040 100644 --- a/config/locales/hyrax.en.yml +++ b/config/locales/hyrax.en.yml @@ -942,6 +942,7 @@ en: change_tab_message: Are you sure you want to leave this tab? Any unsaved data will be lost. pages: cancel: Cancel + update: Save changes tabs: about_page: About Page agreement_page: Deposit Agreement