diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 7dec2afce..6144ab32e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -270,12 +270,6 @@ module ApplicationHelper
def admin_config_label(method, content = nil, model: Settings::General)
content ||= tag.span(method.to_s.humanize)
- if method.to_sym.in?(Settings::Mandatory.keys)
- required = tag.span(I18n.t("helpers.application_helper.required"),
- class: "c-indicator c-indicator--danger")
- content = safe_join([content, required])
- end
-
label_prefix = model.name.split("::").map(&:underscore).join("_")
tag.label(content, class: "site-config__label crayons-field__label", for: "#{label_prefix}_#{method}")
end
diff --git a/app/javascript/admin/controllers/config_controller.js b/app/javascript/admin/controllers/config_controller.js
index e206cf618..fc4f3ba4a 100644
--- a/app/javascript/admin/controllers/config_controller.js
+++ b/app/javascript/admin/controllers/config_controller.js
@@ -158,7 +158,6 @@ export default class ConfigController extends Controller {
communityName.parentNode.replaceChild(newLogo, communityName);
} else {
for (const logo of document.querySelectorAll('.site-logo__img')) {
-
if (logo !== previewLogo) {
logo.src = previewLogo.src;
}
@@ -417,7 +416,7 @@ export default class ConfigController extends Controller {
activateMissingKeysModal(providers) {
this.configModalAnchorTarget.innerHTML = adminModal({
- title: 'Getting started',
+ title: 'Setup not complete',
controllerName: 'config',
closeModalFunction: 'closeAdminModal',
body: this.missingAuthKeysModalBody(providers),
diff --git a/app/models/settings/mandatory.rb b/app/models/settings/mandatory.rb
deleted file mode 100644
index 19c316b7a..000000000
--- a/app/models/settings/mandatory.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-module Settings
- # We use this model to back the "Get Started" form of the config admin page.
- class Mandatory
- include ActiveModel::Naming
-
- MAPPINGS = {
- community_name: Settings::Community,
- community_description: Settings::Community,
-
- suggested_tags: Settings::General,
- suggested_users: Settings::General
- }.freeze
- MAPPING_KEYS = MAPPINGS.keys
-
- MAPPINGS.each do |setting, settings_model|
- delegate setting, "#{setting}=", to: settings_model
- end
-
- def self.keys
- MAPPING_KEYS
- end
-
- def self.missing
- MAPPINGS.reject do |settings, settings_model|
- settings_model.public_send(settings).present?
- end.keys
- end
- end
-end
diff --git a/app/validators/bytesize_validator.rb b/app/validators/bytesize_validator.rb
index 0be8cccac..081dd89c6 100644
--- a/app/validators/bytesize_validator.rb
+++ b/app/validators/bytesize_validator.rb
@@ -7,7 +7,6 @@ class BytesizeValidator < ActiveModel::EachValidator
CHECKS = { maximum: :<= }.freeze
RESERVED_OPTIONS = %i[maximum too_long].freeze
-
def check_validity!
raise ArgumentError, ERROR_MESSAGE unless options.key?(:maximum)
diff --git a/app/views/admin/settings/forms/_mandatory.html.erb b/app/views/admin/settings/forms/_mandatory.html.erb
deleted file mode 100644
index fde7cb6d7..000000000
--- a/app/views/admin/settings/forms/_mandatory.html.erb
+++ /dev/null
@@ -1,45 +0,0 @@
-<%= form_with(url: admin_settings_mandatory_settings_path, data: { action: "submit->config#updateConfigurationSettings", testid: "getStartedSectionForm" }) do |f| %>
-
- <%= render "update_setting_button", f: f %>
-<% end %>
diff --git a/app/views/admin/settings/show.html.erb b/app/views/admin/settings/show.html.erb
index 16c6656a6..c396e0639 100644
--- a/app/views/admin/settings/show.html.erb
+++ b/app/views/admin/settings/show.html.erb
@@ -7,35 +7,6 @@
<% end %>
-
-
-
-
-
- <%= render partial: "forms/mandatory" %>
-
-
-
-
{
- beforeEach(() => {
- cy.testSetup();
- cy.fixture('users/adminUser.json').as('user');
-
- cy.get('@user').then((user) => {
- cy.loginUser(user);
- });
- });
-
- describe('Community name setting', () => {
- it('updates the community name', () => {
- cy.get('@user').then(() => {
- cy.visit('/admin/customization/config');
-
- cy.findByTestId('getStartedSectionForm').as('getStartedSectionForm');
-
- cy.get('@getStartedSectionForm')
- .get('#community_name')
- .clear()
- .type('Awesome community');
-
- cy.get('@getStartedSectionForm').findByText('Update Settings').click();
-
- cy.url().should('contains', '/admin/customization/config');
-
- cy.findByTestId('snackbar').within(() => {
- cy.findByRole('alert').should(
- 'have.text',
- 'Successfully updated settings.',
- );
- });
-
- // Page reloaded so need to get a new reference to the form.
- cy.findByTestId('getStartedSectionForm').as('getStartedSectionForm');
- cy.get('#community_name').should('have.value', 'Awesome community');
- });
- });
-
- it('updates the suggested tags', () => {
- cy.get('@user').then(() => {
- cy.visit('/admin/customization/config');
-
- cy.findByTestId('getStartedSectionForm').as('getStartedSectionForm');
-
- cy.get('@getStartedSectionForm')
- .get('#suggested_tags')
- .clear()
- .type('much tag, so wow');
-
- cy.get('@getStartedSectionForm').findByText('Update Settings').click();
-
- cy.url().should('contains', '/admin/customization/config');
-
- cy.findByTestId('snackbar').within(() => {
- cy.findByRole('alert').should(
- 'have.text',
- 'Successfully updated settings.',
- );
- });
-
- // Page reloaded so need to get a new reference to the form.
- cy.findByTestId('getStartedSectionForm').as('getStartedSectionForm');
- cy.get('#suggested_tags').should('have.value', 'much tag, so wow');
- });
- });
-
- it('generates error message when update fails', () => {
- cy.intercept('POST', '/admin/settings/mandatory_settings', {
- error: 'some error msg',
- });
- cy.get('@user').then(() => {
- cy.visit('/admin/customization/config');
-
- cy.findByTestId('getStartedSectionForm').as('getStartedSectionForm');
-
- cy.get('@getStartedSectionForm')
- .get('#suggested_tags')
- .clear()
- .type('much tag, so wow');
-
- cy.get('@getStartedSectionForm').findByText('Update Settings').click();
-
- cy.url().should('contains', '/admin/customization/config');
-
- cy.findByTestId('snackbar').within(() => {
- cy.findByRole('alert').should('have.text', 'some error msg');
- });
- });
- });
- });
-});
diff --git a/spec/system/admin/admin_manages_configuration_spec.rb b/spec/system/admin/admin_manages_configuration_spec.rb
deleted file mode 100644
index ba8b0f52d..000000000
--- a/spec/system/admin/admin_manages_configuration_spec.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-require "rails_helper"
-
-RSpec.describe "Admin manages configuration", type: :system do
- let(:admin) { create(:user, :super_admin) }
-
- before do
- sign_in admin
- visit admin_config_path
- end
-
- Settings::Mandatory::MAPPINGS.each do |option, _setting_model|
- it "marks #{option} as required" do
- selector = "label[for='settings_general_#{option}']"
- expect(first(selector).text).to include("Required")
- end
- end
-end