4 #parse("shared/inlineerror.vm")
\r
7 #set ($validatorForm = "return validateForm( this, false, false, false, false, 5 ) " )
\r
9 $HtmlHelper.Form("create.rails", $DictHelper.CreateDict("method=post", "onsubmit=${validatorForm}", "enctype=multipart/form-data"))
\r
11 <table border="0" cellpadding="2" width="360px">
\r
13 <td>$HtmlHelper.LabelFor("product.name", "Name:")</td>
\r
14 <td>$HtmlHelper.InputText("product.name", $product.name, 25, 25, $DictHelper.CreateDict("validators=blank"))</td>
\r
17 <td>$HtmlHelper.LabelFor("product.description", "Description:")</td>
\r
18 <td>$HtmlHelper.TextArea("product.description", 30, 3, $product.Description)</td>
\r
21 <td>$HtmlHelper.LabelFor("product.price", "Price:")</td>
\r
22 <td>$HtmlHelper.InputText("product.price", $product.price.ToString(), 5, 5)</td>
\r
25 <td>$HtmlHelper.LabelFor("product.category.id", "Category:")</td>
\r
27 <!-- See how we manage to save a relation -->
\r
28 $HtmlHelper.Select("product.category.id")
\r
29 $HtmlHelper.CreateOptions($categories, "Name", "Id", $product.category.id)
\r
30 $HtmlHelper.EndSelect()
\r
34 <td>$HtmlHelper.LabelFor("picture", "Picture:")</td>
\r
35 <td>$HtmlHelper.InputFile("picture")</td>
\r
40 $HtmlHelper.SubmitButton("Create")
\r
43 $HtmlHelper.EndForm()
\r