Formatted Setup/Index.cshtml file.

This commit is contained in:
Sipke Schoorstra
2015-07-22 10:17:34 +01:00
parent eace3c2506
commit cf94a646c5

View File

@@ -12,16 +12,13 @@
} }
@helper RenderRecipeOptions(IEnumerable<Recipe> recipes) { @helper RenderRecipeOptions(IEnumerable<Recipe> recipes) {
foreach (var recipe in recipes) { foreach (var recipe in recipes) {
var optionAttributes = new RouteValueDictionary { var optionAttributes = new RouteValueDictionary {{ "data-recipe-description", recipe.Description }};
{ "data-recipe-description", recipe.Description }
};
if (Model.Recipe == null && recipe.Name == "Default") { if (Model.Recipe == null && recipe.Name == "Default") {
optionAttributes["selected"] = "selected"; optionAttributes["selected"] = "selected";
} }
@Html.SelectOption(Model.Recipe, recipe.Name, recipe.Name, optionAttributes) @Html.SelectOption(Model.Recipe, recipe.Name, recipe.Name, optionAttributes)
} }
} }
}
<h1>@Html.TitleForPage(T("Get Started").ToString())</h1> <h1>@Html.TitleForPage(T("Get Started").ToString())</h1>
@using (Html.BeginFormAntiForgeryPost()) { @using (Html.BeginFormAntiForgeryPost()) {
@@ -68,24 +65,19 @@ if (!Model.DatabaseIsPreconfigured) {
<div data-controllerid="builtin" data-defaultstate="hidden"> <div data-controllerid="builtin" data-defaultstate="hidden">
<label for="DatabaseConnectionString">@T("Connection string")</label> <label for="DatabaseConnectionString">@T("Connection string")</label>
@Html.EditorFor(svm => svm.DatabaseConnectionString) @Html.EditorFor(svm => svm.DatabaseConnectionString)
<span data-controllerid="sqlserver" class="hint databaseTypeHint"> <span data-controllerid="sqlserver" class="hint databaseTypeHint">
@T("Data Source=sqlServerName;Initial Catalog=dbName;User ID=userName;Password=password") @T("Data Source=sqlServerName;Initial Catalog=dbName;User ID=userName;Password=password")
</span> </span>
<span data-controllerid="mysql" class="hint databaseTypeHint"> <span data-controllerid="mysql" class="hint databaseTypeHint">
@T("Data Source=serverName;Database=dbName;User Id=userName;Password=password") @T("Data Source=serverName;Database=dbName;User Id=userName;Password=password")
</span> </span>
<span data-controllerid="postgresql" class="hint databaseTypeHint"> <span data-controllerid="postgresql" class="hint databaseTypeHint">
@T("Server=serverName;Port=5432;Database=dbName;User Id=userName;Password=password") @T("Server=serverName;Port=5432;Database=dbName;User Id=userName;Password=password")
</span> </span>
<br /><br /> <br /><br />
<label for="DatabaseTablePrefix">@T("Database Table Prefix")</label> <label for="DatabaseTablePrefix">@T("Database Table Prefix")</label>
@Html.EditorFor(svm => svm.DatabaseTablePrefix) @Html.EditorFor(svm => svm.DatabaseTablePrefix)
</div> </div>
</fieldset> </fieldset>
} }
<fieldset> <fieldset>
@@ -120,7 +112,6 @@ if (!Model.DatabaseIsPreconfigured) {
</div> </div>
</div> </div>
</div> </div>
<fieldset> <fieldset>
<button class="primaryAction setupButton" type="submit">@T("Finish Setup")</button> <button class="primaryAction setupButton" type="submit">@T("Finish Setup")</button>
</fieldset> </fieldset>