Sha256: c665761550dfd2c23fb5efa786930a1bd39dcecdd0ff326c9e01858badd1e3a8

Contents?: true

Size: 1.06 KB

Versions: 58

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

require "decidim/translatable_attributes"

module Decidim
  module System
    # A form object used to create organizations from the system dashboard.
    #
    class RegisterOrganizationForm < UpdateOrganizationForm
      include JsonbAttributes
      mimic :organization

      attribute :organization_admin_email, String
      attribute :organization_admin_name, String
      attribute :available_locales, Array
      attribute :default_locale, String
      attribute :reference_prefix
      attribute :users_registration_mode, String
      attribute :force_users_to_authenticate_before_access_organization, Boolean

      validates :organization_admin_email, :organization_admin_name, :name, :host, :reference_prefix, :users_registration_mode, presence: true
      validates :available_locales, presence: true
      validates :default_locale, presence: true
      validates :default_locale, inclusion: { in: :available_locales }
      validates :users_registration_mode, inclusion: { in: Decidim::Organization.users_registration_modes }
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
decidim-system-0.28.4 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.27.9 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.28.3 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.27.8 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.28.2 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.27.7 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.28.1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.27.6 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.26.10 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.26.9 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.28.0 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.27.5 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.28.0.rc5 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.28.0.rc4 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.26.8 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.27.4 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.27.3 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.26.7 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.26.5 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.27.2 app/forms/decidim/system/register_organization_form.rb