-
Notifications
You must be signed in to change notification settings - Fork 608
add task solution #801
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
base: master
Are you sure you want to change the base?
add task solution #801
Changes from 1 commit
6e63de7
444f258
e3ccaf8
8899675
caf1045
9b7bd56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,80 +13,177 @@ | |||||||||||||||||||
| method="get" | ||||||||||||||||||||
| name="form" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||
| <fieldset class="box_style"> | ||||||||||||||||||||
| <legend>Personal information</legend> | ||||||||||||||||||||
| Surname: | ||||||||||||||||||||
| <input type="text" name="surname" | ||||||||||||||||||||
| value=" " minlength="3" | ||||||||||||||||||||
| maxlength="100" autocomplete="off" | ||||||||||||||||||||
| ><br> | ||||||||||||||||||||
| Name: | ||||||||||||||||||||
| <input type="text" name="name" | ||||||||||||||||||||
| value=" " minlength="3" | ||||||||||||||||||||
| maxlength="100" autocomplete="off" | ||||||||||||||||||||
| ><br> | ||||||||||||||||||||
| How old are You? | ||||||||||||||||||||
| <input type="number" name="age" | ||||||||||||||||||||
| value="12" | ||||||||||||||||||||
| min="1" max="100" | ||||||||||||||||||||
| ><br> | ||||||||||||||||||||
| Full date of birth: | ||||||||||||||||||||
| <input type="date" name="date" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
| ><br> | ||||||||||||||||||||
| I accept the term of the agreement | ||||||||||||||||||||
| <input type="checkbox" | ||||||||||||||||||||
| value="check" name="check" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="surname">Surname: </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="text" | ||||||||||||||||||||
| name="surname" | ||||||||||||||||||||
| id="surname" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Empty space as a default value in input is not a good practice. Please remove this attribute |
||||||||||||||||||||
| minlength="3" | ||||||||||||||||||||
| maxlength="100" | ||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="name">Name: </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="text" | ||||||||||||||||||||
| name="name" | ||||||||||||||||||||
| id="name" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Empty space as a default value in input is not a good practice. Please remove this attribute |
||||||||||||||||||||
| minlength="3" | ||||||||||||||||||||
| maxlength="100" | ||||||||||||||||||||
| autocomplete="off" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="age">How old are You? </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="number" | ||||||||||||||||||||
| name="age" | ||||||||||||||||||||
| id="age" | ||||||||||||||||||||
| value="12" | ||||||||||||||||||||
| min="1" | ||||||||||||||||||||
| max="100" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="date">Full date of birth: </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="date" | ||||||||||||||||||||
| name="date" | ||||||||||||||||||||
| id="date" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Empty space as a default value in input is not a good practice. Please remove this attribute |
||||||||||||||||||||
| > | ||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <label for="check">I accept the term of the agreement </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="checkbox" | ||||||||||||||||||||
| value="check" | ||||||||||||||||||||
| name="check" | ||||||||||||||||||||
| id="check" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <fieldset class="box_style"> | ||||||||||||||||||||
| <legend>Registration</legend> | ||||||||||||||||||||
| E-mail: | ||||||||||||||||||||
| <input type="email" name="email" | ||||||||||||||||||||
| value=" " placeholder="email@example.com" | ||||||||||||||||||||
| multiple | ||||||||||||||||||||
| ><br> | ||||||||||||||||||||
| Password: | ||||||||||||||||||||
| <input name="user-password" type="password" | ||||||||||||||||||||
| required autocomplete="off" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="email">E-mail: </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="email" | ||||||||||||||||||||
| name="email" | ||||||||||||||||||||
| id="email" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Empty space as a default value in input is not a good practice. Please remove this attribute |
||||||||||||||||||||
| placeholder="email@example.com" | ||||||||||||||||||||
| multiple | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use multiple attribute with input type email, but I think that in this case more suitable would be to add multiple attribute to select tag, as this is registration form so we are allowing one email value :) |
||||||||||||||||||||
| > | ||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <label for="user-password">Password: </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| name="user-password" | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Value of name attribute should be in camelCase like userPassword |
||||||||||||||||||||
| id="user-password" | ||||||||||||||||||||
| type="password" | ||||||||||||||||||||
| required autocomplete="off" | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix formatting:
Suggested change
|
||||||||||||||||||||
| > | ||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <fieldset class="box_style"> | ||||||||||||||||||||
| <legend>An interesting fact about you!</legend> | ||||||||||||||||||||
| Do you love cats? | ||||||||||||||||||||
| <input type="radio" id="yes" | ||||||||||||||||||||
| name="cat" value="Y" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="cat">Do you love cats? </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="radio" | ||||||||||||||||||||
| id="yes" | ||||||||||||||||||||
| name="cat" | ||||||||||||||||||||
| value="Y" | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This value is very vague, it would be better here to reflect what is checked at the input -> Yes and below No |
||||||||||||||||||||
| > | ||||||||||||||||||||
| <label for="yes">Yes</label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="radio" | ||||||||||||||||||||
| id="no" | ||||||||||||||||||||
| name="cat" | ||||||||||||||||||||
| value="N" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| <label for="no">No</label> | ||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="color">What is your favorite color? </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="color" | ||||||||||||||||||||
| name="color" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Empty space as a default value in input is not a good practice. Please remove this attribute |
||||||||||||||||||||
| > | ||||||||||||||||||||
|
Comment on lines
+129
to
+133
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Label for this field is not clickable(when clicking label it should focuse on the input).
Suggested change
|
||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="time">What time do you go to bed? </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="time" | ||||||||||||||||||||
| name="time" | ||||||||||||||||||||
| id="time" | ||||||||||||||||||||
| step="2" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Empty space as a default value in input is not a good practice. Please remove this attribute |
||||||||||||||||||||
| > | ||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="cars">What are your favorite brand of cars? </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <textarea | ||||||||||||||||||||
| name="cars" | ||||||||||||||||||||
| id="cars" | ||||||||||||||||||||
| rows="4" | ||||||||||||||||||||
| cols="2" | ||||||||||||||||||||
| >BMW Audi Lada | ||||||||||||||||||||
| </textarea> | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here more suitable would be to use select tag instead of textarea <select name="cars" id="cars" multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>This will also fix your test results :) |
||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <label for="range">How do you rate our work? </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <input | ||||||||||||||||||||
| type="range" | ||||||||||||||||||||
| name="range" | ||||||||||||||||||||
| value="0" | ||||||||||||||||||||
| > | ||||||||||||||||||||
|
Comment on lines
+160
to
+168
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add proper id so the label is clickable |
||||||||||||||||||||
| <label for="yes">Yes</label> | ||||||||||||||||||||
| <input type="radio" id="no" | ||||||||||||||||||||
| name="cat" value="N" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| <label for="no">No</label><br> | ||||||||||||||||||||
| What is your favourite color? | ||||||||||||||||||||
| <input type="color" name="color" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
| ><br> | ||||||||||||||||||||
| What time do you go to bed? | ||||||||||||||||||||
| <input type="time" name="time" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
| ><br> | ||||||||||||||||||||
| What are your favorite brand of cars? | ||||||||||||||||||||
| <textarea name="cars" rows="4" | ||||||||||||||||||||
| cols="3" | ||||||||||||||||||||
| >BMW Audi Lada | ||||||||||||||||||||
| </textarea><br> | ||||||||||||||||||||
| How do you rate our work? | ||||||||||||||||||||
| <input type="range" name="range" | ||||||||||||||||||||
| value=" " | ||||||||||||||||||||
| ><br> | ||||||||||||||||||||
| </fieldset> | ||||||||||||||||||||
| <fieldset> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <fieldset class="box_style"> | ||||||||||||||||||||
| <legend>Additional info:</legend> | ||||||||||||||||||||
| Comments: | ||||||||||||||||||||
| <textarea name="comment" rows="2" | ||||||||||||||||||||
| cols="20" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| </textarea><br> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <div class="field_wrapper"> | ||||||||||||||||||||
| <label for="comment">Comments: </label> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <textarea | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add id |
||||||||||||||||||||
| name="comment" | ||||||||||||||||||||
| rows="2" | ||||||||||||||||||||
| cols="20" | ||||||||||||||||||||
| > | ||||||||||||||||||||
| </textarea> | ||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. <textarea> is a tricky tag to format: <textarea
class="..."
placeholder="..."
></textarea> |
||||||||||||||||||||
| </div> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| <label for="reco">Would you recommend us?</label> | ||||||||||||||||||||
| <select id="reco" name="reco"> | ||||||||||||||||||||
| <option value="yes" selected>yes</option> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,8 @@ | ||
| fieldset { | ||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| input { | ||
| .field_wrapper { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. following the BEM naming convention this name should have double underscore mark |
||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| textarea { | ||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| label { | ||
| margin-top: 10px; | ||
| .box_style { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. following the BEM naming convention this name should have double underscore mark |
||
| display: block; | ||
| margin-bottom: 20px; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method here should be POST rather than GET -> https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods