diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Scripts/multi-tenancy.admin.js b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Scripts/multi-tenancy.admin.js index 634e45af5..25faa5b07 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Scripts/multi-tenancy.admin.js +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Scripts/multi-tenancy.admin.js @@ -14,5 +14,7 @@ $allCheckboxes.prop("checked", false); } }); + + $('input[name=DataProvider]:checked').click(); }); })(jQuery); \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml index 59411a967..6568db858 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml @@ -4,18 +4,19 @@ Layout.Title = T("Add New Tenant").ToString(); Script.Require("jQuery").AtFoot(); - Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).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()) { +@using (Html.BeginFormAntiForgeryPost()) { @Html.ValidationSummary()
@Html.TextBoxFor(m => m.Name, new { @class = "text" }) @T("The name of the tenant as it will be displayed in the admin.") -
+
@Html.TextBoxFor(m => m.RequestUrlHost, new { @class = "text medium" }) @@ -30,7 +31,7 @@
@T("Database Setup") -
+
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
@@ -48,18 +49,18 @@ @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. @@ -79,11 +80,11 @@ }
-
+
- -
- + +
+
@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.") @@ -94,21 +95,21 @@ @for (var i = 0; i < Model.Modules.Count; i++) { -
  • - @{ - 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) - } -
  • +
  • + @{ + 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) + } +
  • } -
    -
    - + +
    +
    - } +} diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml index 544b8636d..c66b437b4 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml @@ -5,11 +5,12 @@ Layout.Title = T("Edit Tenant").ToString(); Script.Require("jQuery").AtFoot(); - Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).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()) { +@using (Html.BeginFormAntiForgeryPost()) { @Html.ValidationSummary()
    @@ -24,19 +25,19 @@ @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) { + @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 { -
    + else { +
    @Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
    - } + }
    @Html.RadioButtonFor(svm => svm.DataProvider, "SqlCe", new { id = "builtinDatabaseOption" }) @@ -44,23 +45,25 @@
    @Html.RadioButtonFor(svm => svm.DataProvider, "SqlServer", new { id = "sqlDatabaseOption" }) - - - @Html.TextBoxFor(svm => svm.DatabaseConnectionString, new { @class = "text large" }) - @T("Example:")
    @T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")
    -
    - - - @Html.EditorFor(svm => svm.DatabaseTablePrefix) - +
    + + + @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. @@ -80,11 +83,11 @@ }
    -
    +
    - -
    - + +
    +
    @T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.") @@ -95,20 +98,20 @@ @for (var i = 0; i < Model.Modules.Count; i++) { -
  • - @{ - 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) - } -
  • +
  • + @{ + 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) + } +
  • } -
    -
    - + +
    +