Sha256: 4935633f6968aae78e9e0125b2b5381c8c902eb4bf23e64fbf532aed3fea25f0

Contents?: true

Size: 904 Bytes

Versions: 51

Compression:

Stored size: 904 Bytes

Contents

= effective_form_with(model: [:admin, cpd_special_rule], engine: true) do |f|
  - if inline_datatable?
    = f.hidden_field :cpd_cycle_id
  - else
    = f.select :cpd_cycle_id, Effective::CpdCycle.sorted.all, label: cpd_cycle_label.titleize

  = f.select :category, Effective::CpdSpecialRule::CATEGORIES

  = f.show_if :category, 'cumulative max credits' do
    = f.number_field :max_credits_per_cycle, label: "Cumulative max credits per #{cpd_cycle_label}",
      hint: "The cumulative max #{cpd_credits_label} per #{cpd_cycle_label} that can be earned between the following categories."

    - cpd_category_rules = cpd_special_rule.cpd_cycle.cpd_rules.select(&:category?)

    = f.select :cpd_rule_ids, cpd_category_rules, label: 'Cumulative max included categories',
      hint: "These categories will shared a maximum cumulative #{cpd_credits_label} per #{cpd_cycle_label}."

  = effective_submit(f)

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
effective_cpd-0.1.14 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.13 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.12 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.11 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.10 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.9 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.8 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.7 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.6 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.5 app/views/admin/cpd_special_rules/_form.html.haml
effective_cpd-0.1.4 app/views/admin/cpd_special_rules/_form.html.haml