WIP: 2 neue Felder hinzugefügt beim Registrieren ( Fachrichtung und Abschlussjahrgang) #1
@ -56,6 +56,19 @@
|
||||
<input id="displayname" class="form-control" @bind="@_displayname" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="subject" HelpText="Deine Studien- oder Ausbildungsrichtung" ResourceKey="Subject">Fachrichtung:</Label>
|
||||
<div class="col-sm-9">
|
||||
<input id="subject" class="form-control" @bind="@_subject" maxlength="100" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="graduationYear" HelpText="Dein voraussichtlicher Abschlussjahrgang" ResourceKey="GraduationYear">Abschlussjahrgang:</Label>
|
||||
<div class="col-sm-9">
|
||||
<input id="graduationYear" type="number" class="form-control" @bind="@_graduationYear" min="1950" max="2100" step="1" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<button type="button" class="btn btn-primary" @onclick="Register">@Localizer["Register"]</button>
|
||||
@ -89,6 +102,9 @@ else
|
||||
private string _displayname = string.Empty;
|
||||
private bool _userCreated = false;
|
||||
private bool _allowsitelogin = true;
|
||||
private string _subject = string.Empty;
|
||||
private int _graduationYear;
|
||||
|
||||
|
||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous;
|
||||
|
||||
@ -124,7 +140,10 @@ else
|
||||
Password = _password,
|
||||
Email = _email,
|
||||
DisplayName = (_displayname == string.Empty ? _username : _displayname),
|
||||
PhotoFileId = null
|
||||
PhotoFileId = null,
|
||||
Subject = _subject,
|
||||
GraduationYear = _graduationYear
|
||||
|
||||
|
||||
};
|
||||
user = await UserService.AddUserAsync(user);
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
"RenderMode": "Interactive",
|
||||
"Runtime": "Server",
|
||||
"Database": {
|
||||
"DefaultDBType": ""
|
||||
"DefaultDBType": "Oqtane.Database.Sqlite.SqliteDatabase, Oqtane.Database.Sqlite"
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": ""
|
||||
"DefaultConnection": "Data Source=Oqtane-202507152139.db;"
|
||||
},
|
||||
"Installation": {
|
||||
"DefaultAlias": "",
|
||||
@ -54,5 +54,9 @@
|
||||
"LogLevel": {
|
||||
"Default": "Information"
|
||||
}
|
||||
}
|
||||
},
|
||||
"InstallationId": "e0b3aaed-a33d-4756-bd08-a83403d0c437",
|
||||
"InstallationVersion": "6.1.1",
|
||||
"InstallationDate": "202507152140",
|
||||
"PackageRegistryEmail": "ismail.hasimoglu@edu.szu.at"
|
||||
Kocoder
commented
Bitte die appsettings.json Datei nie mitcommiten. Todo für @Kocoder: Bitte in die .gitignore packen. Bitte die appsettings.json Datei nie mitcommiten.
Todo für @Kocoder: Bitte in die .gitignore packen.
|
||||
}
|
@ -32,6 +32,10 @@ namespace Oqtane.Models
|
||||
/// <summary>
|
||||
/// Reference to a <see cref="File"/> containing the users photo.
|
||||
/// </summary>
|
||||
|
||||
public string Subject { get; set; }
|
||||
public int GraduationYear { get; set; }
|
||||
Kocoder
commented
1. Die Kommentare passen nicht mehr zu den folgenden Fields.
2. Wollen wir Subject und GraduationYear überhaupt auf dem User speichern? Sollte das nicht eigentlich als User Profile Objekt abgelegt werden? (Ich würde das User Model nur so wenig wie eben möglich anfassen.)
|
||||
|
||||
public int? PhotoFileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user
Je nach dem wie die Settings Serverseitig gespeichert werden / wie wir diese Felde an den Server übermitteln müssen wir da nochmal Hand anlegen.