diff --git a/app/assets/images/check-mark-small.svg b/app/assets/images/check-mark-small.svg index 9b0e0c6c0c..ab5607b37b 100644 --- a/app/assets/images/check-mark-small.svg +++ b/app/assets/images/check-mark-small.svg @@ -1,3 +1,3 @@ - + diff --git a/app/assets/images/chevron-left.svg b/app/assets/images/chevron-left.svg index 344ea874b9..b47c391a02 100644 --- a/app/assets/images/chevron-left.svg +++ b/app/assets/images/chevron-left.svg @@ -1,4 +1,4 @@ - + diff --git a/app/helpers/assets_helper.rb b/app/helpers/assets_helper.rb index 80676f1a86..c1438c251d 100644 --- a/app/helpers/assets_helper.rb +++ b/app/helpers/assets_helper.rb @@ -1,4 +1,9 @@ module AssetsHelper + def csp_nonce_attributes + nonce = respond_to?(:content_security_policy_nonce) ? content_security_policy_nonce : nil + nonce.present? ? {nonce: nonce} : {} + end + def inline_file(asset_name) if (asset = Rails.application.assets&.find_asset(asset_name)) asset.source.html_safe @@ -9,11 +14,11 @@ def inline_file(asset_name) end def inline_js(asset_name) - content_tag(:script, inline_file(asset_name), type: "text/javascript") + content_tag(:script, inline_file(asset_name), {type: "text/javascript"}.merge(csp_nonce_attributes)) end def inline_stylesheet(asset_name) - content_tag(:style, inline_file(asset_name), type: "text/css") + content_tag(:style, inline_file(asset_name), {type: "text/css"}.merge(csp_nonce_attributes)) end def inline_svg(asset_name, classname: "svg-container") diff --git a/app/views/webview/drug_stocks/index.html.erb b/app/views/webview/drug_stocks/index.html.erb index b5c995a547..844e5f9559 100644 --- a/app/views/webview/drug_stocks/index.html.erb +++ b/app/views/webview/drug_stocks/index.html.erb @@ -1,5 +1,5 @@ - + @@ -13,8 +13,8 @@ <%= inline_stylesheet("user_analytics.css") %> -
- +
+ Done
@@ -31,7 +31,7 @@ See stock in estimated patient days below

-

+

Report for end of <%= @for_end_of_month.to_s(:mon_year) %>

<% @drugs_by_category.each do |category, drugs| %> diff --git a/app/views/webview/drug_stocks/new.html.erb b/app/views/webview/drug_stocks/new.html.erb index 9e7832cdb9..a38e90c84e 100644 --- a/app/views/webview/drug_stocks/new.html.erb +++ b/app/views/webview/drug_stocks/new.html.erb @@ -118,15 +118,15 @@ <% end %> <% end %> -
- <%= form.button "SAVE", class: "d-block w-100 p-16px ta-center bgc-blue tt-uppercase ls-1_25px br-2px fs-16px b-none bs-primary-button bs-border-box", style: "font-weight: 700; color: #ffffff;" %> +
+ <%= form.button "SAVE", class: "d-block w-100 p-16px ta-center fw-bold c-white bgc-blue tt-uppercase ls-1_25px br-2px fs-16px b-none bs-primary-button bs-border-box" %>
<% end %>
-