mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 10:06:10 +08:00
fix multitenancy ui glitch
This commit is contained in:
parent
1e87eee2e4
commit
e853550bda
@ -14,5 +14,7 @@
|
||||
$allCheckboxes.prop("checked", false);
|
||||
}
|
||||
});
|
||||
|
||||
$('input[name=DataProvider]:checked').click();
|
||||
});
|
||||
})(jQuery);
|
@ -4,6 +4,7 @@
|
||||
Layout.Title = T("Add New 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();
|
||||
}
|
||||
@ -30,7 +31,7 @@
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>@T("Database Setup")</legend>
|
||||
<div>
|
||||
<div>
|
||||
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
|
||||
<label for="tenantDatabaseOption" class="forcheckbox">@T("Allow the tenant to set up the database")</label>
|
||||
</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>
|
||||
<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)
|
||||
</span>
|
||||
</div>
|
||||
@ -82,7 +83,7 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
<fieldset class="available-extensions">
|
||||
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
||||
<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>
|
||||
@ -94,15 +95,15 @@
|
||||
</li>
|
||||
|
||||
@for (var i = 0; i < Model.Modules.Count; i++) {
|
||||
<li>
|
||||
@{
|
||||
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]) })
|
||||
<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].ModuleName)
|
||||
}
|
||||
</li>
|
||||
<li>
|
||||
@{
|
||||
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]) })
|
||||
<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].ModuleName)
|
||||
}
|
||||
</li>
|
||||
}
|
||||
</ol>
|
||||
</div>
|
||||
@ -111,4 +112,4 @@
|
||||
<fieldset>
|
||||
<button class="primaryAction" type="submit">@T("Save")</button>
|
||||
</fieldset>
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
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();
|
||||
}
|
||||
@ -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>
|
||||
}
|
||||
else {
|
||||
<div>
|
||||
<div>
|
||||
@Html.RadioButtonFor(svm => svm.DataProvider, "", new { id = "tenantDatabaseOption" })
|
||||
<label for="tenantDatabaseOption" class="forcheckbox">@T("Allow the tenant to set up the database")</label>
|
||||
</div>
|
||||
@ -44,15 +45,17 @@
|
||||
<div>
|
||||
@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>
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
||||
@Html.TextBoxFor(svm => svm.DatabaseConnectionString, new { @class = "text large" })
|
||||
<span class="hint">@T("Example:")<br />@T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
||||
</span>
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseTablePrefix">@T("Database Table Prefix")</label>
|
||||
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
||||
</span>
|
||||
<div class="options">
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseConnectionString">@T("Connection string")</label>
|
||||
@Html.TextBoxFor(svm => svm.DatabaseConnectionString)
|
||||
<span class="hint">@T("Example:") @T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")</span>
|
||||
</span>
|
||||
<span data-controllerid="sqlDatabaseOption">
|
||||
<label for="DatabaseTablePrefix">@T("Database table prefix")</label>
|
||||
@Html.EditorFor(svm => svm.DatabaseTablePrefix)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@ -83,7 +86,7 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="available-extensions">
|
||||
<fieldset class="available-extensions">
|
||||
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
|
||||
<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>
|
||||
@ -95,15 +98,15 @@
|
||||
</li>
|
||||
|
||||
@for (var i = 0; i < Model.Modules.Count; i++) {
|
||||
<li>
|
||||
@{
|
||||
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]) })
|
||||
<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].ModuleName)
|
||||
}
|
||||
</li>
|
||||
<li>
|
||||
@{
|
||||
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]) })
|
||||
<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].ModuleName)
|
||||
}
|
||||
</li>
|
||||
}
|
||||
</ol>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user