Quick fix: Correct invalid HTML in some of our tag helper-related views
- few end tags for void elements e.g. `</input>` - fair number of self-closing flow elements e.g. `<label .../>` - most-visible change is correction of `<textarea>` in tag helper sample - no product code changes
This commit is contained in:
parent
54c1fed254
commit
28ca45e077
|
|
@ -31,14 +31,14 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@* no special-case for the "asp-for" attribute; now distinct from HTML "for" attribute. *@
|
@* no special-case for the "asp-for" attribute; now distinct from HTML "for" attribute. *@
|
||||||
<label asp-for="Name" class="control-label col-md-2" style="color:blue" />
|
<label asp-for="Name" class="control-label col-md-2" style="color:blue"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="text" asp-for="Name" style="color:blue" />
|
<input type="text" asp-for="Name" style="color:blue" />
|
||||||
<span asp-validation-for="Name" style="color:blue" />
|
<span asp-validation-for="Name" style="color:blue"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="DateOfBirth" class="control-label col-md-2" />
|
<label asp-for="DateOfBirth" class="control-label col-md-2"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
@* will automatically infer type="date" (reused HTML attribute) and asp-format="{0:yyyy-MM-dd}" (optional bound attribute) *@
|
@* will automatically infer type="date" (reused HTML attribute) and asp-format="{0:yyyy-MM-dd}" (optional bound attribute) *@
|
||||||
<input asp-for="DateOfBirth" />
|
<input asp-for="DateOfBirth" />
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="YearsEmployeed" class="control-label col-md-2" />
|
<label asp-for="YearsEmployeed" class="control-label col-md-2"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
@* <select/> items render after static options *@
|
@* <select/> items render after static options *@
|
||||||
@{ var @object = "multiple"; }
|
@{ var @object = "multiple"; }
|
||||||
|
|
@ -69,14 +69,14 @@
|
||||||
|
|
||||||
@* targets only <span/> in Beta; does not support equivalent of Html.ValidationMessageFor()'s tag parameter *@
|
@* targets only <span/> in Beta; does not support equivalent of Html.ValidationMessageFor()'s tag parameter *@
|
||||||
@* - may eventually either support additional tags e.g. <p/> and <div/> or all tags /> *@
|
@* - may eventually either support additional tags e.g. <p/> and <div/> or all tags /> *@
|
||||||
<span asp-validation-for="YearsEmployeed" />
|
<span asp-validation-for="YearsEmployeed"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Blurb" class="control-label col-md-2" />
|
<label asp-for="Blurb" class="control-label col-md-2"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<textarea rows="4" asp-for="Blurb"></textarea>
|
<textarea rows="4" asp-for="Blurb"></textarea>
|
||||||
<span asp-validation-for="Blurb" />
|
<span asp-validation-for="Blurb"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,25 +6,25 @@
|
||||||
|
|
||||||
<form>
|
<form>
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
<div asp-validation-summary="ValidationSummary.All" />
|
<div asp-validation-summary="ValidationSummary.All"></div>
|
||||||
<input type="hidden" asp-for="Id" />
|
<input type="hidden" asp-for="Id" />
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Name" class="control-label col-md-2" />
|
<label asp-for="Name" class="control-label col-md-2"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="text" asp-for="Name" />
|
<input type="text" asp-for="Name" />
|
||||||
<span validation-for="Name" />
|
<span validation-for="Name"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="DateOfBirth" class="control-label col-md-2" />
|
<label asp-for="DateOfBirth" class="control-label col-md-2"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<input type="date" asp-for="DateOfBirth" asp-format="{0:yyyy-MM-dd}" />
|
<input type="date" asp-for="DateOfBirth" asp-format="{0:yyyy-MM-dd}" />
|
||||||
<span asp-validation-for="DateOfBirth" />
|
<span asp-validation-for="DateOfBirth"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="YearsEmployeed" class="control-label col-md-2" />
|
<label asp-for="YearsEmployeed" class="control-label col-md-2"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<select asp-for="YearsEmployeed" asp-items="(IEnumerable<SelectListItem>)ViewBag.Items" size="2" class="form-control">
|
<select asp-for="YearsEmployeed" asp-items="(IEnumerable<SelectListItem>)ViewBag.Items" size="2" class="form-control">
|
||||||
<optgroup label="Newby">
|
<optgroup label="Newby">
|
||||||
|
|
@ -37,14 +37,14 @@
|
||||||
<option value="5">5</option>
|
<option value="5">5</option>
|
||||||
<option value="6">6</option>
|
<option value="6">6</option>
|
||||||
</select>
|
</select>
|
||||||
<span asp-validation-for="YearsEmployeed" />
|
<span asp-validation-for="YearsEmployeed"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Blurb" class="control-label col-md-2" />
|
<label asp-for="Blurb" class="control-label col-md-2"></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<textarea rows="4" asp-for="Blurb"></textarea>
|
<textarea rows="4" asp-for="Blurb"></textarea>
|
||||||
<span asp-validation-for="Blurb" />
|
<span asp-validation-for="Blurb"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,20 +30,20 @@
|
||||||
@for (var index = 0; index < Model.Count(); ++index)
|
@for (var index = 0; index < Model.Count(); ++index)
|
||||||
{
|
{
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="@Model[index].Name" />
|
<label asp-for="@Model[index].Name"></label>
|
||||||
<input type="text" asp-for="@Model[index].Name" disabled="disabled" readonly="readonly" />
|
<input type="text" asp-for="@Model[index].Name" disabled="disabled" readonly="readonly" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="@Model[index].DateOfBirth" />
|
<label asp-for="@Model[index].DateOfBirth"></label>
|
||||||
<input type="date" asp-for="@Model[index].DateOfBirth" asp-format="{0:yyyy-MM-dd}" disabled="disabled" readonly="readonly" />
|
<input type="date" asp-for="@Model[index].DateOfBirth" asp-format="{0:yyyy-MM-dd}" disabled="disabled" readonly="readonly" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="@Model[index].YearsEmployeed" />
|
<label asp-for="@Model[index].YearsEmployeed"></label>
|
||||||
<input type="number" asp-for="@Model[index].YearsEmployeed" disabled="disabled" readonly="readonly" />
|
<input type="number" asp-for="@Model[index].YearsEmployeed" disabled="disabled" readonly="readonly" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="@Model[index].Blurb" />
|
<label asp-for="@Model[index].Blurb"></label>
|
||||||
<textarea rows="4" asp-for="@Model[index].Blurb" disabled="disabled" readonly="readonly" />
|
<textarea rows="4" asp-for="@Model[index].Blurb" disabled="disabled" readonly="readonly"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<div class="order validation-summary-errors"><ul><li style="display:none"></li>
|
<div class="order validation-summary-errors"><ul><li style="display:none"></li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<input type="submit"></input>
|
<input type="submit"/>
|
||||||
<input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
<input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
<div class="order validation-summary-valid" data-valmsg-summary="true"><ul><li style="display:none"></li>
|
<div class="order validation-summary-valid" data-valmsg-summary="true"><ul><li style="display:none"></li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<div class="order"></div>
|
<div class="order"></div>
|
||||||
<input type="submit"></input>
|
<input type="submit"/>
|
||||||
<input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
<input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
<div class="validation-summary-valid order" data-valmsg-summary="true"><ul><li style="display:none"></li>
|
<div class="validation-summary-valid order" data-valmsg-summary="true"><ul><li style="display:none"></li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<input id="Customer_Key" name="Customer.Key" type="hidden" value="KeyA" />
|
<input id="Customer_Key" name="Customer.Key" type="hidden" value="KeyA" />
|
||||||
<input type="submit"></input>
|
<input type="submit"/>
|
||||||
<input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
<input name="__RequestVerificationToken" type="hidden" value="{0}" /></form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -74,7 +74,7 @@ Html.BeginForm(actionName: "Submit", controllerName: "MvcTagHelper_Order"))
|
||||||
</div><text>
|
</div><text>
|
||||||
</text>@Html.ValidationSummary(message: null, htmlAttributes: new { @class = "order" })<text>
|
</text>@Html.ValidationSummary(message: null, htmlAttributes: new { @class = "order" })<text>
|
||||||
</text>@Html.HiddenFor(m => m.Customer.Key)<text></text>
|
</text>@Html.HiddenFor(m => m.Customer.Key)<text></text>
|
||||||
<input type="submit"></input><text>
|
<input type="submit"/><text>
|
||||||
</text>@Html.AntiForgeryToken();
|
</text>@Html.AntiForgeryToken();
|
||||||
}@**@
|
}@**@
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div asp-validation-summary="ValidationSummary.All" class="order"></div>
|
<div asp-validation-summary="ValidationSummary.All" class="order"></div>
|
||||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="order"></div>
|
<div asp-validation-summary="ValidationSummary.ModelOnly" class="order"></div>
|
||||||
<input type="submit"></input>
|
<input type="submit"/>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue