diff --git a/amanuensis/server/lexicon/posts/posts.jinja b/amanuensis/server/lexicon/posts/posts.jinja
index 9683515..efc3059 100644
--- a/amanuensis/server/lexicon/posts/posts.jinja
+++ b/amanuensis/server/lexicon/posts/posts.jinja
@@ -10,6 +10,7 @@
{% endmacro %}
{% block main %}
+{% if current_lexicon.allow_post %}
-
+{% endif %}
{% for post in new_posts %}
{{ make_post(post, True) }}
{% endfor %}
diff --git a/amanuensis/server/lexicon/settings/__init__.py b/amanuensis/server/lexicon/settings/__init__.py
index 12295be..975178f 100644
--- a/amanuensis/server/lexicon/settings/__init__.py
+++ b/amanuensis/server/lexicon/settings/__init__.py
@@ -89,6 +89,7 @@ def setup(lexicon_name):
form.turn_count.data = lexicon.turn_count
form.player_limit.data = lexicon.player_limit
form.character_limit.data = lexicon.character_limit
+ form.allow_post.data = lexicon.allow_post
return render_template(
"settings.jinja",
lexicon_name=lexicon_name,
@@ -109,6 +110,7 @@ def setup(lexicon_name):
lexicon.turn_count = form.turn_count.data
lexicon.player_limit = form.player_limit.data
lexicon.character_limit = form.character_limit.data
+ lexicon.allow_post = form.allow_post.data
g.db.session.commit() # TODO refactor into backend
flash("Settings saved")
return redirect(
diff --git a/amanuensis/server/lexicon/settings/forms.py b/amanuensis/server/lexicon/settings/forms.py
index f7dfab1..e830527 100644
--- a/amanuensis/server/lexicon/settings/forms.py
+++ b/amanuensis/server/lexicon/settings/forms.py
@@ -49,6 +49,7 @@ class SetupSettingsForm(FlaskForm):
widget=NumberInput(),
validators=[Optional()],
)
+ allow_post = BooleanField("Allow players to make posts")
submit = SubmitField("Submit")
diff --git a/amanuensis/server/lexicon/settings/settings.jinja b/amanuensis/server/lexicon/settings/settings.jinja
index ff7b151..cfc71d2 100644
--- a/amanuensis/server/lexicon/settings/settings.jinja
+++ b/amanuensis/server/lexicon/settings/settings.jinja
@@ -80,6 +80,7 @@
{{ number_setting(form.character_limit) }}
+ {{ flag_setting(form.allow_post) }}
{{ form.submit() }}
{% for message in get_flashed_messages() %}