mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-26 18:44:13 +00:00
Improve UI of admin site settings (#4163)
This commit is contained in:
parent
1764c32b9e
commit
056b5ed72f
|
@ -22,7 +22,7 @@ module Admin
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@settings = Setting.all_as_records
|
@admin_settings = Form::AdminSettings.new
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
@ -38,12 +38,12 @@ module Admin
|
||||||
private
|
private
|
||||||
|
|
||||||
def settings_params
|
def settings_params
|
||||||
params.permit(ADMIN_SETTINGS)
|
params.require(:form_admin_settings).permit(ADMIN_SETTINGS)
|
||||||
end
|
end
|
||||||
|
|
||||||
def value_for_update(key, value)
|
def value_for_update(key, value)
|
||||||
if BOOLEAN_SETTINGS.include?(key)
|
if BOOLEAN_SETTINGS.include?(key)
|
||||||
value == 'true'
|
value == '1'
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
end
|
end
|
||||||
|
|
|
@ -57,10 +57,7 @@ code {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.input.file,
|
.input.with_label {
|
||||||
.input.select,
|
|
||||||
.input.radio_buttons,
|
|
||||||
.input.check_boxes {
|
|
||||||
padding: 15px 0;
|
padding: 15px 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
@ -71,6 +68,44 @@ code {
|
||||||
display: block;
|
display: block;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.boolean {
|
||||||
|
padding: initial;
|
||||||
|
margin-bottom: initial;
|
||||||
|
|
||||||
|
.label_input > label {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 14px;
|
||||||
|
color: $primary-text-color;
|
||||||
|
display: block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
label.checkbox {
|
||||||
|
position: relative;
|
||||||
|
padding-left: 25px;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input.with_block_label {
|
||||||
|
& > label {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 16px;
|
||||||
|
color: $primary-text-color;
|
||||||
|
display: block;
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
float: left;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fields-group {
|
.fields-group {
|
||||||
|
@ -106,7 +141,7 @@ code {
|
||||||
input[type=checkbox] {
|
input[type=checkbox] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 1px;
|
top: 5px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,6 +151,29 @@ code {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.check_boxes {
|
||||||
|
.checkbox {
|
||||||
|
label {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 14px;
|
||||||
|
color: $primary-text-color;
|
||||||
|
display: block;
|
||||||
|
width: auto;
|
||||||
|
position: relative;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-left: 25px;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=checkbox] {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 5px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
input[type=text],
|
input[type=text],
|
||||||
input[type=number],
|
input[type=number],
|
||||||
input[type=email],
|
input[type=email],
|
||||||
|
@ -390,25 +448,6 @@ code {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user_filtered_languages {
|
|
||||||
& > label {
|
|
||||||
font-family: inherit;
|
|
||||||
font-size: 16px;
|
|
||||||
color: $primary-text-color;
|
|
||||||
display: block;
|
|
||||||
padding-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hint {
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
float: left;
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-follow-actions {
|
.post-follow-actions {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $ui-primary-color;
|
color: $ui-primary-color;
|
||||||
|
|
29
app/models/form/admin_settings.rb
Normal file
29
app/models/form/admin_settings.rb
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class Form::AdminSettings
|
||||||
|
include ActiveModel::Model
|
||||||
|
|
||||||
|
delegate(
|
||||||
|
:site_contact_username,
|
||||||
|
:site_contact_username=,
|
||||||
|
:site_contact_email,
|
||||||
|
:site_contact_email=,
|
||||||
|
:site_title,
|
||||||
|
:site_title=,
|
||||||
|
:site_description,
|
||||||
|
:site_description=,
|
||||||
|
:site_extended_description,
|
||||||
|
:site_extended_description=,
|
||||||
|
:site_terms,
|
||||||
|
:site_terms=,
|
||||||
|
:open_registrations,
|
||||||
|
:open_registrations=,
|
||||||
|
:closed_registrations_message,
|
||||||
|
:closed_registrations_message=,
|
||||||
|
:open_deletion,
|
||||||
|
:open_deletion=,
|
||||||
|
:timeline_preview,
|
||||||
|
:timeline_preview=,
|
||||||
|
to: Setting
|
||||||
|
)
|
||||||
|
end
|
|
@ -1,64 +1,32 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('admin.settings.title')
|
= t('admin.settings.title')
|
||||||
|
|
||||||
= form_tag(admin_settings_path, method: :put, class: 'simple_form', style: 'max-width: 100%') do
|
= simple_form_for @admin_settings, url: admin_settings_path, html: { method: :patch } do |f|
|
||||||
%table.table
|
.fields-group
|
||||||
%thead
|
= f.input :site_title, placeholder: t('admin.settings.site_title')
|
||||||
%tr
|
= f.input :site_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description.title'), hint: t('admin.settings.site_description.desc_html'), input_html: { rows: 8 }
|
||||||
%th{ width: '40%' }
|
= f.input :site_contact_username, placeholder: t('admin.settings.contact_information.username')
|
||||||
= t('admin.settings.setting')
|
= f.input :site_contact_email, placeholder: t('admin.settings.contact_information.email')
|
||||||
%th
|
|
||||||
%tbody
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.contact_information.label')
|
|
||||||
%td= text_field_tag :site_contact_username, @settings['site_contact_username'].value, place_holder: t('admin.settings.contact_information.username')
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.accounts.email')
|
|
||||||
%td= text_field_tag :site_contact_email, @settings['site_contact_email'].value, place_holder: t('admin.settings.contact_information.email')
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.site_title')
|
|
||||||
%td= text_field_tag :site_title, @settings['site_title'].value
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.site_description.title')
|
|
||||||
%p= t('admin.settings.site_description.desc_html')
|
|
||||||
%td= text_area_tag :site_description, @settings['site_description'].value, rows: 8
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.site_description_extended.title')
|
|
||||||
%p= t('admin.settings.site_description_extended.desc_html')
|
|
||||||
%td= text_area_tag :site_extended_description, @settings['site_extended_description'].value, rows: 8
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.site_terms.title')
|
|
||||||
%p= t('admin.settings.site_terms.desc_html')
|
|
||||||
%td= text_area_tag :site_terms, @settings['site_terms'].value, rows: 8
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.registrations.open.title')
|
|
||||||
%p= t('admin.settings.registrations.open.desc_html')
|
|
||||||
%td
|
|
||||||
= select_tag :open_registrations, options_for_select({ t('simple_form.no') => false, t('simple_form.yes') => true }, @settings['open_registrations'].value)
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.registrations.closed_message.title')
|
|
||||||
%p= t('admin.settings.registrations.closed_message.desc_html')
|
|
||||||
%td= text_area_tag :closed_registrations_message, @settings['closed_registrations_message'].value, rows: 8
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.registrations.deletion.title')
|
|
||||||
%p= t('admin.settings.registrations.deletion.desc_html')
|
|
||||||
%td
|
|
||||||
= select_tag :open_deletion, options_for_select({ t('simple_form.no') => false, t('simple_form.yes') => true }, @settings['open_deletion'].value)
|
|
||||||
%tr
|
|
||||||
%td
|
|
||||||
%strong= t('admin.settings.timeline_preview.title')
|
|
||||||
%p= t('admin.settings.timeline_preview.desc_html')
|
|
||||||
%td
|
|
||||||
= select_tag :timeline_preview, options_for_select({ t('simple_form.no') => false, t('simple_form.yes') => true }, @settings['timeline_preview'].value)
|
|
||||||
|
|
||||||
.simple_form.actions
|
%hr/
|
||||||
= button_tag t('generic.save_changes'), type: :submit, class: :btn
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :timeline_preview, as: :boolean, wrapper: :with_label, label: t('admin.settings.timeline_preview.title'), hint: t('admin.settings.timeline_preview.desc_html')
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :open_registrations, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.open.title'), hint: t('admin.settings.registrations.open.desc_html')
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :open_deletion, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.deletion.title'), hint: t('admin.settings.registrations.deletion.desc_html')
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :closed_registrations_message, as: :text, wrapper: :with_block_label, label: t('admin.settings.registrations.closed_message.title'), hint: t('admin.settings.registrations.closed_message.desc_html'), input_html: { rows: 8 }
|
||||||
|
|
||||||
|
%hr/
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :site_extended_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description_extended.title'), hint: t('admin.settings.site_description_extended.desc_html'), input_html: { rows: 8 }
|
||||||
|
= f.input :site_terms, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_terms.title'), hint: t('admin.settings.site_terms.desc_html'), input_html: { rows: 8 }
|
||||||
|
|
||||||
|
.actions
|
||||||
|
= f.button :button, t('generic.save_changes'), type: :submit
|
||||||
|
|
|
@ -50,14 +50,14 @@ SimpleForm.setup do |config|
|
||||||
# b.use :full_error, wrap_with: { tag: :span, class: :error }
|
# b.use :full_error, wrap_with: { tag: :span, class: :error }
|
||||||
end
|
end
|
||||||
|
|
||||||
config.wrappers :with_label, class: :input, hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
config.wrappers :with_label, class: [:input, :with_label], hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
||||||
b.use :html5
|
b.use :html5
|
||||||
b.use :label_input, wrap_with: { tag: :div, class: :label_input }
|
b.use :label_input, wrap_with: { tag: :div, class: :label_input }
|
||||||
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
||||||
b.use :error, wrap_with: { tag: :span, class: :error }
|
b.use :error, wrap_with: { tag: :span, class: :error }
|
||||||
end
|
end
|
||||||
|
|
||||||
config.wrappers :with_block_label, class: :input, hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
config.wrappers :with_block_label, class: [:input, :with_block_label], hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
||||||
b.use :html5
|
b.use :html5
|
||||||
b.use :label
|
b.use :label
|
||||||
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
||||||
|
|
|
@ -155,7 +155,6 @@ ca:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Introduir una adreça de correu electrònic pùblica
|
email: Introduir una adreça de correu electrònic pùblica
|
||||||
label: Informació de contacte
|
|
||||||
username: Introduir un nom d'usuari
|
username: Introduir un nom d'usuari
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -163,7 +162,6 @@ ca:
|
||||||
title: Missatge de registre tancat
|
title: Missatge de registre tancat
|
||||||
open:
|
open:
|
||||||
title: Registre obert
|
title: Registre obert
|
||||||
setting: Ajust
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Es mostra com un paràgraf a la pàgina principal i s'utilitza com una etiqueta meta.<br>Pots utilitzar etiquetes HTML, en particular <code><a></code> i <code><em></code>.
|
desc_html: Es mostra com un paràgraf a la pàgina principal i s'utilitza com una etiqueta meta.<br>Pots utilitzar etiquetes HTML, en particular <code><a></code> i <code><em></code>.
|
||||||
title: Descripció del lloc
|
title: Descripció del lloc
|
||||||
|
|
|
@ -129,7 +129,6 @@ de:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Eine öffentliche E-Mail-Adresse angeben
|
email: Eine öffentliche E-Mail-Adresse angeben
|
||||||
label: Kontaktinformationen
|
|
||||||
username: Einen Benutzernamen angeben
|
username: Einen Benutzernamen angeben
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -137,7 +136,6 @@ de:
|
||||||
title: Nachricht über geschlossene Registrierung
|
title: Nachricht über geschlossene Registrierung
|
||||||
open:
|
open:
|
||||||
title: Offene Registrierung
|
title: Offene Registrierung
|
||||||
setting: Einstellung
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Wird als Absatz auf der Frontseite angezeigt und als Meta-Tag benutzt.<br>Du kannst HTML-Tags benutzen, insbesondere <code><a></code> und <code><em></code>.
|
desc_html: Wird als Absatz auf der Frontseite angezeigt und als Meta-Tag benutzt.<br>Du kannst HTML-Tags benutzen, insbesondere <code><a></code> und <code><em></code>.
|
||||||
title: Seitenbeschreibung
|
title: Seitenbeschreibung
|
||||||
|
|
|
@ -168,33 +168,31 @@ en:
|
||||||
view: View
|
view: View
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Enter a public e-mail address
|
email: Business e-mail
|
||||||
label: Contact information
|
username: Contact username
|
||||||
username: Enter a username
|
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
desc_html: Displayed on frontpage when registrations are closed<br>You can use HTML tags
|
desc_html: Displayed on frontpage when registrations are closed. You can use HTML tags
|
||||||
title: Closed registration message
|
title: Closed registration message
|
||||||
|
deletion:
|
||||||
|
desc_html: Allow anyone to delete their account
|
||||||
|
title: Open account deletion
|
||||||
open:
|
open:
|
||||||
desc_html: Allow anyone to create an account
|
desc_html: Allow anyone to create an account
|
||||||
title: Open registration
|
title: Open registration
|
||||||
deletion:
|
site_description:
|
||||||
desc_html: Allow anyone to delete their account
|
desc_html: Introductory paragraph on the frontpage and in meta tags. You can use HTML tags, in particular <code><a></code> and <code><em></code>.
|
||||||
title: Open deletion
|
title: Instance description
|
||||||
|
site_description_extended:
|
||||||
|
desc_html: A good place for your code of conduct, rules, guidelines and other things that set your instance apart. You can use HTML tags
|
||||||
|
title: Custom extended information
|
||||||
|
site_terms:
|
||||||
|
desc_html: You can write your own privacy policy, terms of service or other legalese. You can use HTML tags
|
||||||
|
title: Custom terms of service
|
||||||
|
site_title: Instance name
|
||||||
timeline_preview:
|
timeline_preview:
|
||||||
desc_html: Display public timeline on landing page
|
desc_html: Display public timeline on landing page
|
||||||
title: Timeline preview
|
title: Timeline preview
|
||||||
setting: Setting
|
|
||||||
site_description:
|
|
||||||
desc_html: Displayed as a paragraph on the frontpage and used as a meta tag.<br>You can use HTML tags, in particular <code><a></code> and <code><em></code>.
|
|
||||||
title: Site description
|
|
||||||
site_description_extended:
|
|
||||||
desc_html: Displayed on extended information page<br>You can use HTML tags
|
|
||||||
title: Extended site description
|
|
||||||
site_terms:
|
|
||||||
desc_html: Displayed on terms page<br>You can use HTML tags
|
|
||||||
title: Privacy policy
|
|
||||||
site_title: Site title
|
|
||||||
title: Site Settings
|
title: Site Settings
|
||||||
subscriptions:
|
subscriptions:
|
||||||
callback_url: Callback URL
|
callback_url: Callback URL
|
||||||
|
@ -230,12 +228,12 @@ en:
|
||||||
authorize_follow:
|
authorize_follow:
|
||||||
error: Unfortunately, there was an error looking up the remote account
|
error: Unfortunately, there was an error looking up the remote account
|
||||||
follow: Follow
|
follow: Follow
|
||||||
following: 'Success! You are now following:'
|
|
||||||
follow_request: 'You have sent a follow request to:'
|
follow_request: 'You have sent a follow request to:'
|
||||||
|
following: 'Success! You are now following:'
|
||||||
post_follow:
|
post_follow:
|
||||||
web: Go to web
|
|
||||||
return: Return to the user's profile
|
|
||||||
close: Or, you can just close this window.
|
close: Or, you can just close this window.
|
||||||
|
return: Return to the user's profile
|
||||||
|
web: Go to web
|
||||||
prompt_html: 'You (<strong>%{self}</strong>) have requested to follow:'
|
prompt_html: 'You (<strong>%{self}</strong>) have requested to follow:'
|
||||||
title: Follow %{acct}
|
title: Follow %{acct}
|
||||||
datetime:
|
datetime:
|
||||||
|
|
|
@ -141,7 +141,6 @@ fa:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: یک نشانی ایمیل عمومی وارد کنید
|
email: یک نشانی ایمیل عمومی وارد کنید
|
||||||
label: اطلاعات تماس
|
|
||||||
username: یک نام کاربری وارد کنید
|
username: یک نام کاربری وارد کنید
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -149,7 +148,6 @@ fa:
|
||||||
title: پیغام برای فعالنبودن ثبت نام
|
title: پیغام برای فعالنبودن ثبت نام
|
||||||
open:
|
open:
|
||||||
title: امکان ثبت نام
|
title: امکان ثبت نام
|
||||||
setting: تنظیمات
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: روی صفحهٔ اصلی نمایش مییابد و همچنین به عنوان تگهای HTML.<br>میتوانید HTML بنویسید, بهویژه <code><a></code> و <code><em></code>.
|
desc_html: روی صفحهٔ اصلی نمایش مییابد و همچنین به عنوان تگهای HTML.<br>میتوانید HTML بنویسید, بهویژه <code><a></code> و <code><em></code>.
|
||||||
title: دربارهٔ سایت
|
title: دربارهٔ سایت
|
||||||
|
|
|
@ -155,7 +155,6 @@ fr:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Entrez une adresse courriel publique
|
email: Entrez une adresse courriel publique
|
||||||
label: Informations de contact
|
|
||||||
username: Entrez un nom d’utilisateur⋅ice
|
username: Entrez un nom d’utilisateur⋅ice
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -163,7 +162,6 @@ fr:
|
||||||
title: Message de fermeture des inscriptions
|
title: Message de fermeture des inscriptions
|
||||||
open:
|
open:
|
||||||
title: Inscriptions
|
title: Inscriptions
|
||||||
setting: Paramètre
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Affichée sous la forme d’un paragraphe sur la page d’accueil et utilisée comme balise meta.<br>Vous pouvez utiliser des balises HTML, en particulier <code><a></code> et <code><em></code>.
|
desc_html: Affichée sous la forme d’un paragraphe sur la page d’accueil et utilisée comme balise meta.<br>Vous pouvez utiliser des balises HTML, en particulier <code><a></code> et <code><em></code>.
|
||||||
title: Description du site
|
title: Description du site
|
||||||
|
|
|
@ -149,7 +149,6 @@ he:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: נא להקליד כתובת דוא"ל פומבית
|
email: נא להקליד כתובת דוא"ל פומבית
|
||||||
label: פרטי התקשרות
|
|
||||||
username: נא להכניס שם משתמש
|
username: נא להכניס שם משתמש
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -157,7 +156,6 @@ he:
|
||||||
title: מסר סגירת הרשמות
|
title: מסר סגירת הרשמות
|
||||||
open:
|
open:
|
||||||
title: הרשמה פתוחה
|
title: הרשמה פתוחה
|
||||||
setting: הגדרה
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: מוצג כפסקה על הדף הראשי ומשמש כתגית מטא.<br>ניתן להשתמש בתגיות HTML, ובמיוחד ב־<code><a></code> ו־<code><em></code>.
|
desc_html: מוצג כפסקה על הדף הראשי ומשמש כתגית מטא.<br>ניתן להשתמש בתגיות HTML, ובמיוחד ב־<code><a></code> ו־<code><em></code>.
|
||||||
title: תיאור האתר
|
title: תיאור האתר
|
||||||
|
|
|
@ -140,7 +140,6 @@ id:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Masukkan alamat email
|
email: Masukkan alamat email
|
||||||
label: Informasi kontak
|
|
||||||
username: Masukkan nama pengguna
|
username: Masukkan nama pengguna
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -148,7 +147,6 @@ id:
|
||||||
title: Pesan penutupan pendaftaran
|
title: Pesan penutupan pendaftaran
|
||||||
open:
|
open:
|
||||||
title: Pendaftaran terbuka
|
title: Pendaftaran terbuka
|
||||||
setting: Pengaturan
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Ditampilkan sebagai sebuah paragraf di halaman depan dan digunakan sebagai tag meta.<br>Anda bisa menggunakan tag HTML, khususnya <code><a></code> dan <code><em></code>.
|
desc_html: Ditampilkan sebagai sebuah paragraf di halaman depan dan digunakan sebagai tag meta.<br>Anda bisa menggunakan tag HTML, khususnya <code><a></code> dan <code><em></code>.
|
||||||
title: Deskripsi situs
|
title: Deskripsi situs
|
||||||
|
|
|
@ -128,7 +128,6 @@ io:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Enter a public e-mail address
|
email: Enter a public e-mail address
|
||||||
label: Contact information
|
|
||||||
username: Enter a username
|
username: Enter a username
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -136,7 +135,6 @@ io:
|
||||||
title: Closed registration message
|
title: Closed registration message
|
||||||
open:
|
open:
|
||||||
title: Open registration
|
title: Open registration
|
||||||
setting: Setting
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Displayed as a paragraph on the frontpage and used as a meta tag.<br>You can use HTML tags, in particular <code><a></code> and <code><em></code>.
|
desc_html: Displayed as a paragraph on the frontpage and used as a meta tag.<br>You can use HTML tags, in particular <code><a></code> and <code><em></code>.
|
||||||
title: Site description
|
title: Site description
|
||||||
|
|
|
@ -155,7 +155,6 @@ ja:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: 公開するメールアドレスを入力
|
email: 公開するメールアドレスを入力
|
||||||
label: 連絡先情報
|
|
||||||
username: ユーザー名を入力
|
username: ユーザー名を入力
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -163,7 +162,6 @@ ja:
|
||||||
title: 新規登録停止時のメッセージ
|
title: 新規登録停止時のメッセージ
|
||||||
open:
|
open:
|
||||||
title: 新規登録を受け付ける
|
title: 新規登録を受け付ける
|
||||||
setting: 設定
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: トップページへの表示と meta タグに使用されます。<br>HTMLタグ、特に<code><a></code> と <code><em></code>が利用可能です。
|
desc_html: トップページへの表示と meta タグに使用されます。<br>HTMLタグ、特に<code><a></code> と <code><em></code>が利用可能です。
|
||||||
title: サイトの説明文
|
title: サイトの説明文
|
||||||
|
|
|
@ -155,7 +155,6 @@ ko:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: 공개할 메일 주소를 입력
|
email: 공개할 메일 주소를 입력
|
||||||
label: 연락처 정보
|
|
||||||
username: 아이디를 입력
|
username: 아이디를 입력
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -163,7 +162,6 @@ ko:
|
||||||
title: 신규 등록 정지 시 메시지
|
title: 신규 등록 정지 시 메시지
|
||||||
open:
|
open:
|
||||||
title: 신규 등록을 받음
|
title: 신규 등록을 받음
|
||||||
setting: 설정
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: 탑 페이지와 meta 태그에 사용됩니다.<br>HTML 태그, 예를 들어<code><a></code> 태그와 <code><em></code> 태그를 사용할 수 있습니다.
|
desc_html: 탑 페이지와 meta 태그에 사용됩니다.<br>HTML 태그, 예를 들어<code><a></code> 태그와 <code><em></code> 태그를 사용할 수 있습니다.
|
||||||
title: 사이트 설명
|
title: 사이트 설명
|
||||||
|
|
|
@ -55,7 +55,6 @@ nl:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Vul een openbaar gebruikt e-mailadres in
|
email: Vul een openbaar gebruikt e-mailadres in
|
||||||
label: Contactgegevens
|
|
||||||
username: Vul een gebruikersnaam in
|
username: Vul een gebruikersnaam in
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -63,7 +62,6 @@ nl:
|
||||||
title: Bericht wanneer registratie is uitgeschakeld
|
title: Bericht wanneer registratie is uitgeschakeld
|
||||||
open:
|
open:
|
||||||
title: Open registratie
|
title: Open registratie
|
||||||
setting: Instelling
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Dit wordt als een alinea op de voorpagina getoond en gebruikt als meta-tag in de paginabron.<br>Je kan HTML gebruiken, zoals <code><a></code> en <code><em></code>.
|
desc_html: Dit wordt als een alinea op de voorpagina getoond en gebruikt als meta-tag in de paginabron.<br>Je kan HTML gebruiken, zoals <code><a></code> en <code><em></code>.
|
||||||
title: Omschrijving Mastodon-server
|
title: Omschrijving Mastodon-server
|
||||||
|
|
|
@ -142,7 +142,6 @@
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Skriv en offentlig e-postadresse
|
email: Skriv en offentlig e-postadresse
|
||||||
label: Kontaktinformasjon
|
|
||||||
username: Skriv brukernavn
|
username: Skriv brukernavn
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -150,7 +149,6 @@
|
||||||
title: Melding for lukket registrering
|
title: Melding for lukket registrering
|
||||||
open:
|
open:
|
||||||
title: Åpen registrering
|
title: Åpen registrering
|
||||||
setting: Innstilling
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Vises som et avsnitt på forsiden og brukes som en meta-tagg.<br> Du kan bruke HTML-tagger, spesielt <code><a></code> og <code><em></code>.
|
desc_html: Vises som et avsnitt på forsiden og brukes som en meta-tagg.<br> Du kan bruke HTML-tagger, spesielt <code><a></code> og <code><em></code>.
|
||||||
title: Nettstedsbeskrivelse
|
title: Nettstedsbeskrivelse
|
||||||
|
|
|
@ -149,7 +149,6 @@ oc:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Picatz una adreça de corrièl
|
email: Picatz una adreça de corrièl
|
||||||
label: Informacions de contacte
|
|
||||||
username: Picatz un nom d’utilizaire
|
username: Picatz un nom d’utilizaire
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -157,7 +156,6 @@ oc:
|
||||||
title: Messatge de barradura de las inscripcions
|
title: Messatge de barradura de las inscripcions
|
||||||
open:
|
open:
|
||||||
title: Inscripcions
|
title: Inscripcions
|
||||||
setting: Paramètre
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Afichada jos la forma de paragrafe sus la pagina d’acuèlh e utilizada coma balisa meta.<br> Podètz utilizar de balisas HTML, coma <code><a></code> et <code><em></code>.
|
desc_html: Afichada jos la forma de paragrafe sus la pagina d’acuèlh e utilizada coma balisa meta.<br> Podètz utilizar de balisas HTML, coma <code><a></code> et <code><em></code>.
|
||||||
title: Descripcion del site
|
title: Descripcion del site
|
||||||
|
|
|
@ -155,7 +155,6 @@ pl:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Wprowadź publiczny adres e-mail
|
email: Wprowadź publiczny adres e-mail
|
||||||
label: Informacje kontaktowe
|
|
||||||
username: Wprowadź nazwę użytkownika
|
username: Wprowadź nazwę użytkownika
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -163,7 +162,6 @@ pl:
|
||||||
title: Wiadomość o nieaktywnej rejestracji
|
title: Wiadomość o nieaktywnej rejestracji
|
||||||
open:
|
open:
|
||||||
title: Otwarta rejestracja
|
title: Otwarta rejestracja
|
||||||
setting: Ustawienie
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Wyświetlany jako nagłówek na stronie głównej oraz jako meta tag.<br>Możesz korzystać z tagów HTML, w szczególności z <code><a></code> i <code><em></code>.
|
desc_html: Wyświetlany jako nagłówek na stronie głównej oraz jako meta tag.<br>Możesz korzystać z tagów HTML, w szczególności z <code><a></code> i <code><em></code>.
|
||||||
title: Opis strony
|
title: Opis strony
|
||||||
|
@ -208,12 +206,12 @@ pl:
|
||||||
authorize_follow:
|
authorize_follow:
|
||||||
error: Niestety, podczas sprawdzania zdalnego konta wystąpił błąd
|
error: Niestety, podczas sprawdzania zdalnego konta wystąpił błąd
|
||||||
follow: Śledź
|
follow: Śledź
|
||||||
following: 'Pomyślnie! Od teraz śledzisz:'
|
|
||||||
follow_request: 'Wysłano prośbę o pozwolenie na obserwację:'
|
follow_request: 'Wysłano prośbę o pozwolenie na obserwację:'
|
||||||
|
following: 'Pomyślnie! Od teraz śledzisz:'
|
||||||
post_follow:
|
post_follow:
|
||||||
web: Przejdź do sieci
|
|
||||||
return: Powróć do strony użytkownika
|
|
||||||
close: Ewentualnie, możesz po prostu zamknąć tą stronę.
|
close: Ewentualnie, możesz po prostu zamknąć tą stronę.
|
||||||
|
return: Powróć do strony użytkownika
|
||||||
|
web: Przejdź do sieci
|
||||||
prompt_html: 'Ty (<strong>%{self}</strong>) chcesz śledzić:'
|
prompt_html: 'Ty (<strong>%{self}</strong>) chcesz śledzić:'
|
||||||
title: Śledź %{acct}
|
title: Śledź %{acct}
|
||||||
datetime:
|
datetime:
|
||||||
|
|
|
@ -141,7 +141,6 @@ pt-BR:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Entre um endereço de email público
|
email: Entre um endereço de email público
|
||||||
label: Informação de contato
|
|
||||||
username: Entre com usuário
|
username: Entre com usuário
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -149,7 +148,6 @@ pt-BR:
|
||||||
title: Mensagem de registro fechados
|
title: Mensagem de registro fechados
|
||||||
open:
|
open:
|
||||||
title: Aberto para registro
|
title: Aberto para registro
|
||||||
setting: Preferências
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Mostrar como parágrafo e usado como meta tag.<br/>Vôce pode usar tags HTML, em particular <code><a></code> e <code><em></code>.
|
desc_html: Mostrar como parágrafo e usado como meta tag.<br/>Vôce pode usar tags HTML, em particular <code><a></code> e <code><em></code>.
|
||||||
title: Descrição do site
|
title: Descrição do site
|
||||||
|
|
|
@ -136,7 +136,6 @@ pt:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Inserir um endereço de email para tornar público
|
email: Inserir um endereço de email para tornar público
|
||||||
label: Informação de contacto
|
|
||||||
username: Insira um nome de utilizador
|
username: Insira um nome de utilizador
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -144,7 +143,6 @@ pt:
|
||||||
title: Mensagem de registos encerrados
|
title: Mensagem de registos encerrados
|
||||||
open:
|
open:
|
||||||
title: Aceitar novos registos
|
title: Aceitar novos registos
|
||||||
setting: Preferências
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Mostrar como parágrafo na página inicial e usado como meta tag.<br/>Podes usar tags HTML, em particular <code><a></code> e <code><em></code>.
|
desc_html: Mostrar como parágrafo na página inicial e usado como meta tag.<br/>Podes usar tags HTML, em particular <code><a></code> e <code><em></code>.
|
||||||
title: Descrição do site
|
title: Descrição do site
|
||||||
|
|
|
@ -123,7 +123,6 @@ ru:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Введите публичный e-mail
|
email: Введите публичный e-mail
|
||||||
label: Контактная информация
|
|
||||||
username: Введите имя пользователя
|
username: Введите имя пользователя
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -131,7 +130,6 @@ ru:
|
||||||
title: Сообщение о закрытой регистрации
|
title: Сообщение о закрытой регистрации
|
||||||
open:
|
open:
|
||||||
title: Открыть регистрацию
|
title: Открыть регистрацию
|
||||||
setting: Настройка
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Отображается в качестве параграфа на титульной странице и используется в качестве мета-тега.<br>Можно использовать HTML-теги, в особенности <code><a></code> и <code><em></code>.
|
desc_html: Отображается в качестве параграфа на титульной странице и используется в качестве мета-тега.<br>Можно использовать HTML-теги, в особенности <code><a></code> и <code><em></code>.
|
||||||
title: Описание сайта
|
title: Описание сайта
|
||||||
|
|
|
@ -142,7 +142,6 @@ th:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: กรอกที่อยู่อีเมล์สาธารณะ
|
email: กรอกที่อยู่อีเมล์สาธารณะ
|
||||||
label: ข้อมูลที่ติดต่อ
|
|
||||||
username: กรอกชื่อผู้ใช้
|
username: กรอกชื่อผู้ใช้
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -150,7 +149,6 @@ th:
|
||||||
title: ปิดข้อความลงทะเบียน
|
title: ปิดข้อความลงทะเบียน
|
||||||
open:
|
open:
|
||||||
title: เปิดรับลงทะเบียน
|
title: เปิดรับลงทะเบียน
|
||||||
setting: ตั้งค่า
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Displayed as a paragraph on the frontpage and used as a meta tag.<br> ใช้ HTML tags ได้, in particular <code><a></code> และ <code><em></code>.
|
desc_html: Displayed as a paragraph on the frontpage and used as a meta tag.<br> ใช้ HTML tags ได้, in particular <code><a></code> และ <code><em></code>.
|
||||||
title: คำอธิบายไซต์
|
title: คำอธิบายไซต์
|
||||||
|
|
|
@ -141,7 +141,6 @@ tr:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Herkese açık e-posta adresiniz
|
email: Herkese açık e-posta adresiniz
|
||||||
label: İletişim bilgisi
|
|
||||||
username: Bir kullanıcı adı giriniz
|
username: Bir kullanıcı adı giriniz
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -149,7 +148,6 @@ tr:
|
||||||
title: Kayıt alımları kapatılma mesajı
|
title: Kayıt alımları kapatılma mesajı
|
||||||
open:
|
open:
|
||||||
title: Kayıt alımları
|
title: Kayıt alımları
|
||||||
setting: Ayar adı
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Ana sayfada paragraf olarak görüntülenecek bilgidir.<br>Özellikle <code><a></code> ve <code><em></code> olmak suretiyle HTML etiketlerini kullanabilirsiniz.
|
desc_html: Ana sayfada paragraf olarak görüntülenecek bilgidir.<br>Özellikle <code><a></code> ve <code><em></code> olmak suretiyle HTML etiketlerini kullanabilirsiniz.
|
||||||
title: Site açıklaması
|
title: Site açıklaması
|
||||||
|
|
|
@ -123,7 +123,6 @@ uk:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: Введіть публічний email
|
email: Введіть публічний email
|
||||||
label: Контактна інформація
|
|
||||||
username: Введіть ім'я користувача
|
username: Введіть ім'я користувача
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -131,7 +130,6 @@ uk:
|
||||||
title: Повідомлення про закриту реєстрацію
|
title: Повідомлення про закриту реєстрацію
|
||||||
open:
|
open:
|
||||||
title: Відкрити реєстрацію
|
title: Відкрити реєстрацію
|
||||||
setting: Налаштування
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: Відображається у якості параграфа на титульній сторінці та використовується у якості мета-тега.<br>Можна використовувати HTML-теги, особливо <code><a></code> і <code><em></code>.
|
desc_html: Відображається у якості параграфа на титульній сторінці та використовується у якості мета-тега.<br>Можна використовувати HTML-теги, особливо <code><a></code> і <code><em></code>.
|
||||||
title: Опис сайту
|
title: Опис сайту
|
||||||
|
|
|
@ -148,7 +148,6 @@ zh-CN:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: 输入一个公开的电邮地址
|
email: 输入一个公开的电邮地址
|
||||||
label: 联系数据
|
|
||||||
username: 输入用户名称
|
username: 输入用户名称
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -156,7 +155,6 @@ zh-CN:
|
||||||
title: 暂停注册消息
|
title: 暂停注册消息
|
||||||
open:
|
open:
|
||||||
title: 开放注册
|
title: 开放注册
|
||||||
setting: 设置
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: 在首页显示,及在 meta 标签中用作网站介绍。<br>你可以在此使用 HTML 标签,尤其是<code><a></code> 和 <code><em></code>。
|
desc_html: 在首页显示,及在 meta 标签中用作网站介绍。<br>你可以在此使用 HTML 标签,尤其是<code><a></code> 和 <code><em></code>。
|
||||||
title: 本站介绍
|
title: 本站介绍
|
||||||
|
|
|
@ -141,7 +141,6 @@ zh-HK:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: 輸入一個公開的電郵地址
|
email: 輸入一個公開的電郵地址
|
||||||
label: 聯絡資料
|
|
||||||
username: 輸入用戶名稱
|
username: 輸入用戶名稱
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -149,7 +148,6 @@ zh-HK:
|
||||||
title: 暫停註冊訊息
|
title: 暫停註冊訊息
|
||||||
open:
|
open:
|
||||||
title: 開放註冊
|
title: 開放註冊
|
||||||
setting: 設定
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: 在首頁顯示,及在 meta 標籤使用作網站介紹。<br/> 你可以在此使用 <code><a></code> 和 <code><em></code> 等 HTML 標籤。
|
desc_html: 在首頁顯示,及在 meta 標籤使用作網站介紹。<br/> 你可以在此使用 <code><a></code> 和 <code><em></code> 等 HTML 標籤。
|
||||||
title: 本站介紹
|
title: 本站介紹
|
||||||
|
|
|
@ -102,7 +102,6 @@ zh-TW:
|
||||||
settings:
|
settings:
|
||||||
contact_information:
|
contact_information:
|
||||||
email: 請輸入輸入一個公開電子信箱
|
email: 請輸入輸入一個公開電子信箱
|
||||||
label: 聯絡資訊
|
|
||||||
username: 請輸入使用者名稱
|
username: 請輸入使用者名稱
|
||||||
registrations:
|
registrations:
|
||||||
closed_message:
|
closed_message:
|
||||||
|
@ -110,7 +109,6 @@ zh-TW:
|
||||||
title: 關閉註冊訊息
|
title: 關閉註冊訊息
|
||||||
open:
|
open:
|
||||||
title: 開放註冊
|
title: 開放註冊
|
||||||
setting: 設定
|
|
||||||
site_description:
|
site_description:
|
||||||
desc_html: 顯示在首頁並且作為 meta 標籤的短文。<br>可使用 HTML 標籤,包括 <code><a></code> 及 <code><em></code>。
|
desc_html: 顯示在首頁並且作為 meta 標籤的短文。<br>可使用 HTML 標籤,包括 <code><a></code> 及 <code><em></code>。
|
||||||
title: 網站描述
|
title: 網站描述
|
||||||
|
|
|
@ -31,7 +31,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
|
||||||
it 'cannot create a setting value for a non-admin key' do
|
it 'cannot create a setting value for a non-admin key' do
|
||||||
expect(Setting.new_setting_key).to be_blank
|
expect(Setting.new_setting_key).to be_blank
|
||||||
|
|
||||||
patch :update, params: { new_setting_key: 'New key value' }
|
patch :update, params: { form_admin_settings: { new_setting_key: 'New key value' } }
|
||||||
|
|
||||||
expect(response).to redirect_to(edit_admin_settings_path)
|
expect(response).to redirect_to(edit_admin_settings_path)
|
||||||
expect(Setting.new_setting_key).to be_nil
|
expect(Setting.new_setting_key).to be_nil
|
||||||
|
@ -40,7 +40,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
|
||||||
it 'creates a settings value that didnt exist before for eligible key' do
|
it 'creates a settings value that didnt exist before for eligible key' do
|
||||||
expect(Setting.site_extended_description).to be_blank
|
expect(Setting.site_extended_description).to be_blank
|
||||||
|
|
||||||
patch :update, params: { site_extended_description: 'New key value' }
|
patch :update, params: { form_admin_settings: { site_extended_description: 'New key value' } }
|
||||||
|
|
||||||
expect(response).to redirect_to(edit_admin_settings_path)
|
expect(response).to redirect_to(edit_admin_settings_path)
|
||||||
expect(Setting.site_extended_description).to eq 'New key value'
|
expect(Setting.site_extended_description).to eq 'New key value'
|
||||||
|
@ -56,7 +56,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
|
||||||
|
|
||||||
it 'updates a settings value' do
|
it 'updates a settings value' do
|
||||||
Setting.site_title = 'Original'
|
Setting.site_title = 'Original'
|
||||||
patch :update, params: { site_title: 'New title' }
|
patch :update, params: { form_admin_settings: { site_title: 'New title' } }
|
||||||
|
|
||||||
expect(response).to redirect_to(edit_admin_settings_path)
|
expect(response).to redirect_to(edit_admin_settings_path)
|
||||||
expect(Setting.site_title).to eq 'New title'
|
expect(Setting.site_title).to eq 'New title'
|
||||||
|
@ -72,7 +72,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
|
||||||
|
|
||||||
it 'typecasts open_registrations to boolean' do
|
it 'typecasts open_registrations to boolean' do
|
||||||
Setting.open_registrations = false
|
Setting.open_registrations = false
|
||||||
patch :update, params: { open_registrations: 'true' }
|
patch :update, params: { form_admin_settings: { open_registrations: '1' } }
|
||||||
|
|
||||||
expect(response).to redirect_to(edit_admin_settings_path)
|
expect(response).to redirect_to(edit_admin_settings_path)
|
||||||
expect(Setting.open_registrations).to eq true
|
expect(Setting.open_registrations).to eq true
|
||||||
|
|
Loading…
Reference in a new issue