プロジェクト

全般

プロフィール

Vote #79225

未完了

fields_for produces a broken <label for=“”> value

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
0
issue_org_id:
28447
author_id:
344207
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
132
ステータス-->[New]

説明

Here's some code from the @redmine_people@ plugin illustrating the problem:

<%= f.fields_for :information do |information| %>
  <p><%= information.text_field :middlename, :label => l(:label_people_middlename) %></p>
  <p><%= f.text_field :lastname, :required => true %></p>

Then one of the fields declares a label:

<p><%= information.select :gender, Person.get_genders, :label => l(:label_people_gender)%></p>

That generates this HTML:

<p><label for="person[information_attributes]_gender">Gender</label>
  <select name="person[information_attributes][gender]" id="person_information_attributes_gender">
  <option selected="selected" value="0">Male</option>
  <option value="1">Female</option>
</select></p>

The @

コメント
ファイル
(サイズの上限: 48.8 MB)
キャンセル

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0