diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-09 09:34:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-09 09:34:24 +0000 |
commit | c2c526c822e29484ba404b9ce3ffe2accfc40b25 (patch) | |
tree | a23145f9cefa73bb719098619f7647f2e927210b /app/views/settings | |
parent | 0c90a19eb22b81da4cd32ea6da263b220a2dfbd0 (diff) | |
download | redmine-c2c526c822e29484ba404b9ce3ffe2accfc40b25.tar.gz redmine-c2c526c822e29484ba404b9ce3ffe2accfc40b25.zip |
Introduce setting to hide optional user custom fields on registration form (#24089).
Patch by Jan Schulz-Hofen.
git-svn-id: http://svn.redmine.org/redmine/trunk@16537 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/settings')
-rw-r--r-- | app/views/settings/_authentication.html.erb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/settings/_authentication.html.erb b/app/views/settings/_authentication.html.erb index fd3c65c28..4454bbae4 100644 --- a/app/views/settings/_authentication.html.erb +++ b/app/views/settings/_authentication.html.erb @@ -8,7 +8,12 @@ <p><%= setting_select :self_registration, [[l(:label_disabled), "0"], [l(:label_registration_activation_by_email), "1"], [l(:label_registration_manual_activation), "2"], - [l(:label_registration_automatic_activation), "3"]] %></p> + [l(:label_registration_automatic_activation), "3"]], + :onchange => + "if (this.value != '0') { $('#settings_show_custom_fields_on_registration').removeAttr('disabled'); } else { $('#settings_show_custom_fields_on_registration').attr('disabled', true); }" %></p> + +<p><%= setting_check_box :show_custom_fields_on_registration, + :disabled => !Setting.self_registration? %></p> <p><%= setting_check_box :unsubscribe %></p> |