implemented un-subscribe

This commit is contained in:
2022-04-17 11:30:02 +02:00
parent 9bd2cceb7d
commit 6d73018247
6 changed files with 222 additions and 94 deletions

View File

@@ -145,5 +145,9 @@ function subscribeTo(domain,prefix){
window.location.href='subscribe?list='+prefix+'@'+domain;
}
function unsubscribeFrom(domain,prefix){
window.location.href='unsubscribe?list='+prefix+'@'+domain;
}
$(start); // document.on ready

View File

@@ -16,11 +16,11 @@
<fieldset>
<legend>Suscribe to "«data.list»"</legend>
<label>
<input type="text" name="name" value="«if(data.user)»«data.user.name»«else»«data.name»«endif»">
<input type="text" name="name" value="«if(data.name)»«data.name»«else»«data.user.name»«endif»">
Name
</label>
<label>
<input type="text" name="email" value="«if(data.user)»«data.user.email»«else»«data.email»«endif»">
<input type="text" name="email" value="«if(data.email)»«data.email»«else»«data.user.email»«endif»">
Email
</label>
<label>

View File

@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="jquery"></script>
<script src="js"></script>
<link rel="stylesheet" href="css" />
</head>
<body id="login">
«navigation()»
«userinfo()»
«messages()»
<h1>Widerhall Subscription</h1>
<form method="POST">
<input type="hidden" name="list" value="«data.list»" />
<fieldset>
<legend>Un-subscribe from "«data.list»"</legend>
<label>
<input type="text" name="email" value="«if(data.email)»«data.email»«else»«data.user.email»«endif»">
Email
</label>
<label>
<input type="password" name="password">
Password (optional)
</label>
<button type="submit">Un-subscribe</button>
</fieldset>
</form>
</body>
</html>