Browse Source

CLDC-4237: Fix erb files

pull/3190/head
samyou-softwire 4 weeks ago
parent
commit
696a1594c9
  1. 0
      .erb_lint.yml
  2. 32
      Gemfile.lock
  3. 2
      app/views/form/_checkbox_question.html.erb
  4. 4
      app/views/form/_interruption_screen_question.html.erb
  5. 4
      app/views/form/_radio_question.html.erb
  6. 2
      app/views/rails_admin/main/_submit_buttons.html.erb
  7. 2
      app/views/rails_admin/main/dashboard.html.erb
  8. 2
      app/views/rails_admin/main/delete.html.erb
  9. 2
      lib/tasks/lint.rake

0
.erb-lint.yml → .erb_lint.yml

32
Gemfile.lock

@ -113,15 +113,15 @@ GEM
thread_safe (~> 0.3, >= 0.3.1)
base64 (0.3.0)
bcrypt (3.1.20)
benchmark (0.4.1)
better_html (2.0.2)
actionview (>= 6.0)
activesupport (>= 6.0)
benchmark (0.5.0)
better_html (2.2.0)
actionview (>= 7.0)
activesupport (>= 7.0)
ast (~> 2.0)
erubi (~> 1.4)
parser (>= 2.4)
smart_properties
bigdecimal (3.2.2)
bigdecimal (4.0.1)
bindex (0.8.1)
bootsnap (1.18.3)
msgpack (~> 1.2)
@ -151,8 +151,8 @@ GEM
coderay (1.1.3)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.3.5)
connection_pool (2.5.3)
concurrent-ruby (1.3.6)
connection_pool (3.0.2)
crack (1.0.0)
bigdecimal
rexml
@ -184,12 +184,12 @@ GEM
drb (2.2.3)
dumb_delegator (1.0.0)
encryptor (3.0.0)
erb_lint (0.5.0)
erb_lint (0.9.0)
activesupport
better_html (>= 2.0.1)
parser (>= 2.7.1.4)
rainbow
rubocop
rubocop (>= 1)
smart_properties
erubi (1.13.1)
et-orbi (1.2.11)
@ -232,7 +232,7 @@ GEM
hashdiff (1.1.0)
html-attributes-utils (1.0.2)
activesupport (>= 6.1.4.4)
i18n (1.14.7)
i18n (1.14.8)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
iniparse (1.5.0)
@ -269,7 +269,7 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
loofah (2.24.0)
loofah (2.25.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@ -281,7 +281,9 @@ GEM
matrix (0.4.2)
method_source (1.1.0)
mini_mime (1.1.5)
minitest (5.25.5)
minitest (6.0.2)
drb (~> 2.0)
prism (~> 1.5)
msgpack (1.7.2)
multipart-post (2.4.1)
nested_form (0.3.2)
@ -378,7 +380,7 @@ GEM
activesupport (= 7.2.2.2)
bundler (>= 1.15.0)
railties (= 7.2.2.2)
rails-dom-testing (2.2.0)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
@ -528,7 +530,9 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uk_postcode (2.1.8)
unicode-display_width (2.6.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
unread (0.14.0)
activerecord (>= 6.1)
uri (1.0.4)

2
app/views/form/_checkbox_question.html.erb

@ -16,7 +16,7 @@
hint: { text: option["hint"] },
checked: @log[key] == 1,
exclusive: after_divider,
link_errors: index.zero? ? true : nil,
link_errors: index.zero? || nil,
**stimulus_html_attributes(question) %>
<% end %>
<% end %>

4
app/views/form/_interruption_screen_question.html.erb

@ -18,7 +18,7 @@
<div class="govuk-button-group">
<%= f.govuk_submit "Confirm and continue" %>
<%= govuk_link_to(
(@page.skip_text || "Skip for now"),
(@page.skip_href(@log) || send(@log.form.next_page_redirect_path(@page, @log, current_user, ignore_answered: true), @log)),
@page.skip_text || "Skip for now",
@page.skip_href(@log) || send(@log.form.next_page_redirect_path(@page, @log, current_user, ignore_answered: true), @log),
) %>
</div>

4
app/views/form/_radio_question.html.erb

@ -28,14 +28,14 @@
key,
label: { text: options["value"] },
hint: { text: options["hint"] },
link_errors: index.zero? ? true : nil,
link_errors: index.zero? || nil,
**stimulus_html_attributes(question) %>
<% else %>
<%= f.govuk_radio_button question.id.to_sym,
key,
label: { text: options["value"] },
hint: { text: options["hint"] },
link_errors: index.zero? ? true : nil,
link_errors: index.zero? || nil,
**stimulus_html_attributes(question) do %>
<%= render partial: "#{conditional_question.type}_question", locals: {
question: conditional_question,

2
app/views/rails_admin/main/_submit_buttons.html.erb

@ -1,6 +1,6 @@
<div class="form-actions row justify-content-end my-3">
<div class="col-sm-10">
<input name="return_to" type="<%= :hidden %>" value="<%= (params[:return_to].presence || request.referer) %>">
<input name="return_to" type="<%= :hidden %>" value="<%= params[:return_to].presence || request.referer %>">
<button class="govuk-button" data-disable-with="<%= t("admin.form.save") %>" name="_save" type="submit"<%= " disabled" unless @action.enabled? %>>
<i class="fas fa-check"></i>
<%= t("admin.form.save") %>

2
app/views/rails_admin/main/dashboard.html.erb

@ -40,7 +40,7 @@
-1
end %>
<div class="<%= active ? "active progress-bar-striped " : "" %>progress" style="margin-bottom:0px">
<div class="bg-<%= get_indicator(percent) %> progress-bar animate-width-to" data-animate-length="<%= ([1.0, percent].max.to_i * 20) %>" data-animate-width-to="<%= [2.0, percent].max.to_i %>%" style="width:2%">
<div class="bg-<%= get_indicator(percent) %> progress-bar animate-width-to" data-animate-length="<%= [1.0, percent].max.to_i * 20 %>" data-animate-width-to="<%= [2.0, percent].max.to_i %>%" style="width:2%">
<%= @count[abstract_model.model.name] %>
</div>
</div>

2
app/views/rails_admin/main/delete.html.erb

@ -7,7 +7,7 @@
<%= render partial: "delete_notice", object: @object %>
</ul>
<%= form_for(@object, url: delete_path(model_name: @abstract_model.to_param, id: @object.id), html: { method: "delete" }) do %>
<input name="return_to" type="<%= :hidden %>" value="<%= (params[:return_to].presence || request.referer) %>">
<input name="return_to" type="<%= :hidden %>" value="<%= params[:return_to].presence || request.referer %>">
<div class="form-actions">
<button class="govuk-button govuk-button--warning" data-disable-with="<%= t("admin.form.confirmation") %>" type="submit">
<i class="fas fa-check"></i>

2
lib/tasks/lint.rake

@ -5,7 +5,7 @@ end
desc "Run ERB Lint"
task erblint: :environment do
sh "bundle exec erblint --lint-all"
sh "bundle exec erb_lint --lint-all"
end
desc "Run Standard"

Loading…
Cancel
Save