Replace the input! macro with an Input builder (#646)
* Replace the input! macro with an Input builder * Use a BTreeMap instead of an HashMap Followinf @fdb-hiroshima's advice * Rename Input::to_html to Input::html To make clippy happy * Wrap error messages in red paragraphs
This commit is contained in:
@@ -18,8 +18,15 @@
|
||||
<!-- Rocket hack to use various HTTP methods -->
|
||||
<input type=hidden name="_method" value="put">
|
||||
|
||||
@input!(ctx.1, display_name (text), "Display name", form, errors.clone())
|
||||
@input!(ctx.1, email (text), "Email", form, errors.clone())
|
||||
@(Input::new("display_name", i18n!(ctx.1, ""))
|
||||
.default(&form.display_name)
|
||||
.error(&errors)
|
||||
.html(ctx.1))
|
||||
@(Input::new("email", i18n!(ctx.1, ""))
|
||||
.default(&form.email)
|
||||
.error(&errors)
|
||||
.input_type("email")
|
||||
.html(ctx.1))
|
||||
<label for="summary">@i18n!(ctx.1, "Summary")</label>
|
||||
<textarea id="summary" name="summary">@form.summary</textarea>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user