Improving element blueprint create and properties validation UI.

This commit is contained in:
Sipke Schoorstra
2014-11-05 23:05:58 -08:00
parent 54d80cae56
commit 6b8f870091
2 changed files with 3 additions and 6 deletions

View File

@@ -3,24 +3,22 @@
Layout.Title = T("Create Blueprint based on {0}", Model.BaseElement.DisplayText);
}
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
<fieldset>
<div>
@Html.LabelFor(m => m.ElementDisplayName, T("Element Display Name"))
@Html.TextBoxFor(m => m.ElementDisplayName, new { @class = "text large" })
@Html.Hint(T("The friendly name of the specialized element. Example: Special {0}", Model.BaseElement.Descriptor.DisplayText))
@Html.ValidationMessageFor(m => m.ElementDisplayName)
</div>
<div>
@Html.LabelFor(m => m.ElementTypeName, T("Element Type Name"))
@Html.TextBoxFor(m => m.ElementTypeName, new { @class = "text large" })
@Html.Hint(T("The technical type name of the specialized element. Example: Acme.Elements.Special{0}", Model.BaseElement.Descriptor.DisplayText))
@Html.ValidationMessageFor(m => m.ElementTypeName)
</div>
<div>
@Html.LabelFor(m => m.ElementCategory, T("Element Category"))
@Html.TextBoxFor(m => m.ElementCategory, new { @class = "text large" })
@Html.Hint(T("Optionally specify a category for this element."))
@Html.ValidationMessageFor(m => m.ElementCategory)
</div>
</fieldset>
<button type="submit">@T("Create")</button>

View File

@@ -3,12 +3,12 @@
Layout.Title = T("Edit Blueprint Properties based on {0}", Model.BaseElement.DisplayText);
}
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
<fieldset>
<div>
@Html.LabelFor(m => m.ElementDisplayName, T("Element Display Name"))
@Html.TextBoxFor(m => m.ElementDisplayName, new {@class = "text large"})
@Html.TextBoxFor(m => m.ElementDisplayName, new { @class = "text large" })
@Html.Hint(T("The friendly name of the specialized element. Example: Special {0}", Model.BaseElement.Descriptor.DisplayText))
@Html.ValidationMessageFor(m => m.ElementDisplayName)
</div>
<div>
@Html.LabelFor(m => m.ElementTypeName, T("Element Type Name"))
@@ -19,7 +19,6 @@
@Html.LabelFor(m => m.ElementCategory, T("Element Category"))
@Html.TextBoxFor(m => m.ElementCategory, new { @class = "text large" })
@Html.Hint(T("Optionally specify a category for this element."))
@Html.ValidationMessageFor(m => m.ElementCategory)
</div>
</fieldset>
<button type="submit">@T("Save")</button>