Sha256: f0e7675a21d90538896d224b1c2d1bf81d7b3a7965ef363ecb239728ebd1ba90
Contents?: true
Size: 1012 Bytes
Versions: 8
Compression:
Stored size: 1012 Bytes
Contents
# frozen_string_literal: true module Decidim module Forms # This cell renders the navigation of a questionnaire step. class StepNavigationCell < Decidim::ViewModel include Decidim::LayoutHelper def current_step_index model end def first_step? current_step_index.zero? end def last_step? current_step_index + 1 == total_steps end def total_steps options[:total_steps] end def form options[:form] end def button_disabled? options[:button_disabled] end def previous_step_dom_id "step-#{current_step_index - 1}" end def next_step_dom_id "step-#{current_step_index + 1}" end def current_step_dom_id "step-#{current_step_index}" end def confirm_data { data: { confirm: t("decidim.forms.step_navigation.show.are_you_sure"), disable: true } } end end end end
Version data entries
8 entries across 8 versions & 1 rubygems