From 01e09b0b05a92bf1a95e09118d05259a4c70a7c4 Mon Sep 17 00:00:00 2001 From: Mary Umoh Date: Tue, 11 Jul 2017 18:17:38 -0400 Subject: [PATCH] Bug 1371446 - Don't allow needinfo requests from the void --- extensions/BugModal/web/bug_modal.css | 4 ++++ .../Needinfo/template/en/default/bug/needinfo.html.tmpl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/extensions/BugModal/web/bug_modal.css b/extensions/BugModal/web/bug_modal.css index 666ee3f0d..9071c3d50 100644 --- a/extensions/BugModal/web/bug_modal.css +++ b/extensions/BugModal/web/bug_modal.css @@ -88,6 +88,10 @@ select[multiple], .text_input, .yui-ac-input, input { box-shadow: 0 0 2px 2px #f88; } +input:invalid { + box-shadow: 0 0 2px 2px #f88 !important; +} + a.activity-ref { color: #000; } diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl index 75ec90b89..46083e108 100644 --- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl +++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl @@ -102,8 +102,12 @@ $(function() { function new_needinfo_changed(event) { if ($('#needinfo').is(':checked') && $('#needinfo_role').val() === 'other') { + $('#needinfo_from').prop('required', true); $('#needinfo_from').focus().select(); } + else { + $('#needinfo_from').prop('required', false); + } } function existing_needinfo_changed(event) { -- 2.47.3