Some more work on the MT UI

- tenant database setup can be preconfigured
- site setup UI reflects available settings (e.g. if database setup is preconfigured then don't show db options)
- updated jQuery from 1.4.1 to 1.4.2 (finally)

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-05-10 16:01:04 -07:00
parent 6187110957
commit fa6ac5f0dd
23 changed files with 6503 additions and 6286 deletions

View File

@@ -1,6 +1,7 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<TenantsAddViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.MultiTenancy.ViewModels"%>
<% Html.RegisterFootScript("multitenancy.js"); %>
<h1><%=Html.TitleForPage(T("Add New Tenant").ToString()) %></h1>
<%using (Html.BeginFormAntiForgeryPost()) { %>
<%= Html.ValidationSummary() %>
@@ -18,18 +19,27 @@
<fieldset>
<legend><%=_Encoded("Database Setup") %></legend>
<div>
<input type="radio" name="" value="" />
<label for="" class="forcheckbox"><%=_Encoded("Allow the client to set up the database") %></label>
<input type="radio" name="<%=Html.NameOf(m => m.DatabaseOptions) %>" value="" id="tenantDatabaseOption" <%=Model.DatabaseOptions == null ? " checked=\"checked\"" : "" %>/>
<label for="tenantDatabaseOption" class="forcheckbox"><%=_Encoded("Allow the client to set up the database") %></label>
</div>
<div>
<input type="radio" name="" value="" />
<label for="" class="forcheckbox"><%=_Encoded("Use built-in data storage") %></label>
</div>
<div>
<input type="radio" name="" value="" />
<label for="" class="forcheckbox"><%=_Encoded("Use an existing SQL Server (or SQL Express) database") %></label>
</div>
</fieldset>
<div>
<%=Html.RadioButtonFor(svm => svm.DatabaseOptions, true, new { id = "builtinDatabaseOption" })%>
<label for="builtinDatabaseOption" class="forcheckbox"><%=_Encoded("Use built-in data storage (SQLite)") %></label>
</div>
<div>
<%=Html.RadioButtonFor(svm => svm.DatabaseOptions, false, new { id = "sqlDatabaseOption" })%>
<label for="sqlDatabaseOption" class="forcheckbox"><%=_Encoded("Use an existing SQL Server (or SQL Express) database") %></label>
<span data-controllerid="sqlDatabaseOption">
<label for="DatabaseConnectionString"><%=_Encoded("Connection string") %></label>
<%=Html.EditorFor(svm => svm.DatabaseConnectionString)%>
<span class="hint"><%=_Encoded("Example:") %><br /><%=_Encoded("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password") %></span>
</span>
<span data-controllerid="sqlDatabaseOption">
<label for="DatabaseTablePrefix"><%=_Encoded("Database Table Prefix") %></label>
<%=Html.EditorFor(svm => svm.DatabaseTablePrefix)%>
</span>
</div>
</fieldset>
<fieldset>
<input type="submit" class="button primaryAction" value="<%=_Encoded("Save") %>" />
</fieldset>