diff --git a/app/i18n/cz/admin.php b/app/i18n/cz/admin.php index 7387b466f..0fdc4ea32 100644 --- a/app/i18n/cz/admin.php +++ b/app/i18n/cz/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Maximální počet kategorií na uživatele', 'max-feeds' => 'Maximální počet kanálů na uživatele', 'registration' => array( - 'help' => '0 znamená žádná omezení účtu', 'number' => 'Maximální počet účtů', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/de/admin.php b/app/i18n/de/admin.php index 6f8164575..717b77cc2 100644 --- a/app/i18n/de/admin.php +++ b/app/i18n/de/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Anzahl erlaubter Kategorien pro Benutzer', 'max-feeds' => 'Anzahl erlaubter Feeds pro Benutzer', 'registration' => array( - 'help' => '0 heißt, dass es kein Account Limit gibt', 'number' => 'Maximale Anzahl von Accounts', + 'select' => array( + 'label' => 'Registrierungsformular', + 'option' => array( + 'noform' => 'Deaktiviert: Keine Registrierung möglich', + 'nolimit' => 'Aktiviert: Registrierung möglich', + 'setaccountsnumber' => 'Anzahl maximaler Benutzer-Acounts festlegen', + ), + ), + 'status' => array( + 'disabled' => 'Formular deaktiviert', + 'enabled' => 'Formular aktiviert', + ), + 'title' => 'Benutzer-Registrierungsformular', ), ), 'update' => array( diff --git a/app/i18n/en-us/admin.php b/app/i18n/en-us/admin.php index 481e5a714..471c2cf24 100644 --- a/app/i18n/en-us/admin.php +++ b/app/i18n/en-us/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Max number of categories per user', // IGNORE 'max-feeds' => 'Max number of feeds per user', // IGNORE 'registration' => array( - 'help' => '0 means that there is no account limit', // IGNORE 'number' => 'Max number of accounts', // IGNORE + 'select' => array( + 'label' => 'Registration form', // IGNORE + 'option' => array( + 'noform' => 'Disabled: No registration form', // IGNORE + 'nolimit' => 'Enabled: No limit of accounts', // IGNORE + 'setaccountsnumber' => 'Set max. number of accounts', // IGNORE + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // IGNORE + 'enabled' => 'Form enabled', // IGNORE + ), + 'title' => 'User registration form', // IGNORE ), ), 'update' => array( diff --git a/app/i18n/en/admin.php b/app/i18n/en/admin.php index 3541b434a..4746d971f 100644 --- a/app/i18n/en/admin.php +++ b/app/i18n/en/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Max number of categories per user', 'max-feeds' => 'Max number of feeds per user', 'registration' => array( - 'help' => '0 means that there is no account limit', 'number' => 'Max number of accounts', + 'select' => array( + 'label' => 'Registration form', + 'option' => array( + 'noform' => 'Disabled: No registration form', + 'nolimit' => 'Enabled: No limit of accounts', + 'setaccountsnumber' => 'Set max. number of accounts', + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', + 'enabled' => 'Form enabled', + ), + 'title' => 'User registration form', ), ), 'update' => array( diff --git a/app/i18n/es/admin.php b/app/i18n/es/admin.php index 1ad98e565..3e2441658 100755 --- a/app/i18n/es/admin.php +++ b/app/i18n/es/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Límite de categorías por usuario', 'max-feeds' => 'Límite de fuentes por usuario', 'registration' => array( - 'help' => '0 significa que no hay límite en la cuenta', 'number' => 'Número máximo de cuentas', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/fr/admin.php b/app/i18n/fr/admin.php index 3789453e0..706fa984d 100644 --- a/app/i18n/fr/admin.php +++ b/app/i18n/fr/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Limite de catégories par utilisateur', 'max-feeds' => 'Limite de flux par utilisateur', 'registration' => array( - 'help' => 'Un chiffre de 0 signifie que l’on peut créer un nombre infini de comptes', 'number' => 'Nombre max de comptes', + 'select' => array( + 'label' => 'Formulaire d’inscription', + 'option' => array( + 'noform' => 'Désactivé : Pas de formulaire d’inscription', + 'nolimit' => 'Activé : Pas de limite au nombre d’utilisateurs', + 'setaccountsnumber' => 'Nombre d’utilisateurs limités', + ), + ), + 'status' => array( + 'disabled' => 'Formulaire désactivé', + 'enabled' => 'Formulaire activé', + ), + 'title' => 'Formulaire d’inscription utilisateur', ), ), 'update' => array( diff --git a/app/i18n/he/admin.php b/app/i18n/he/admin.php index dc891a925..982712af4 100644 --- a/app/i18n/he/admin.php +++ b/app/i18n/he/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Max number of categories per user', // TODO 'max-feeds' => 'Max number of feeds per user', // TODO 'registration' => array( - 'help' => '0 means that there is no account limit', // TODO 'number' => 'Max number of accounts', // TODO + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/it/admin.php b/app/i18n/it/admin.php index b0bad8fc2..420f3c096 100644 --- a/app/i18n/it/admin.php +++ b/app/i18n/it/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Limite categorie per utente', 'max-feeds' => 'Limite feeds per utente', 'registration' => array( - 'help' => '0 significa che non esiste limite sui profili', 'number' => 'Numero massimo di profili', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/ja/admin.php b/app/i18n/ja/admin.php index f135304e2..6eea35956 100644 --- a/app/i18n/ja/admin.php +++ b/app/i18n/ja/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => '1ユーザーごとのカテゴリの最大値', 'max-feeds' => '1ユーザーごとのフィードの最大値', 'registration' => array( - 'help' => '0 はアカウントの上限がないことを意味しています', 'number' => 'アカウントの最大値', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/ko/admin.php b/app/i18n/ko/admin.php index 4a04f6fce..50e17294a 100644 --- a/app/i18n/ko/admin.php +++ b/app/i18n/ko/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => '사용자별 카테고리 개수 제한', 'max-feeds' => '사용자별 피드 개수 제한', 'registration' => array( - 'help' => '0: 제한 없음', 'number' => '계정 최대 개수', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/nl/admin.php b/app/i18n/nl/admin.php index c5eca9a78..f52e33a53 100644 --- a/app/i18n/nl/admin.php +++ b/app/i18n/nl/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Categorielimiet per gebruiker', 'max-feeds' => 'Feedlimiet per gebruiker', 'registration' => array( - 'help' => '0 betekent geen account limiet', 'number' => 'Maximum aantal accounts', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/oc/admin.php b/app/i18n/oc/admin.php index 205b97923..0291bcc89 100644 --- a/app/i18n/oc/admin.php +++ b/app/i18n/oc/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Limita de categoria per utilizaire', 'max-feeds' => 'Limita de fluxes per utilizaire', 'registration' => array( - 'help' => '0 vòl dire qu’i a pas cap de limita de compte', 'number' => 'Nombre max de comptes', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/pl/admin.php b/app/i18n/pl/admin.php index f7fac8c9e..6465299fb 100644 --- a/app/i18n/pl/admin.php +++ b/app/i18n/pl/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Maksymalna liczba kategorii na użytkownika', 'max-feeds' => 'Maksymalna liczba kanałów na użytkownika', 'registration' => array( - 'help' => '0 oznacza brak limitu liczby kont', 'number' => 'Maksymalna liczba kont', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/pt-br/admin.php b/app/i18n/pt-br/admin.php index 30026ee0a..c8b4241c5 100644 --- a/app/i18n/pt-br/admin.php +++ b/app/i18n/pt-br/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Limite de categorias por usuário', 'max-feeds' => 'Limite de Feeds por usuário', 'registration' => array( - 'help' => '0 significa que não há limite para a conta', 'number' => 'Máximo número de contas', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/ru/admin.php b/app/i18n/ru/admin.php index a3b08e99e..c8e72d024 100644 --- a/app/i18n/ru/admin.php +++ b/app/i18n/ru/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Максимальное количество категорий на пользователя', 'max-feeds' => 'Максимальное количество лент на пользователя', 'registration' => array( - 'help' => '0 означает неограниченное количество пользователей', 'number' => 'Максимальное количество пользователей', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/sk/admin.php b/app/i18n/sk/admin.php index 18cbe280a..b4ea200f5 100644 --- a/app/i18n/sk/admin.php +++ b/app/i18n/sk/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Limit počtu kategórií pre používateľa', 'max-feeds' => 'Limit počtu kanálov pre používateľov', 'registration' => array( - 'help' => '0 znamená žiadny limit počtu účtov', 'number' => 'Maximálny počt účtov', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/tr/admin.php b/app/i18n/tr/admin.php index 5c50d87ac..8790bfedf 100644 --- a/app/i18n/tr/admin.php +++ b/app/i18n/tr/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => 'Kullanıcı başına kategori limiti', 'max-feeds' => 'Kullanıcı başına akış limiti', 'registration' => array( - 'help' => '0 sınır yok anlamındadır', 'number' => 'En fazla hesap sayısı', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/i18n/zh-cn/admin.php b/app/i18n/zh-cn/admin.php index 84dff103d..fbd8cc867 100644 --- a/app/i18n/zh-cn/admin.php +++ b/app/i18n/zh-cn/admin.php @@ -168,8 +168,20 @@ return array( 'max-categories' => '各用户分类数限制', 'max-feeds' => '各用户订阅源数限制', 'registration' => array( - 'help' => '0 表示无用户数限制', 'number' => '最大用户数', + 'select' => array( + 'label' => 'Registration form', // TODO + 'option' => array( + 'noform' => 'Disabled: No registration form', // TODO + 'nolimit' => 'Enabled: No limit of accounts', // TODO + 'setaccountsnumber' => 'Set max. number of accounts', // TODO + ), + ), + 'status' => array( + 'disabled' => 'Form disabled', // TODO + 'enabled' => 'Form enabled', // TODO + ), + 'title' => 'User registration form', // TODO ), ), 'update' => array( diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml index 7f355d156..6f094e06b 100644 --- a/app/views/configure/system.phtml +++ b/app/views/configure/system.phtml @@ -29,40 +29,6 @@ -
- -
- -

-
-
- -
-
- 1 ? _t('admin.user.numbers', $number) : _t('admin.user.number', $number)); - ?> -
-
- -
-
- -
-
-
@@ -88,6 +54,51 @@
+ + +
+ +
+ +
+
+ +
+ +
+ + + (= )(= ) +
+
+ +
+
+ 1 ? _t('admin.user.numbers', $number) : _t('admin.user.number', $number)); ?> +
+
+ +
+
+ +
+
+
@@ -96,3 +107,5 @@
+ + diff --git a/p/scripts/config.js b/p/scripts/config.js new file mode 100644 index 000000000..e3a85df15 --- /dev/null +++ b/p/scripts/config.js @@ -0,0 +1,56 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 +'use strict'; + +function init_selectInputChanger() { + const select = document.getElementsByClassName('select-input-changer'); + + for (let i = 0; i < select.length; i++) { + select[i].addEventListener('change', updateSelectInput); + select[i].dispatchEvent(new Event('change', { + bubbles: true, + cancelable: true, + })); + } +} + +function updateSelectInput(ev) { + const elem = ev.target; + const formGroup = document.getElementById(elem.dataset.name + '-block'); + const input = document.getElementById(elem.dataset.name + '-input'); + if (elem.selectedOptions[0].dataset.inputVisible == 'false') { + formGroup.style.display = 'none'; + input.name = ''; + elem.name = elem.dataset.name; + } else { + formGroup.style.display = ''; + input.name = elem.dataset.name; + elem.name = ''; + } +} + +function init_maxNumbersOfAccountsStatus() { + const input = document.getElementById('max-registrations-input'); + if (input) { + input.addEventListener('change', onchange_maxNumbersOfAccounts); + input.dispatchEvent(new Event('change', { + bubbles: true, + cancelable: true, + })); + } +} + +function onchange_maxNumbersOfAccounts(ev) { + const elem = ev.target; + if (elem.value > elem.dataset.number) { + document.getElementById('max-registrations-status-disabled').style.display = 'none'; + document.getElementById('max-registrations-status-enabled').style.display = ''; + } else { + document.getElementById('max-registrations-status-disabled').style.display = ''; + document.getElementById('max-registrations-status-enabled').style.display = 'none'; + } +} + +init_selectInputChanger(); +init_maxNumbersOfAccountsStatus(); + +// @license-end