10 Commits

Author SHA1 Message Date
Oliver Günther 4d731dcab6 Replace raw and explicit html_safe calls 2026-03-20 09:49:10 +01:00
Alexander Brandon Coles 4380f8a633 Fix calling instance methods from settings_form
`settings_form` was previously executing the block while still in the
class context. `instance_exec` ensures the block runs with `self` set to
the form instance. As such `settings_form` now behaves like its standard
`form` counterpart, i.e. the following works as expected:

    class MySettingsForm < ApplicationForm
      settings_form do |f|
        f.text_field(name: :my_setting, caption: text_field_caption)  # now resolves correctly
      end

      private

      def text_field_caption
        "A long caption"
      end
    end

Also removes `render_inline_form` in favour of the namesake method
provided by upstream Primer.
2025-11-25 17:49:18 -03:00
Alexander Brandon Coles 3bfe5d1bbf Separate Decorators for FormObject and InputGroup
Ensures that `#group` is only defined on decorated `FormObject`.
2025-10-31 15:03:10 +00:00
Kabiru Mwenja 94c4e1c5df Update ApplicationForm#attribute_name method signature to be less restrictive
Just forward all arguments to ActiveRecord's #huma_attribute_name. Esp when there's interpolation needed.
2025-09-16 17:03:54 +03:00
Alexander Brandon Coles 73963cf6d6 Fix missing helpers proxy in LifeCycle::Form
`helpers` is not available in `Primer::Forms::Base`/`ActsAsComponent`
descendants.
2025-09-01 08:30:33 +01:00
Alexander Brandon Coles 304c6ea85e [#63737] Render help text icon in Primerized forms
Renders `AttributeHelpTextComponent` in Primerized forms automatically
if the form model supports attribute help texts and the
`include_help_text: true` option is passed to the form DSL method.
2025-06-03 12:34:50 +01:00
Oliver Günther 985b07d1fd Primerize setings 2025-04-30 08:35:14 +02:00
Dombi Attila 002fdf35f4 Add Coloured icons, initial rendering of the form fields 2024-12-17 15:54:14 +02:00
Christophe Bliard 8bd7889d1f Primerize statuses create/edit form
Except the color picker which still uses an angular component.

Also fixed an issue where the "Default value" checkbox could disappear
from the form after submitting with an error in the form.
2024-10-09 15:26:40 +02:00
Christophe Bliard 390d878f58 Start primerizing progress tracking admin section
The warning message is not yet implemented.
2024-09-11 09:29:17 +02:00