Merge remote-tracking branch 'oqtane/dev' into dev

This commit is contained in:
Leigh 2021-11-02 20:06:37 +01:00
commit 7aa92c039a
2 changed files with 10 additions and 9 deletions

View File

@ -147,13 +147,13 @@ else
@DatabaseConfigComponent; @DatabaseConfigComponent;
} }
<div class="row mb-1 align-items-center"> <div class="row mb-1 align-items-center">
<Label Class="col-sm-3" For="hostUsername" HelpText="Enter the username of the host for this site" ResourceKey="HostUsername">Host Username:</Label> <Label Class="col-sm-3" For="hostUsername" HelpText="Enter the username of an existing host user" ResourceKey="HostUsername">Host Username:</Label>
<div class="col-sm-9"> <div class="col-sm-9">
<input id="hostUsername" class="form-control" @bind="@_hostUserName" readonly /> <input id="hostUsername" class="form-control" @bind="@_hostusername" required />
</div> </div>
</div> </div>
<div class="row mb-1 align-items-center"> <div class="row mb-1 align-items-center">
<Label Class="col-sm-3" For="hostPassword" HelpText="Enter the password for the host of this site" ResourceKey="HostPassword">Host Password:</Label> <Label Class="col-sm-3" For="hostPassword" HelpText="Enter the password of an existing host user" ResourceKey="HostPassword">Host Password:</Label>
<div class="col-sm-9"> <div class="col-sm-9">
<input id="hostPassword" type="password" class="form-control" @bind="@_hostpassword" required /> <input id="hostPassword" type="password" class="form-control" @bind="@_hostpassword" required />
</div> </div>
@ -186,7 +186,7 @@ else
private string _tenantName = string.Empty; private string _tenantName = string.Empty;
private string _hostUserName = UserNames.Host; private string _hostusername = string.Empty;
private string _hostpassword = string.Empty; private string _hostpassword = string.Empty;
private string _name = string.Empty; private string _name = string.Empty;
@ -303,7 +303,7 @@ else
// validate host credentials // validate host credentials
var user = new User(); var user = new User();
user.SiteId = PageState.Site.SiteId; user.SiteId = PageState.Site.SiteId;
user.Username = UserNames.Host; user.Username = _hostusername;
user.Password = _hostpassword; user.Password = _hostpassword;
user = await UserService.LoginUserAsync(user, false, false); user = await UserService.LoginUserAsync(user, false, false);
if (user.IsAuthenticated) if (user.IsAuthenticated)
@ -320,8 +320,9 @@ else
config.TenantName = _tenantName; config.TenantName = _tenantName;
config.DatabaseType = database.DBType; config.DatabaseType = database.DBType;
config.ConnectionString = connectionString; config.ConnectionString = connectionString;
config.HostEmail = user.Email; config.HostUsername = _hostusername;
config.HostPassword = _hostpassword; config.HostPassword = _hostpassword;
config.HostEmail = user.Email;
config.HostName = user.DisplayName; config.HostName = user.DisplayName;
config.IsNewTenant = true; config.IsNewTenant = true;
} }

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
@ -217,10 +217,10 @@
<value>Enter the password for the integrated security</value> <value>Enter the password for the integrated security</value>
</data> </data>
<data name="HostUsername.HelpText" xml:space="preserve"> <data name="HostUsername.HelpText" xml:space="preserve">
<value>Enter a valid host username</value> <value>Enter the username of an existing host user</value>
</data> </data>
<data name="HostPassword.HelpText" xml:space="preserve"> <data name="HostPassword.HelpText" xml:space="preserve">
<value>Enter a valid host password</value> <value>Enter the password of an existing host user</value>
</data> </data>
<data name="Name.Text" xml:space="preserve"> <data name="Name.Text" xml:space="preserve">
<value>Site Name: </value> <value>Site Name: </value>