Skip to content

Commit eeeb132

Browse files
authored
Merge pull request #7907 from cakephp/upd-form
Update form.rst (fr, ja)
2 parents 8a0fe1c + 34d964f commit eeeb132

File tree

2 files changed

+44
-44
lines changed

2 files changed

+44
-44
lines changed

fr/views/helpers/form.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Affichera:
106106
.. code-block:: html
107107

108108
<form method="post" action="/articles/edit/5">
109-
<input type="hidden" name="_method" value="PUT" />
109+
<input type="hidden" name="_method" value="PUT">
110110

111111
.. note::
112112

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

402402
'inputContainer' => '<div class="input {{type}}{{required}}">{{content}}</div>'
403-
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}/>'
403+
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}>'
404404

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

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

593593
<div class="input file">
594594
<label for="field">Field</label>
595-
<input type="file" name="field" value="" id="field" />
595+
<input type="file" name="field" value="" id="field">
596596
</div>
597597
<div class="input email">
598598
<label for="email">Email</label>
599-
<input type="email" name="email" value="" id="email" />
599+
<input type="email" name="email" value="" id="email">
600600
</div>
601601

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

618618
<div class="input">
619619
<label for="name">The User Alias</label>
620-
<input name="name" type="text" value="" id="name" />
620+
<input name="name" type="text" value="" id="name">
621621
</div>
622622

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

633633
<div class="input">
634-
<input name="name" type="text" value="" id="name" />
634+
<input name="name" type="text" value="" id="name">
635635
</div>
636636

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

657657
<div class="input">
658658
<label for="name" class="thingy">The User Alias</label>
659-
<input name="name" type="text" value="" id="name" />
659+
<input name="name" type="text" value="" id="name">
660660
</div>
661661

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

846846
.. code-block:: html
847847

848-
<input name="id" type="hidden" />
848+
<input name="id" type="hidden">
849849

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

10011001
.. code-block:: html
10021002

1003-
<input type="hidden" name="published" value="0" />
1004-
<input type="checkbox" name="published" value="1" />
1003+
<input type="hidden" name="published" value="0">
1004+
<input type="checkbox" name="published" value="1">
10051005

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

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

10271027
<h2>Couleurs primaires</h2>
1028-
<input type="hidden" name="color" value="0" />
1028+
<input type="hidden" name="color" value="0">
10291029
<label for="color-red">
1030-
<input type="checkbox" name="color[]" value="5" id="color-red" />
1030+
<input type="checkbox" name="color[]" value="5" id="color-red">
10311031
Rouge
10321032
</label>
10331033

10341034
<label for="color-blue">
1035-
<input type="checkbox" name="color[]" value="5" id="color-blue" />
1035+
<input type="checkbox" name="color[]" value="5" id="color-blue">
10361036
Bleu
10371037
</label>
10381038

10391039
<label for="color-yellow">
1040-
<input type="checkbox" name="color[]" value="5" id="color-yellow" />
1040+
<input type="checkbox" name="color[]" value="5" id="color-yellow">
10411041
Jaune
10421042
</label>
10431043

10441044
<h2>Couleurs tertiaires</h2>
1045-
<input type="hidden" name="color" value="0" />
1045+
<input type="hidden" name="color" value="0">
10461046
<label for="color-green">
1047-
<input type="checkbox" name="color[]" value="5" id="color-green" />
1047+
<input type="checkbox" name="color[]" value="5" id="color-green">
10481048
Vert
10491049
</label>
10501050
<label for="color-purple">
1051-
<input type="checkbox" name="color[]" value="5" id="color-purple" />
1051+
<input type="checkbox" name="color[]" value="5" id="color-purple">
10521052
Magenta
10531053
</label>
10541054
<label for="color-orange">
1055-
<input type="checkbox" name="color[]" value="5" id="color-orange" />
1055+
<input type="checkbox" name="color[]" value="5" id="color-orange">
10561056
Orange
10571057
</label>
10581058

@@ -1714,7 +1714,7 @@ Affichera:
17141714

17151715
.. code-block:: html
17161716

1717-
<input type="month" name="mob" />
1717+
<input type="month" name="mob">
17181718

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

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

1953-
'inputSubmit' => '<input type="{{type}}"{{attrs}}/>'
1953+
'inputSubmit' => '<input type="{{type}}"{{attrs}}>'
19541954
'submitContainer' => '<div class="submit">{{content}}</div>'
19551955

19561956
**Options pour les Submit**

ja/views/helpers/form.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ FormHelper は、 *追加* または *編集* のフォームを作成するか
9696
.. code-block:: html
9797

9898
<form method="post" action="/articles/edit/5">
99-
<input type="hidden" name="_method" value="PUT" />
99+
<input type="hidden" name="_method" value="PUT">
100100

101101
.. note::
102102

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

353353
'inputContainer' => '<div class="input {{type}}{{required}}">{{content}}</div>'
354-
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}/>'
354+
'input' => '<input type="{{type}}" name="{{name}}"{{attrs}}>'
355355

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

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

527527
<div class="input file">
528528
<label for="field">Field</label>
529-
<input type="file" name="field" value="" id="field" />
529+
<input type="file" name="field" value="" id="field">
530530
</div>
531531
<div class="input email">
532532
<label for="email">Email</label>
533-
<input type="email" name="email" value="" id="email" />
533+
<input type="email" name="email" value="" id="email">
534534
</div>
535535

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

550550
<div class="input">
551551
<label for="name">The User Alias</label>
552-
<input name="name" type="text" value="" id="name" />
552+
<input name="name" type="text" value="" id="name">
553553
</div>
554554

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

565565
<div class="input">
566-
<input name="name" type="text" value="" id="name" />
566+
<input name="name" type="text" value="" id="name">
567567
</div>
568568

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

585585
<div class="input">
586586
<label for="name" class="thingy">The User Alias</label>
587-
<input name="name" type="text" value="" id="name" />
587+
<input name="name" type="text" value="" id="name">
588588
</div>
589589

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

766766
.. code-block:: html
767767

768-
<input name="id" type="hidden" />
768+
<input name="id" type="hidden">
769769

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

915915
.. code-block:: html
916916

917-
<input type="hidden" name="published" value="0" />
918-
<input type="checkbox" name="published" value="1" />
917+
<input type="hidden" name="published" value="0">
918+
<input type="checkbox" name="published" value="1">
919919

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

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

938938
<h2>Primary Colors</h2>
939-
<input type="hidden" name="color" value="0" />
939+
<input type="hidden" name="color" value="0">
940940
<label for="color-red">
941-
<input type="checkbox" name="color[]" value="5" id="color-red" />
941+
<input type="checkbox" name="color[]" value="5" id="color-red">
942942
Red
943943
</label>
944944

945945
<label for="color-blue">
946-
<input type="checkbox" name="color[]" value="5" id="color-blue" />
946+
<input type="checkbox" name="color[]" value="5" id="color-blue">
947947
Blue
948948
</label>
949949

950950
<label for="color-yellow">
951-
<input type="checkbox" name="color[]" value="5" id="color-yellow" />
951+
<input type="checkbox" name="color[]" value="5" id="color-yellow">
952952
Yellow
953953
</label>
954954

955955
<h2>Tertiary Colors</h2>
956-
<input type="hidden" name="color" value="0" />
956+
<input type="hidden" name="color" value="0">
957957
<label for="color-green">
958-
<input type="checkbox" name="color[]" value="5" id="color-green" />
958+
<input type="checkbox" name="color[]" value="5" id="color-green">
959959
Green
960960
</label>
961961
<label for="color-purple">
962-
<input type="checkbox" name="color[]" value="5" id="color-purple" />
962+
<input type="checkbox" name="color[]" value="5" id="color-purple">
963963
Purple
964964
</label>
965965
<label for="color-orange">
966-
<input type="checkbox" name="color[]" value="5" id="color-orange" />
966+
<input type="checkbox" name="color[]" value="5" id="color-orange">
967967
Orange
968968
</label>
969969

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

16231623
.. code-block:: html
16241624

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

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

16641664
.. code-block:: html
16651665

1666-
<input type="date" name="registered" />
1666+
<input type="date" name="registered">
16671667

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

17231723
.. code-block:: html
17241724

1725-
<input type="time" name="released" />
1725+
<input type="time" name="released">
17261726

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

17441744
.. code-block:: html
17451745

1746-
<input type="month" name="mob" />
1746+
<input type="month" name="mob">
17471747

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

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

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

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

1979-
'inputSubmit' => '<input type="{{type}}"{{attrs}}/>'
1979+
'inputSubmit' => '<input type="{{type}}"{{attrs}}>'
19801980
'submitContainer' => '<div class="submit">{{content}}</div>'
19811981

19821982
**Submit のオプション**

0 commit comments

Comments
 (0)