Skip to content

Commit

Permalink
Quick update to increase character limits on inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrett committed Feb 21, 2024
1 parent 71bd2d2 commit e2e1087
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/views/admin/content_blocks/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<%= form.govuk_error_summary order: %i[name description markdown] %>

<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.govuk_text_field :name, label: {text: "Name - this should be provided by the developers, it refers to part of the fixed pages"}, disabled: content_block&.id, 'data-character-counter-target': 'input', maxlength: '254', hint: {text: "<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the name.</p>".html_safe} %>
<%= form.govuk_text_field :name, label: {text: "Name - this should be provided by the developers, it refers to part of the fixed pages"}, disabled: content_block&.id, 'data-character-counter-target': 'input', maxlength: '10000', hint: {text: "<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the name.</p>".html_safe} %>
</div>

<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.govuk_text_field :description, label: {text: "Description - where does this appear in the site ?"}, 'data-character-counter-target': 'input', maxlength: '254', hint: {text: "<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the description.</p>".html_safe} %>
<%= form.govuk_text_field :description, label: {text: "Description - where does this appear in the site ?"}, 'data-character-counter-target': 'input', maxlength: '10000', hint: {text: "<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the description.</p>".html_safe} %>
</div>

<!-- This text_area is not rendered with gov_text_field because it needs to
Expand Down
10 changes: 5 additions & 5 deletions app/views/admin/content_page_versions/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= form.govuk_error_summary order: %i[title markdown] %>

<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.govuk_text_field :title, label: {text: "Heading"}, :class => 'govuk-input govuk-!-width-three-quarters', 'data-character-counter-target': 'input', maxlength: '254' %>
<%= form.govuk_text_field :title, label: {text: "Heading"}, :class => 'govuk-input govuk-!-width-three-quarters', 'data-character-counter-target': 'input', maxlength: '10000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the title.</p>
</div>

Expand All @@ -19,15 +19,15 @@
Introduction
</label>
<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.text_area :intro, id: 'intro-editor', rows: 8, cols: 35, class: 'govuk-input govuk-textarea', 'data-character-counter-target': 'input', maxlength: '254' %>
<%= form.text_area :intro, id: 'intro-editor', rows: 8, cols: 35, class: 'govuk-input govuk-textarea', 'data-character-counter-target': 'input', maxlength: '10000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the introduction.</p>
</div>

<label id="content-list-hint" for="content-list-editor" class="govuk-label">
Table of contents
</label>
<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.text_area :content_list, id: 'content-list-editor', rows: 8, cols: 35, class: 'govuk-input govuk-textarea', 'data-character-counter-target': 'input', maxlength: '254' %>
<%= form.text_area :content_list, id: 'content-list-editor', rows: 8, cols: 35, class: 'govuk-input govuk-textarea', 'data-character-counter-target': 'input', maxlength: '10000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the content list.</p>
</div>

Expand All @@ -42,10 +42,10 @@
<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.text_area :markdown, :id => 'markdown-editor', :rows => 20, :cols => 35, :class => govuk_input_classes(:textarea, errors: @content_page_version.errors[:markdown]), 'data-character-counter-target': 'input', maxlength: '30000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the markdown.</p>
</div>
</div>

<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.govuk_text_area :description, label: {text: "Meta Description"}, 'data-character-counter-target': 'input', maxlength: '254' %>
<%= form.govuk_text_area :description, label: {text: "Meta Description"}, 'data-character-counter-target': 'input', maxlength: '10000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the description.</p>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions app/views/admin/content_pages/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= form.govuk_error_summary order: %i[title markdown position] %>

<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.govuk_text_field :title, label: {text: "Heading"}, :class => 'govuk-input govuk-!-width-three-quarters', disabled: (@content_page.title && !content_page.parent_id), 'data-character-counter-target': 'input', maxlength: '254' %>
<%= form.govuk_text_field :title, label: {text: "Heading"}, :class => 'govuk-input govuk-!-width-three-quarters', disabled: (@content_page.title && !content_page.parent_id), 'data-character-counter-target': 'input', maxlength: '10000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the title.</p>
</div>

Expand All @@ -18,15 +18,15 @@
Introduction
</label>
<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.text_area :intro, id: 'intro-editor', rows: 8, cols: 35, class: 'govuk-input govuk-textarea', 'data-character-counter-target': 'input', maxlength: '254' %>
<%= form.text_area :intro, id: 'intro-editor', rows: 8, cols: 35, class: 'govuk-input govuk-textarea', 'data-character-counter-target': 'input', maxlength: '10000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the introduction.</p>
</div>

<label id="content-list-hint" for="content-list-editor" class="govuk-label">
Table of contents
</label>
<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.text_area :content_list, id: 'content-list-editor', rows: 8, cols: 35, class: 'govuk-input govuk-textarea', 'data-character-counter-target': 'input', maxlength: '254' %>
<%= form.text_area :content_list, id: 'content-list-editor', rows: 8, cols: 35, class: 'govuk-input govuk-textarea', 'data-character-counter-target': 'input', maxlength: '10000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the content list.</p>
</div>

Expand All @@ -41,13 +41,13 @@
<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.text_area :markdown, :id => 'markdown-editor', :rows => 20, :cols => 35, :class => govuk_input_classes(:textarea, errors: @content_page.errors[:markdown]), 'data-character-counter-target': 'input', maxlength: '30000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the markdown.</p>
</div>
</div>

<%= form.hidden_field :parent_id, id: "parent_id" %>
<%= form.govuk_text_field :position, label: {text: "Position"}%>

<div data-controller='character-counter' data-character-counter-countdown-value='true'>
<%= form.govuk_text_area :description, label: {text: "Meta Description"}, 'data-character-counter-target': 'input', maxlength: '254' %>
<%= form.govuk_text_area :description, label: {text: "Meta Description"}, 'data-character-counter-target': 'input', maxlength: '10000' %>
<p>There are <strong data-character-counter-target='counter' ></strong> remaining characters in the description.</p>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions terraform-azure/terraform-azure-web/appgateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ resource "azurerm_web_application_firewall_policy" "agw_wafp" {
id = "933210"
enabled = false
}
rule {
id = "933180"
enabled = false
}
}
}

Expand Down

0 comments on commit e2e1087

Please sign in to comment.