Skip to content
Myr

Change HTML input tags to use HTML5 syntax. (#1617)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

In XHTML, the <input> tag must be properly closed, like this `<input />`. In HTML5 the `<input>` tag has no ending slash. https://www.w3schools.com/tags/tag_input.asp

authored by Barnabus · committed by Bo-Yi Wu · parent 8fb21a8 · Browse files · 3 files+11 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+11 added−11 removed

  • other:+11 added−11 removed

3 files+11 added−11 removed

modified:examples/realtime-advanced/resources/room_login.templ.html+4 added-4 removed
77 unmodified lines
78 <div class="form-group">79 <label class="sr-only" for="chat-message">Message</label>80 <div class="input-group">81 <div class="input-group-addon">{{.nick}}</div>82 <input type="text" name="message" id="chat-message" class="form-control" placeholder="a message" value="" />82 <input type="text" name="message" id="chat-message" class="form-control" placeholder="a message" value="">83 </div>84 </div>85 <input type="submit" class="btn btn-primary" value="Send" />85 <input type="submit" class="btn btn-primary" value="Send">86 </form>87 {{else}}88 <form action="" method="get" class="form-inline">89 <legend>Join the SSE real-time chat</legend>90 <div class="form-group">91 <input value='' name="nick" id="nick" placeholder="Your Name" type="text" class="form-control" />91 <input value='' name="nick" id="nick" placeholder="Your Name" type="text" class="form-control">92 </div>93 <div class="form-group text-center">94 <input type="submit" class="btn btn-success btn-login-submit" value="Join" />94 <input type="submit" class="btn btn-success btn-login-submit" value="Join">95 </div>96 </form>97 {{end}}98 </div>
110 unmodified lines
modified:examples/realtime-chat/template.go+3 added-3 removed
33 unmodified lines
34 <body>35 <h1>Welcome to {{.roomid}} room</h1>36 <div id="messages"></div>37 <form id="myForm" action="/room/{{.roomid}}" method="post"> 38 User: <input id="user_form" name="user" value="{{.userid}}"></input> 39 Message: <input id="message_form" name="message"></input> 40 <input type="submit" value="Submit" /> 38 User: <input id="user_form" name="user" value="{{.userid}}">39 Message: <input id="message_form" name="message">40 <input type="submit" value="Submit"> 41 </form>42</body>43</html>44`))
modified:README.md+4 added-4 removed
822 unmodified lines
823```html824<form action="/" method="POST">825 <p>Check some colors</p>826 <label for="red">Red</label>827 <input type="checkbox" name="colors[]" value="red" id="red" />827 <input type="checkbox" name="colors[]" value="red" id="red">828 <label for="green">Green</label>829 <input type="checkbox" name="colors[]" value="green" id="green" />829 <input type="checkbox" name="colors[]" value="green" id="green">830 <label for="blue">Blue</label>831 <input type="checkbox" name="colors[]" value="blue" id="blue" />832 <input type="submit" />831 <input type="checkbox" name="colors[]" value="blue" id="blue">832 <input type="submit">833</form>834```835836result:
1131 unmodified lines