mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 14:54:57 +08:00
fix multitenancy ui glitch
This commit is contained in:
parent
1e87eee2e4
commit
e853550bda
@ -14,5 +14,7 @@
|
|||||||
$allCheckboxes.prop("checked", false);
|
$allCheckboxes.prop("checked", false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('input[name=DataProvider]:checked').click();
|
||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
@ -4,6 +4,7 @@
|
|||||||
Layout.Title = T("Add New Tenant").ToString();
|
Layout.Title = T("Add New Tenant").ToString();
|
||||||
|
|
||||||
Script.Require("jQuery").AtFoot();
|
Script.Require("jQuery").AtFoot();
|
||||||
|
Script.Require("ShapesBase").AtFoot();
|
||||||
Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot();
|
Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot();
|
||||||
Script.Include("multi-tenancy.admin.js").AtFoot();
|
Script.Include("multi-tenancy.admin.js").AtFoot();
|
||||||
}
|
}
|
||||||
@ -30,7 +31,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>@T("Database Setup")</legend>
|
<legend>@T("Database Setup")</legend>
|
||||||
<div>
|
<div>
|
||||||
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
|
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
|
||||||
<label for="tenantDatabaseOption" class="forcheckbox">@T("Allow the tenant to set up the database")</label>
|
<label for="tenantDatabaseOption" class="forcheckbox">@T("Allow the tenant to set up the database")</label>
|
||||||
</div>
|
</div>
|
||||||
@ -48,7 +49,7 @@
|
|||||||
<span class="hint">@T("Example:") @T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
<span class="hint">@T("Example:") @T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
||||||
</span>
|
</span>
|
||||||
<span data-controllerid="sqlDatabaseOption">
|
<span data-controllerid="sqlDatabaseOption">
|
||||||
<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)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -82,7 +83,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset class="available-extensions">
|
<fieldset class="available-extensions">
|
||||||
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
||||||
<div>
|
<div>
|
||||||
<span class="hint">@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")</span>
|
<span class="hint">@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")</span>
|
||||||
@ -94,15 +95,15 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
@for (var i = 0; i < Model.Modules.Count; i++) {
|
@for (var i = 0; i < Model.Modules.Count; i++) {
|
||||||
<li>
|
<li>
|
||||||
@{
|
@{
|
||||||
var theme = Model.Modules[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.CheckBox(Html.FieldNameFor(m => m.Modules[i].Checked), Model.Modules[i].Checked, new { id = Html.FieldIdFor(x => x.Modules[i]) })
|
||||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Modules[i])">@Model.Modules[i].ModuleName</label>
|
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Modules[i])">@Model.Modules[i].ModuleName</label>
|
||||||
@Html.HiddenFor(m => m.Modules[i].ModuleId)
|
@Html.HiddenFor(m => m.Modules[i].ModuleId)
|
||||||
@Html.HiddenFor(m => m.Modules[i].ModuleName)
|
@Html.HiddenFor(m => m.Modules[i].ModuleName)
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
@ -111,4 +112,4 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<button class="primaryAction" type="submit">@T("Save")</button>
|
<button class="primaryAction" type="submit">@T("Save")</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
Layout.Title = T("Edit Tenant").ToString();
|
Layout.Title = T("Edit Tenant").ToString();
|
||||||
|
|
||||||
Script.Require("jQuery").AtFoot();
|
Script.Require("jQuery").AtFoot();
|
||||||
|
Script.Require("ShapesBase").AtFoot();
|
||||||
Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot();
|
Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot();
|
||||||
Script.Include("multi-tenancy.admin.js").AtFoot();
|
Script.Include("multi-tenancy.admin.js").AtFoot();
|
||||||
}
|
}
|
||||||
@ -32,7 +33,7 @@
|
|||||||
<div class="warning message">@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.")</div>
|
<div class="warning message">@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.")</div>
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
<div>
|
<div>
|
||||||
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
|
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
|
||||||
<label for="tenantDatabaseOption" class="forcheckbox">@T("Allow the tenant to set up the database")</label>
|
<label for="tenantDatabaseOption" class="forcheckbox">@T("Allow the tenant to set up the database")</label>
|
||||||
</div>
|
</div>
|
||||||
@ -44,15 +45,17 @@
|
|||||||
<div>
|
<div>
|
||||||
@Html.RadioButtonFor(svm => svm.DataProvider, "SqlServer", new { id = "sqlDatabaseOption" })
|
@Html.RadioButtonFor(svm => svm.DataProvider, "SqlServer", new { id = "sqlDatabaseOption" })
|
||||||
<label for="sqlDatabaseOption" class="forcheckbox">@T("Use an existing SQL Server (or SQL Express) database")</label>
|
<label for="sqlDatabaseOption" class="forcheckbox">@T("Use an existing SQL Server (or SQL Express) database")</label>
|
||||||
<span data-controllerid="sqlDatabaseOption">
|
<div class="options">
|
||||||
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
<span data-controllerid="sqlDatabaseOption">
|
||||||
@Html.TextBoxFor(svm => svm.DatabaseConnectionString, new { @class = "text large" })
|
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
||||||
<span class="hint">@T("Example:")<br />@T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
@Html.TextBoxFor(svm => svm.DatabaseConnectionString)
|
||||||
</span>
|
<span class="hint">@T("Example:") @T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
||||||
<span data-controllerid="sqlDatabaseOption">
|
</span>
|
||||||
<label for="DatabaseTablePrefix">@T("Database Table Prefix")</label>
|
<span data-controllerid="sqlDatabaseOption">
|
||||||
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
<label for="DatabaseTablePrefix">@T("Database table prefix")</label>
|
||||||
</span>
|
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
@ -83,7 +86,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset class="available-extensions">
|
<fieldset class="available-extensions">
|
||||||
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
||||||
<div>
|
<div>
|
||||||
<span class="hint">@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")</span>
|
<span class="hint">@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")</span>
|
||||||
@ -95,15 +98,15 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
@for (var i = 0; i < Model.Modules.Count; i++) {
|
@for (var i = 0; i < Model.Modules.Count; i++) {
|
||||||
<li>
|
<li>
|
||||||
@{
|
@{
|
||||||
var theme = Model.Modules[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.CheckBox(Html.FieldNameFor(m => m.Modules[i].Checked), Model.Modules[i].Checked, new { id = Html.FieldIdFor(x => x.Modules[i]) })
|
||||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Modules[i])">@Model.Modules[i].ModuleName</label>
|
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Modules[i])">@Model.Modules[i].ModuleName</label>
|
||||||
@Html.HiddenFor(m => m.Modules[i].ModuleId)
|
@Html.HiddenFor(m => m.Modules[i].ModuleId)
|
||||||
@Html.HiddenFor(m => m.Modules[i].ModuleName)
|
@Html.HiddenFor(m => m.Modules[i].ModuleName)
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user