Make some adjustments (#33021)

I also had to change the text "Enviar" to "Submit" in the instructions section in order to pass the test.
This commit is contained in:
chaufon 2019-03-12 16:06:15 -05:00 committed by Jaka Kranjc
parent 494687f75e
commit 086956b901

View File

@ -7,10 +7,10 @@ localeTitle: Agregar un botón de envío a un formulario
---
## Description
<section id="description"> Agreguemos un botón de <code>submit</code> a su formulario. Al hacer clic en este botón, los datos de su formulario se enviarán a la URL que especificó con el atributo de <code>action</code> su formulario. Aquí hay un ejemplo de botón de envío: <code>&lt;button type=&quot;submit&quot;&gt;this button submits the form&lt;/button&gt;</code> </section>
<section id="description"> Agreguemos un botón <code>submit</code> a su formulario. Al hacer clic en este botón, los datos de su formulario se enviarán a la URL que especificó con el atributo <code>action</code> de su formulario. Aquí hay un ejemplo de botón <code>submit</code>: <code>&lt;button type=&quot;submit&quot;&gt;this button submits the form&lt;/button&gt;</code> </section>
## Instructions
<section id="instructions"> Agregue un botón como el último elemento de su elemento de <code>form</code> con un tipo de <code>submit</code> y &quot;Enviar&quot; como texto. </section>
<section id="instructions"> Agregue un botón tipo <code>submit</code> con &quot;Submit&quot; como su texto, como el último elemento de su elemento <code>form</code>.</section>
## Tests
<section id='tests'>
@ -19,11 +19,11 @@ localeTitle: Agregar un botón de envío a un formulario
tests:
- text: Su formulario debe tener un botón en su interior.
testString: 'assert($("form").children("button").length > 0, "Your form should have a button inside it.");'
- text: Su botón de envío debe tener el <code>type</code> atributo establecido para <code>submit</code> .
- text: Su botón de envío debe tener el atributo <code>type</code> establecido para <code>submit</code> .
testString: 'assert($("button").attr("type") === "submit", "Your submit button should have the attribute <code>type</code> set to <code>submit</code>.");'
- text: Su botón de enviar solo debe tener el texto "Enviar".
- text: Su botón de enviar solo debe tener el texto "Submit".
testString: 'assert($("button").text().match(/^\s*submit\s*$/gi), "Your submit button should only have the text "Submit".");'
- text: Asegúrese de que el elemento de su <code>button</code> tenga una etiqueta de cierre.
- text: Asegúrese de que su elemento <code>button</code> tenga una etiqueta de cierre.
testString: 'assert(code.match(/<\/button>/g) && code.match(/<button/g) && code.match(/<\/button>/g).length === code.match(/<button/g).length, "Make sure your <code>button</code> element has a closing tag.");'
```