Sha256: cc27ca3a19dca22a9cc63c09803e18b4c94adc7c78c9494e8dc3d30ee9b341b9

Contents?: true

Size: 795 Bytes

Versions: 51

Compression:

Stored size: 795 Bytes

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
      mimic :organization

      attribute :organization_admin_email, String
      attribute :organization_admin_name, String
      attribute :available_locales, Array
      attribute :default_locale, String
      attribute :reference_prefix

      validates :organization_admin_email, :organization_admin_name, :name, :host, :reference_prefix, presence: true
      validates :available_locales, presence: true
      validates :default_locale, presence: true
      validates :default_locale, inclusion: { in: :available_locales }
    end
  end
end

Version data entries

51 entries across 51 versions & 2 rubygems

Version Path
decidim-system-0.15.2 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.15.1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.15.0 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.14.4 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.14.3 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.14.2 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.14.1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.13.1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.12.2 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.13.0 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.12.1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.13.0.pre1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.12.0 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.11.2 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.12.0.pre app/forms/decidim/system/register_organization_form.rb
decidim-system-0.11.1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.11.0.pre1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.10.1 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.10.0 app/forms/decidim/system/register_organization_form.rb
decidim-system-0.9.3 app/forms/decidim/system/register_organization_form.rb