WIP. Reorganizing things to get settings work. First attempt on Database settings

This commit is contained in:
emeric
2014-07-22 12:57:29 +02:00
parent f1cea2404e
commit 938e96cc40
32 changed files with 752 additions and 96 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "LmsAuth.hpp"
namespace UserInterface {
LmsAuth::LmsAuth(Database::Handler& db)
: Wt::Auth::AuthWidget(db.getAuthService(),
db.getUserDatabase(),
db.getLogin())
{
}
void
LmsAuth::createLoggedInView()
{
hide();
}
void
LmsAuth::createLoginView()
{
show();
Wt::Auth::AuthWidget::createLoginView();
}
} // namespace UserInterface
+32
View File
@@ -0,0 +1,32 @@
#ifndef UI_AUTH_HPP
#define UI_AUTH_HPP
#include <Wt/Auth/AuthService>
#include <Wt/Auth/AbstractUserDatabase>
#include <Wt/Auth/Login>
#include <Wt/Auth/AuthWidget>
#include <Wt/WContainerWidget>
#include "database/DatabaseHandler.hpp"
namespace UserInterface {
class LmsAuth : public Wt::Auth::AuthWidget
{
public:
LmsAuth(Database::Handler& db);
// LoggedInView is delegated to LmsHome
void createLoggedInView () ;
void createLoginView ();
private:
};
} // namespace UserInterface
#endif