Просмотр исходного кода

Support other as answer, without further details.

Paulo Reis 10 лет назад
Родитель
Сommit
24614effc4
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      services/web/public/coffee/services/log-hints-feedback.coffee

+ 5 - 0
services/web/public/coffee/services/log-hints-feedback.coffee

@@ -23,6 +23,11 @@ define [
 			formData.append "Field#{ reasonOtherFieldAPIId }", feedbackOtherVal
 			formData.append "idstamp", idStampVal
 
+			# Allow user to specify "other" without any extra details; an empty string 
+			# would trigger an error submitting.
+			if feedbackOpt == feedbackOpts.OTHER and feedbackOtherVal == ""
+				formData.set "Field#{ reasonOtherFieldAPIId }", "#{ feedbackOpts.OTHER } empty"
+
 			req =
 				method: 'POST'
 				url: submitEndpoint