diff options
-rw-r--r-- | server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee index 810f4ccfd89..4728cb45e5b 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee @@ -68,7 +68,11 @@ define [ postData.prevent_reactivation = true params = @ui.customRuleCreationParameters.map(-> - key: jQuery(@).prop('name'), value: jQuery(@).val() || jQuery(@).prop('placeholder') || '').get() + node = jQuery(@) + value = node.val() + if !value and action == 'create' + value = node.prop('placeholder') || '' + key: node.prop('name'), value: value).get() postData.params = (params.map (param) -> param.key + '=' + param.value).join(';') @sendRequest(action, postData) |