leave a low-priority note to make categories a required field for support tickets in the future

pull/1/head
ansuz 4 years ago
parent d373b9c290
commit a2db04b4f5

@ -66,11 +66,20 @@ define([
var $cat = $form.find('.cp-support-form-category'); var $cat = $form.find('.cp-support-form-category');
var $title = $form.find('.cp-support-form-title'); var $title = $form.find('.cp-support-form-title');
var $content = $form.find('.cp-support-form-msg'); 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 $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(); var title = $title.val().trim();
if (!title) { if (!title) {
return void UI.alert(Messages.support_formTitleError); return void UI.alert(Messages.support_formTitleError);

Loading…
Cancel
Save