give more feedback on action
This commit is contained in:
@@ -20,4 +20,6 @@ def index_post():
|
||||
if request.method == 'POST':
|
||||
with open(app.config.get("MESSAGE_FILE"), 'w') as f:
|
||||
f.write(str(input_message))
|
||||
return redirect("/")
|
||||
result = "Success: The autoreply message has been updated!"
|
||||
|
||||
return render_template("result.html", result=result)
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<head>
|
||||
<title>Autoreply Editor</title>
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
<h1>Autoreply Editor</h1>
|
||||
|
||||
<p>
|
||||
Below you can see the current text of your autoreply message. You
|
||||
can edit and update it directly below:
|
||||
</p>
|
||||
<form action="" method="POST">
|
||||
<textarea name="message" cols="70" rows="10">{{ message }}</textarea>
|
||||
<textarea name="message" cols="120" rows="20">{{ message }}</textarea>
|
||||
<br />
|
||||
<input type="submit" value="Update">
|
||||
</form>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
14
autoreply_editor/templates/result.html
Normal file
14
autoreply_editor/templates/result.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>Autoreply Editor</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Autoreply Editor</h1>
|
||||
|
||||
<p>{{ result }}</p>
|
||||
|
||||
<p><a href="/">Go back</a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user