Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update form.rst (fr, ja) #7907

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions fr/views/helpers/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Affichera:
.. code-block:: html

<form method="post" action="/articles/edit/5">
<input type="hidden" name="_method" value="PUT" />
<input type="hidden" name="_method" value="PUT">

.. note::

Expand Down Expand Up @@ -400,7 +400,7 @@ méthodes de FormHelper.
Par défaut, la méthode ``control()`` utilisera les templates de widget suivant::

'inputContainer' => '<div class="input {{type}}{{required}}">{{content}}</div>'
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}/>'
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}>'

En cas d'erreurs de validation, elle utilisera également::

Expand Down Expand Up @@ -592,11 +592,11 @@ couvrir les options spécifiques de ``FormHelper::control()``.

<div class="input file">
<label for="field">Field</label>
<input type="file" name="field" value="" id="field" />
<input type="file" name="field" value="" id="field">
</div>
<div class="input email">
<label for="email">Email</label>
<input type="email" name="email" value="" id="email" />
<input type="email" name="email" value="" id="email">
</div>

* ``$options['label']`` Soit une chaîne qui sera utilisée comme valeur pour
Expand All @@ -617,7 +617,7 @@ couvrir les options spécifiques de ``FormHelper::control()``.

<div class="input">
<label for="name">The User Alias</label>
<input name="name" type="text" value="" id="name" />
<input name="name" type="text" value="" id="name">
</div>

Vous pouvez définir cette clé à ``false`` pour désactiver l'affichage de
Expand All @@ -631,7 +631,7 @@ couvrir les options spécifiques de ``FormHelper::control()``.
.. code-block:: html

<div class="input">
<input name="name" type="text" value="" id="name" />
<input name="name" type="text" value="" id="name">
</div>

Si le label est désactivé et qu'un attribut ``placeholder`` est fourni,
Expand All @@ -656,7 +656,7 @@ couvrir les options spécifiques de ``FormHelper::control()``.

<div class="input">
<label for="name" class="thingy">The User Alias</label>
<input name="name" type="text" value="" id="name" />
<input name="name" type="text" value="" id="name">
</div>

* ``$options['options']`` - Vous pouvez passer à cette option un tableau
Expand Down Expand Up @@ -845,7 +845,7 @@ Affichera:

.. code-block:: html

<input name="id" type="hidden" />
<input name="id" type="hidden">

Créer des Textareas
-------------------
Expand Down Expand Up @@ -1000,8 +1000,8 @@ décrites dans les sections dédiées à ces méthodes).

.. code-block:: html

<input type="hidden" name="published" value="0" />
<input type="checkbox" name="published" value="1" />
<input type="hidden" name="published" value="0">
<input type="checkbox" name="published" value="1">

Ceci peut être désactivé en définissant l'option ``hiddenField`` à ``false``::

Expand All @@ -1025,34 +1025,34 @@ décrites dans les sections dédiées à ces méthodes).
.. code-block:: html

<h2>Couleurs primaires</h2>
<input type="hidden" name="color" value="0" />
<input type="hidden" name="color" value="0">
<label for="color-red">
<input type="checkbox" name="color[]" value="5" id="color-red" />
<input type="checkbox" name="color[]" value="5" id="color-red">
Rouge
</label>

<label for="color-blue">
<input type="checkbox" name="color[]" value="5" id="color-blue" />
<input type="checkbox" name="color[]" value="5" id="color-blue">
Bleu
</label>

<label for="color-yellow">
<input type="checkbox" name="color[]" value="5" id="color-yellow" />
<input type="checkbox" name="color[]" value="5" id="color-yellow">
Jaune
</label>

<h2>Couleurs tertiaires</h2>
<input type="hidden" name="color" value="0" />
<input type="hidden" name="color" value="0">
<label for="color-green">
<input type="checkbox" name="color[]" value="5" id="color-green" />
<input type="checkbox" name="color[]" value="5" id="color-green">
Vert
</label>
<label for="color-purple">
<input type="checkbox" name="color[]" value="5" id="color-purple" />
<input type="checkbox" name="color[]" value="5" id="color-purple">
Magenta
</label>
<label for="color-orange">
<input type="checkbox" name="color[]" value="5" id="color-orange" />
<input type="checkbox" name="color[]" value="5" id="color-orange">
Orange
</label>

Expand Down Expand Up @@ -1714,7 +1714,7 @@ Affichera:

.. code-block:: html

<input type="month" name="mob" />
<input type="month" name="mob">

Créer des Éléments Année
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1950,7 +1950,7 @@ le chemin de l'image sera relatif à *webroot*, sinon, il sera relatif à *webro

Par défaut, les templates de widgets utilisés sont::

'inputSubmit' => '<input type="{{type}}"{{attrs}}/>'
'inputSubmit' => '<input type="{{type}}"{{attrs}}>'
'submitContainer' => '<div class="submit">{{content}}</div>'

**Options pour les Submit**
Expand Down
48 changes: 24 additions & 24 deletions ja/views/helpers/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ FormHelper は、 *追加* または *編集* のフォームを作成するか
.. code-block:: html

<form method="post" action="/articles/edit/5">
<input type="hidden" name="_method" value="PUT" />
<input type="hidden" name="_method" value="PUT">

.. note::

Expand Down Expand Up @@ -351,7 +351,7 @@ where request data is retained, you need to put ``context`` first::
デフォルトでは、 ``control()`` メソッドは、次のウィジェットテンプレートを使用します。 ::

'inputContainer' => '<div class="input {{type}}{{required}}">{{content}}</div>'
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}/>'
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}>'

検証エラーが発生した場合は、以下も使われます。 ::

Expand Down Expand Up @@ -526,11 +526,11 @@ HTML 属性を受け付けます。以下は ``FormHelper::control()`` で特有

<div class="input file">
<label for="field">Field</label>
<input type="file" name="field" value="" id="field" />
<input type="file" name="field" value="" id="field">
</div>
<div class="input email">
<label for="email">Email</label>
<input type="email" name="email" value="" id="email" />
<input type="email" name="email" value="" id="email">
</div>

* ``$options['label']`` - 文字列の見出しや :ref:`ラベルのオプション<create-label>` の配列。
Expand All @@ -549,7 +549,7 @@ HTML 属性を受け付けます。以下は ``FormHelper::control()`` で特有

<div class="input">
<label for="name">The User Alias</label>
<input name="name" type="text" value="" id="name" />
<input name="name" type="text" value="" id="name">
</div>

あるいは、 ``label`` 要素の出力を無効にするには、このキーに ``false`` を設定します。
Expand All @@ -563,7 +563,7 @@ HTML 属性を受け付けます。以下は ``FormHelper::control()`` で特有
.. code-block:: html

<div class="input">
<input name="name" type="text" value="" id="name" />
<input name="name" type="text" value="" id="name">
</div>

これに配列を設定すると、 ``label`` 要素の追加オプションが提供されます。
Expand All @@ -584,7 +584,7 @@ HTML 属性を受け付けます。以下は ``FormHelper::control()`` で特有

<div class="input">
<label for="name" class="thingy">The User Alias</label>
<input name="name" type="text" value="" id="name" />
<input name="name" type="text" value="" id="name">
</div>

* ``$options['options']`` - ここには、アイテムの配列を引数として必要とする ``radio`` や
Expand Down Expand Up @@ -765,7 +765,7 @@ FormHelper で利用可能なメソッドには、さらに特定のフォーム

.. code-block:: html

<input name="id" type="hidden" />
<input name="id" type="hidden">

テキストエリアの作成
--------------------
Expand Down Expand Up @@ -914,8 +914,8 @@ textarea コントロールフィールドを作成します。使用される

.. code-block:: html

<input type="hidden" name="published" value="0" />
<input type="checkbox" name="published" value="1" />
<input type="hidden" name="published" value="0">
<input type="checkbox" name="published" value="1">

これは ``'hiddenField'`` を ``false`` とすることで無効にできます。 ::

Expand All @@ -936,34 +936,34 @@ textarea コントロールフィールドを作成します。使用される
.. code-block:: html

<h2>Primary Colors</h2>
<input type="hidden" name="color" value="0" />
<input type="hidden" name="color" value="0">
<label for="color-red">
<input type="checkbox" name="color[]" value="5" id="color-red" />
<input type="checkbox" name="color[]" value="5" id="color-red">
Red
</label>

<label for="color-blue">
<input type="checkbox" name="color[]" value="5" id="color-blue" />
<input type="checkbox" name="color[]" value="5" id="color-blue">
Blue
</label>

<label for="color-yellow">
<input type="checkbox" name="color[]" value="5" id="color-yellow" />
<input type="checkbox" name="color[]" value="5" id="color-yellow">
Yellow
</label>

<h2>Tertiary Colors</h2>
<input type="hidden" name="color" value="0" />
<input type="hidden" name="color" value="0">
<label for="color-green">
<input type="checkbox" name="color[]" value="5" id="color-green" />
<input type="checkbox" name="color[]" value="5" id="color-green">
Green
</label>
<label for="color-purple">
<input type="checkbox" name="color[]" value="5" id="color-purple" />
<input type="checkbox" name="color[]" value="5" id="color-purple">
Purple
</label>
<label for="color-orange">
<input type="checkbox" name="color[]" value="5" id="color-orange" />
<input type="checkbox" name="color[]" value="5" id="color-orange">
Orange
</label>

Expand Down Expand Up @@ -1622,7 +1622,7 @@ CakePHP が Windows サーバー上にインストールされている場合、

.. code-block:: html

<input type="datetime-local" name="registered" value="2019-02-08T18:20:10" />
<input type="datetime-local" name="registered" value="2019-02-08T18:20:10">

日付コントロールの作成
~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1663,7 +1663,7 @@ CakePHP が Windows サーバー上にインストールされている場合、

.. code-block:: html

<input type="date" name="registered" />
<input type="date" name="registered">

時間コントロールの作成
~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1722,7 +1722,7 @@ CakePHP が Windows サーバー上にインストールされている場合、

.. code-block:: html

<input type="time" name="released" />
<input type="time" name="released">

月コントロールの作成
~~~~~~~~~~~~~~~~~~~~
Expand All @@ -1743,7 +1743,7 @@ Will output:

.. code-block:: html

<input type="month" name="mob" />
<input type="month" name="mob">

時間コントロールの作成
~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1938,7 +1938,7 @@ notBlank バリデーションメッセージに対するエラーメッセー
このオプションを有効にすると、フィールドに ``onvalid`` と ``oninvalid`` イベント属性が追加されます。
例えば、 ::

<input type="text" name="field" required onvalid="this.setCustomValidity('')" oninvalid="this.setCustomValidity('Custom notBlank message')" />
<input type="text" name="field" required onvalid="this.setCustomValidity('')" oninvalid="this.setCustomValidity('Custom notBlank message')">

カスタム Javascript を使用してこれらのイベントを手動で設定したい場合は、
``autoSetCustomValidity`` オプションを ``false`` に設定して、
Expand Down Expand Up @@ -1976,7 +1976,7 @@ Submit 要素の作成

デフォルトで次のウィジェットテンプレートを使用します。 ::

'inputSubmit' => '<input type="{{type}}"{{attrs}}/>'
'inputSubmit' => '<input type="{{type}}"{{attrs}}>'
'submitContainer' => '<div class="submit">{{content}}</div>'

**Submit のオプション**
Expand Down