@model Orchard.MultiTenancy.ViewModels.TenantEditViewModel @using Orchard.Environment.Configuration; @{ Layout.Title = T("Edit Tenant").ToString(); Script.Require("jQuery").AtFoot(); Script.Require("ShapesBase").AtFoot(); Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot(); Script.Include("multi-tenancy.admin.js").AtFoot(); } @using (Html.BeginFormAntiForgeryPost()) { @Html.ValidationSummary()

@Model.Name

@Html.TextBoxFor(m => m.RequestUrlHost, new { @class = "text medium" }) @T("Example: If host is \"orchardproject.net\", the tenant site URL is \"http://orchardproject.net/\". Multiple hosts can be separated by a comma.")
@Html.TextBoxFor(m => m.RequestUrlPrefix, new { @class = "text medium" }) @T("(Optional) Example: If prefix is \"site1\", the tenant URL prefix is \"http://orchardproject.net/site1\"")
@T("Database Setup") @if (Model.State != TenantState.Uninitialized) {
@T("Warning: If you don't know what you're doing you *will* (likely) send this tenant into a downward spiral of irrecoverable disrepair. Have a nice day.")
} else {
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
}
@Html.RadioButtonFor(svm => svm.DataProvider, "SqlCe", new { id = "builtinDatabaseOption" })
@Html.RadioButtonFor(svm => svm.DataProvider, "SqlServer", new { id = "sqlDatabaseOption" })
@Html.TextBoxFor(svm => svm.DatabaseConnectionString) @T("Example:") @T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password") @Html.EditorFor(svm => svm.DatabaseTablePrefix)
@T("Select the Themes which should be available for this tenant. If none is selected, they will all be available.")
  1. @for (var i = 0; i < Model.Themes.Count; i++) {
  2. @{ var theme = Model.Themes[i]; @Html.CheckBox(Html.FieldNameFor(m => m.Themes[i].Checked), Model.Themes[i].Checked, new { id = Html.FieldIdFor(x => x.Themes[i]) }) @Html.HiddenFor(m => m.Themes[i].ThemeId) @Html.HiddenFor(m => m.Themes[i].ThemeName) }
  3. }
@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")
  1. @for (var i = 0; i < Model.Modules.Count; i++) {
  2. @{ var theme = Model.Modules[i]; @Html.CheckBox(Html.FieldNameFor(m => m.Modules[i].Checked), Model.Modules[i].Checked, new { id = Html.FieldIdFor(x => x.Modules[i]) }) @Html.HiddenFor(m => m.Modules[i].ModuleId) @Html.HiddenFor(m => m.Modules[i].ModuleName) }
  3. }
}