From a2db04b4f59e9c67b53a8790e6a135639f8bf3ef Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 22 Jun 2020 15:02:11 -0400 Subject: [PATCH] leave a low-priority note to make categories a required field for support tickets in the future --- www/support/ui.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/www/support/ui.js b/www/support/ui.js index 454dddcfc..0519530da 100644 --- a/www/support/ui.js +++ b/www/support/ui.js @@ -66,11 +66,20 @@ define([ var $cat = $form.find('.cp-support-form-category'); var $title = $form.find('.cp-support-form-title'); var $content = $form.find('.cp-support-form-msg'); - // XXX block submission until pending uploads are complete? + // TODO block submission until pending uploads are complete? var $attachments = $form.find('.cp-support-attachments'); + var category = $cat.val().trim(); + /* + // || ($form.closest('.cp-support-list-ticket').data('cat') || "").trim(); + // Messages.support_formCategoryError = "Error: category is empty"; // TODO ensure this is translated before use + + if (!category) { + console.log($cat); + return void UI.alert(Messages.support_formCategoryError); + } + */ - var category = $cat.val().trim(); // XXX make category a required field? var title = $title.val().trim(); if (!title) { return void UI.alert(Messages.support_formTitleError);