summaryrefslogtreecommitdiff
path: root/src/user_content.hpp
blob: 29df43db0943b73bf52e26c21316b19e6810599c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef USER_CONTENT_HPP
#define USER_CONTENT_HPP

#include "master_content.hpp"

#include <cppcms/form.h>

namespace content {

struct login_form : public cppcms::form {
	apps::strusCms &cms;
	cppcms::widgets::text username;
	cppcms::widgets::password password;
	cppcms::widgets::submit submit;

	public:
		login_form( apps::strusCms &cms );
		virtual bool validate( );
				
};

struct register_user_form : public cppcms::form {
	apps::strusCms &cms;
	cppcms::widgets::text username;
	cppcms::widgets::text printName;
	cppcms::widgets::password password;
	cppcms::widgets::password password2;
	cppcms::widgets::text email;
	cppcms::widgets::text captcha;
	cppcms::widgets::submit submit;
	
	public:
		register_user_form( apps::strusCms &cms );
		virtual bool validate( );
};

struct confirm_register_form : public cppcms::form {
	apps::strusCms &cms;
	cppcms::widgets::text code;
	cppcms::widgets::submit submit;

	public:
		confirm_register_form( apps::strusCms &cms );
		virtual bool validate( );
};

struct user : public master {
	login_form login;
	register_user_form register_user;
	confirm_register_form confirm_register;
	
	std::string captcha_base64;
	
	public:
		user( apps::strusCms &cms );
};

}

#endif