summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-12-14 10:03:09 +0100
committerGitHub <noreply@github.com>2020-12-14 10:03:09 +0100
commit47e507fa61be6dc39dd9821e1d07c33e993cc246 (patch)
treea628d53e554ba02a633615b5234698eebe902fab /app/views
parenta7e819b8a8de25414324e354baa62e9abbd3e8c4 (diff)
Add ability to require invite request text (#15326)
Fixes #15273 Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/views')
-rw-r--r--app/views/about/_registration.html.haml2
-rw-r--r--app/views/admin/settings/edit.html.haml6
-rw-r--r--app/views/auth/registrations/new.html.haml2
3 files changed, 8 insertions, 2 deletions
diff --git a/app/views/about/_registration.html.haml b/app/views/about/_registration.html.haml
index 6160ca4d40f..e4d614d71e7 100644
--- a/app/views/about/_registration.html.haml
+++ b/app/views/about/_registration.html.haml
@@ -16,7 +16,7 @@
- if approved_registrations?
.fields-group
= f.simple_fields_for :invite_request do |invite_request_fields|
- = invite_request_fields.input :text, as: :text, wrapper: :with_block_label, required: false
+ = invite_request_fields.input :text, as: :text, wrapper: :with_block_label, required: Setting.require_invite_text
.fields-group
= f.input :agreement, as: :boolean, wrapper: :with_label, label: t('auth.checkbox_agreement_html', rules_path: about_more_path, terms_path: terms_path), required: true, disabled: closed_registrations?
diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml
index 9e28766b1c1..a162490b5da 100644
--- a/app/views/admin/settings/edit.html.haml
+++ b/app/views/admin/settings/edit.html.haml
@@ -44,6 +44,12 @@
%hr.spacer/
.fields-group
+ = f.input :require_invite_text, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.require_invite_text.title'), hint: t('admin.settings.registrations.require_invite_text.desc_html'), disabled: !approved_registrations?
+ .fields-group
+
+ %hr.spacer/
+
+ .fields-group
= f.input :enable_bootstrap_timeline_accounts, as: :boolean, wrapper: :with_label, label: t('admin.settings.enable_bootstrap_timeline_accounts.title')
.fields-group
= f.input :bootstrap_timeline_accounts, wrapper: :with_block_label, label: t('admin.settings.bootstrap_timeline_accounts.title'), hint: t('admin.settings.bootstrap_timeline_accounts.desc_html'), disabled: !Setting.enable_bootstrap_timeline_accounts
diff --git a/app/views/auth/registrations/new.html.haml b/app/views/auth/registrations/new.html.haml
index de541847f2a..6981195ed90 100644
--- a/app/views/auth/registrations/new.html.haml
+++ b/app/views/auth/registrations/new.html.haml
@@ -31,7 +31,7 @@
- if approved_registrations? && !@invite.present?
.fields-group
= f.simple_fields_for :invite_request, resource.invite_request || resource.build_invite_request do |invite_request_fields|
- = invite_request_fields.input :text, as: :text, wrapper: :with_block_label, required: false
+ = invite_request_fields.input :text, as: :text, wrapper: :with_block_label, required: Setting.require_invite_text
= f.input :invite_code, as: :hidden