diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-02-25 09:13:18 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-02-27 16:34:56 +0100 |
commit | 52034a213c3181fb06ed9e161911e6b889c5354e (patch) | |
tree | a3898b8a83dfd2f68310b3964c2fc5e905c63e57 /server | |
parent | f041aebb79ac063a86d5a48526addeb8988b8a80 (diff) | |
download | sonarqube-52034a213c3181fb06ed9e161911e6b889c5354e.tar.gz sonarqube-52034a213c3181fb06ed9e161911e6b889c5354e.zip |
add new user type property settings - server side - SONAR-6155
Diffstat (limited to 'server')
3 files changed, 9 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/properties_helper.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/properties_helper.rb index 34fd3326d7e..0ecc980b77d 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/properties_helper.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/properties_helper.rb @@ -104,6 +104,9 @@ module PropertiesHelper end select_tag name, select_options, html_options + when PropertyType::TYPE_USER_LOGIN + text_field_tag name, value, {:size => options[:size] || 50}.update(html_options) + else hidden_field_tag id, html_options end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/models/property_type.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/models/property_type.rb index 332096471b3..9c890604ca5 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/models/property_type.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/models/property_type.rb @@ -32,6 +32,7 @@ class PropertyType TYPE_FILTER = 'FILTER' # Since 3.7 TYPE_ISSUE_FILTER = 'ISSUE_FILTER' + TYPE_USER_LOGIN = 'USER_LOGIN' def self.text_to_value(text, type) case type diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_type_USER_LOGIN.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_type_USER_LOGIN.html.erb new file mode 100644 index 00000000000..430dc5464c9 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_type_USER_LOGIN.html.erb @@ -0,0 +1,5 @@ +<% + options = {:id => id} + options[:size] = (defined? size) ? size : nil +%> +<%= property_input_field(name, PropertyType::TYPE_USER_LOGIN, value, PropertiesHelper::SCREEN_SETTINGS, options) %>
\ No newline at end of file |