Add usersettings template and config values
Tá an tiomantas seo le fáil i:
		| @@ -95,7 +95,7 @@ Config::Config(const std::map<std::string, std::string> &map) | ||||
| 	this->urls.settingsurl = required("settingsurl"); | ||||
| 	this->urls.deletionurl = required("deletionurl"); | ||||
| 	this->urls.adminregisterurl = required("adminregisterurl"); | ||||
| 	this->urls.userchangepwurl = required("userchangepwurl"); | ||||
| 	this->urls.usersettingsurl = required("usersettingsurl"); | ||||
| 	this->connectionstring = required("connectionstring"); | ||||
|  | ||||
| 	this->handlersConfig.max_pagename_length = optional("max_pagename_length", 256); | ||||
|   | ||||
							
								
								
									
										2
									
								
								config.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								config.h
									
									
									
									
									
								
							| @@ -40,7 +40,7 @@ struct ConfigUrls | ||||
| 	std::string deletionurl; | ||||
| 	std::string linkhistorysort; | ||||
| 	std::string adminregisterurl; | ||||
| 	std::string userchangepwurl; | ||||
| 	std::string usersettingsurl; | ||||
| }; | ||||
|  | ||||
| class ConfigVariableResolver | ||||
|   | ||||
							
								
								
									
										17
									
								
								template/quitesimple/usersettings
									
									
									
									
									
										Comhad gnáth
									
								
							
							
						
						
									
										17
									
								
								template/quitesimple/usersettings
									
									
									
									
									
										Comhad gnáth
									
								
							| @@ -0,0 +1,17 @@ | ||||
| {qswiki:include:general_header} | ||||
| <main id="content"> | ||||
| <h2>User settings</h2> | ||||
| <br> | ||||
| <h3>Change your current password</h3> | ||||
| <br><br> | ||||
| <form action="{qswiki:var:usersettingsurl}" method="POST"> | ||||
| Current password: <input type="text" name="oldpassword" style="width: 25%;"></input><br> | ||||
| New Password: <input type="password" name="newpassword" style="width: 25%;"></input><br> | ||||
| Repeat password: <input type="password" name="newpasswordconfirm" style="width: 25%;"></input><br> | ||||
|  | ||||
| <button type="submit" name="do" value="submit">Submit</button> | ||||
| <input type="hidden" name="csrf_token" value="{qswiki:var:csrf_token}"></input> | ||||
|  | ||||
| </form> | ||||
| </main> | ||||
| {qswiki:include:general_footer} | ||||
| @@ -106,6 +106,11 @@ std::string UrlProvider::pageDelete(std::string pagename) | ||||
| 	return replaceOnlyPage(config->linkdelete, pagename); | ||||
| } | ||||
|  | ||||
| std::string UrlProvider::userSettings() | ||||
| { | ||||
| 	return config->usersettingsurl; | ||||
| } | ||||
|  | ||||
| std::string UrlProvider::category(std::string catname) | ||||
| { | ||||
| 	return replaceSingleVar(config->linkcategory, "category", catname); | ||||
|   | ||||
| @@ -41,7 +41,7 @@ class UrlProvider | ||||
|  | ||||
| 	std::string pageDelete(std::string pagename); | ||||
|  | ||||
| 	std::string userchangepw(); | ||||
| 	std::string userSettings(); | ||||
|  | ||||
| 	std::string refreshSession(); | ||||
|  | ||||
|   | ||||
		Tagairt in Eagrán Nua
	
	Cuir bac ar úsáideoir