2021-09-08 17:05:08 -04:00
{% extends 'settings/layout.html' %}
2021-02-27 21:48:10 -05:00
{% load i18n %}
2021-02-28 13:00:36 -05:00
{% block title %}{% trans "Site Settings" %}{% endblock %}
{% block header %}{% trans "Site Settings" %}{% endblock %}
2021-01-29 18:38:42 -05:00
2021-09-28 15:53:17 -04:00
{% block site-subtabs %}
< ul class = "menu-list" >
< li > < a href = "#instance-info" > {% trans "Instance Info" %}< / a > < / li >
2022-02-26 15:43:27 -05:00
< li > < a href = "#display" > {% trans "Display" %}< / a > < / li >
2021-09-28 15:53:17 -04:00
< li > < a href = "#footer" > {% trans "Footer Content" %}< / a > < / li >
< li > < a href = "#registration" > {% trans "Registration" %}< / a > < / li >
< / ul >
{% endblock %}
2021-01-29 18:38:42 -05:00
{% block panel %}
2022-02-17 21:00:19 -05:00
{% if success %}
< div class = "notification is-success is-light" >
< span class = "icon icon-check" aria-hidden = "true" > < / span >
< span >
{% trans "Settings saved" %}
< / span >
< / div >
{% endif %}
{% if site_form.errors %}
< div class = "notification is-danger is-light" >
< span class = "icon icon-x" aria-hidden = "true" > < / span >
< span >
{% trans "Unable to save settings" %}
< / span >
< / div >
{% endif %}
2022-02-27 13:00:50 -05:00
< form
action="{% url 'settings-site' %}"
method="POST"
class="content"
enctype="multipart/form-data"
>
2021-01-29 18:38:42 -05:00
{% csrf_token %}
2021-08-08 21:40:47 -04:00
< section class = "block" id = "instance_info" >
2021-02-27 21:48:10 -05:00
< h2 class = "title is-4" > {% trans "Instance Info" %}< / h2 >
2021-09-28 16:02:09 -04:00
< div class = "box" >
< div class = "field" >
< label class = "label" for = "id_name" > {% trans "Instance Name:" %}< / label >
{{ site_form.name }}
< / div >
< div class = "field" >
< label class = "label" for = "id_instance_tagline" > {% trans "Tagline:" %}< / label >
{{ site_form.instance_tagline }}
< / div >
< div class = "field" >
< label class = "label" for = "id_instance_description" > {% trans "Instance description:" %}< / label >
{{ site_form.instance_description }}
< / div >
< div class = "field" >
2021-11-28 15:52:28 -05:00
< label class = "label mb-0" for = "id_instance_short_description" > {% trans "Short description:" %}< / label >
< p class = "help" id = "desc_instance_short_description" > {% trans "Used when the instance is previewed on joinbookwyrm.com. Does not support HTML or Markdown." %}< / p >
2021-09-28 16:02:09 -04:00
{{ site_form.instance_short_description }}
< / div >
< div class = "field" >
< label class = "label" for = "id_code_of_conduct" > {% trans "Code of conduct:" %}< / label >
{{ site_form.code_of_conduct }}
< / div >
< div class = "field" >
< label class = "label" for = "id_privacy_policy" > {% trans "Privacy Policy:" %}< / label >
{{ site_form.privacy_policy }}
< / div >
2021-02-27 14:53:36 -05:00
< / div >
2021-01-29 18:38:42 -05:00
< / section >
< hr aria-hidden = "true" >
2022-02-26 15:43:27 -05:00
< section class = "block" id = "display" >
< h2 class = "title is-4" > {% trans "Display" %}< / h2 >
< div class = "box" >
< h3 class = "title is-5" > {% trans "Images" %}< / h3 >
< div class = "block is-flex" >
< div >
< label class = "label" for = "id_logo" > {% trans "Logo:" %}< / label >
{{ site_form.logo }}
< / div >
< div >
< label class = "label" for = "id_logo_small" > {% trans "Logo small:" %}< / label >
{{ site_form.logo_small }}
< / div >
< div >
< label class = "label" for = "id_favicon" > {% trans "Favicon:" %}< / label >
{{ site_form.favicon }}
< / div >
2021-01-29 18:38:42 -05:00
< / div >
2022-02-26 15:43:27 -05:00
< h3 class = "title is-5" > {% trans "Themes" %}< / h3 >
< div class = "block" >
< label class = "label" for = "id_default_theme" >
{% trans "Default theme:" %}
< / label >
< div class = "select" >
{{ site_form.default_theme }}
< / div >
2021-01-29 18:38:42 -05:00
< / div >
< / div >
< / section >
< hr aria-hidden = "true" >
< section class = "block" id = "footer" >
2021-02-27 21:48:10 -05:00
< h2 class = "title is-4" > {% trans "Footer Content" %}< / h2 >
2021-09-28 16:02:09 -04:00
< div class = "box" >
< div class = "field" >
< label class = "label" for = "id_support_link" > {% trans "Support link:" %}< / label >
< input type = "text" name = "support_link" maxlength = "255" class = "input" id = "id_support_link" placeholder = "https://www.patreon.com/bookwyrm" { % if site . support_link % } value = "{{ site.support_link }}" { % endif % } >
< / div >
< div class = "field" >
< label class = "label" for = "id_support_title" > {% trans "Support title:" %}< / label >
< input type = "text" name = "support_title" maxlength = "100" class = "input" id = "id_support_title" placeholder = "Patreon" { % if site . support_title % } value = "{{ site.support_title }}" { % endif % } >
< / div >
< div class = "field" >
< label class = "label" for = "id_admin_email" > {% trans "Admin email:" %}< / label >
{{ site_form.admin_email }}
< / div >
< div class = "field" >
< label class = "label" for = "id_footer_item" > {% trans "Additional info:" %}< / label >
{{ site_form.footer_item }}
< / div >
2021-04-30 13:42:27 -04:00
< / div >
2021-01-29 18:38:42 -05:00
< / section >
< hr aria-hidden = "true" >
< section class = "block" id = "registration" >
2021-02-27 21:48:10 -05:00
< h2 class = "title is-4" > {% trans "Registration" %}< / h2 >
2021-09-28 16:02:09 -04:00
< div class = "box" >
< div class = "field" >
< label class = "label" for = "id_allow_registration" >
{{ site_form.allow_registration }}
{% trans "Allow registration" %}
< / label >
< / div >
< div class = "field" >
< label class = "label" for = "id_allow_invite_requests" >
{{ site_form.allow_invite_requests }}
{% trans "Allow invite requests" %}
< / label >
< / div >
2022-03-07 12:49:59 -05:00
< div class = "field" >
< label class = "label" for = "id_invite_requests_question" >
{{ site_form.invite_request_question }}
{% trans "Set a question for invite requests" %}
< / label >
< / div >
< div class = "field" >
< label class = "label" for = "id_invite_question_text" >
{% trans "Question:" %}
{{ site_form.invite_question_text }}
< / label >
< / div >
2021-09-28 16:02:09 -04:00
< div class = "field" >
< label class = "label mb-0" for = "id_require_confirm_email" >
{{ site_form.require_confirm_email }}
{% trans "Require users to confirm email address" %}
< / label >
2021-11-28 15:52:28 -05:00
< p class = "help" id = "desc_require_confirm_email" > {% trans "(Recommended if registration is open)" %}< / p >
2021-09-28 16:02:09 -04:00
< / div >
< div class = "field" >
< label class = "label" for = "id_registration_closed_text" > {% trans "Registration closed text:" %}< / label >
{{ site_form.registration_closed_text }}
< / div >
< div class = "field" >
< label class = "label" for = "id_invite_request_text" > {% trans "Invite request text:" %}< / label >
{{ site_form.invite_request_text }}
2021-11-29 16:33:03 -05:00
2021-11-29 16:39:44 -05:00
{% include 'snippets/form_errors.html' with errors_list=site_form.invite_request_text.errors id="desc_invite_request_text" %}
2021-09-28 16:02:09 -04:00
< / div >
2021-09-18 18:42:48 -04:00
< / div >
2021-01-29 18:38:42 -05:00
< / section >
< footer class = "block" >
2021-02-28 11:42:25 -05:00
< button class = "button is-primary" type = "submit" > {% trans "Save" %}< / button >
2021-01-29 18:38:42 -05:00
< / footer >
< / form >
{% endblock %}