Skip to content

Commit

Permalink
Use FormRowTextList in area/edit_form
Browse files Browse the repository at this point in the history
This allows testing the code. We eventually will want to use it
in all TT forms and drop the TT version.
  • Loading branch information
reosarevok committed Sep 5, 2024
1 parent 1321c97 commit f0cda38
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions root/area/edit_form.tt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
[%- form_row_name_with_guesscase(r) -%]
[%- form_row_text_long(r, 'comment', 'Disambiguation:') -%]
[%- form_row_select(r, 'type_id', 'Type:') -%]
[%- form_row_text_list(r, 'iso_3166_1', 'ISO 3166-1:', 'ISO 3166-1') -%]
[%- form_row_text_list(r, 'iso_3166_2', 'ISO 3166-2:', 'ISO 3166-2') -%]
[%- form_row_text_list(r, 'iso_3166_3', 'ISO 3166-3:', 'ISO 3166-3') -%]
[% React.embed(c, 'static/scripts/edit/components/FormRowTextList', {
repeatable => form_to_json(form.field('iso_3166_1')),
label => 'ISO 3166-1:',
itemName => 'ISO 3166-1'
}) %]
[% React.embed(c, 'static/scripts/edit/components/FormRowTextList', {
repeatable => form_to_json(form.field('iso_3166_2')),
label => 'ISO 3166-2:',
itemName => 'ISO 3166-2'
}) %]
[% React.embed(c, 'static/scripts/edit/components/FormRowTextList', {
repeatable => form_to_json(form.field('iso_3166_3')),
label => 'ISO 3166-3:',
itemName => 'ISO 3166-3'
}) %]
</fieldset>

[% date_range_fieldset(r, 'area', 'This area has ended.') %]
Expand Down

0 comments on commit f0cda38

Please sign in to comment.