Sha256: f4e2fe36553cb02fa63c9746727fd14f1be2f3664df23a1420a5e5243400380e
Contents?: true
Size: 1 KB
Versions: 16
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true module Decidim module Meetings module Admin # This class holds a Form to update meeting agenda items class MeetingAgendaItemsForm < Decidim::Form include TranslatableAttributes translatable_attribute :title, String translatable_attribute :description, String attribute :duration, Integer, default: 0 attribute :parent_id, Integer attribute :position, Integer attribute :deleted, Boolean, default: false attribute :agenda_item_children, Array[MeetingAgendaItemsForm] validates :title, translatable_presence: true, unless: :deleted validates :position, numericality: { greater_than_or_equal_to: 0 }, unless: :deleted validates :duration, presence: true, numericality: { greater_than_or_equal_to: 0 } def to_param id || "meeting-agenda-item-id" end def to_param_child id || "meeting-agenda-item-child-id" end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems