diff --git a/Bugzilla/Test/Selenium.pm b/Bugzilla/Test/Selenium.pm index 4135ef06f2..31f5130dd9 100644 --- a/Bugzilla/Test/Selenium.pm +++ b/Bugzilla/Test/Selenium.pm @@ -426,6 +426,8 @@ sub is_editable_ok { sub attach_file { my ($self, $locator, $filename) = @_; my $path = Mojo::File->new($filename); + # Click the Enter Text button to show the textarea for attachment data + $self->click_ok('att-enter-button'); $self->type_ok('att-textarea', $path->slurp, 'Add attachment data'); } diff --git a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl index 0daebc5d93..823aa48285 100644 --- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl @@ -152,7 +152,7 @@ END; aria-required="true" aria-invalid="false" aria-errormessage="field-[% name FILTER html %]-error" [% END %] [% error_message = BLOCK %] -
+
[% IF field_type == constants.FIELD_TYPE_SINGLE_SELECT %] You must select a [% ELSIF field_type == constants.FIELD_TYPE_MULTI_SELECT %] diff --git a/extensions/BugModal/web/bug_modal.css b/extensions/BugModal/web/bug_modal.css index 66f4dc0ec4..732f27e1e5 100644 --- a/extensions/BugModal/web/bug_modal.css +++ b/extensions/BugModal/web/bug_modal.css @@ -66,22 +66,6 @@ color: var(--control-foreground-color); } -[aria-invalid="true"], -input:invalid, -.attention { - border-color: var(--invalid-control-border-color) !important; -} - -.input-error { - margin: 2px 4px; - color: var(--error-message-foreground-color); - font-size: var(--font-size-small); -} - -.input-error.hidden { - display: none !important; -} - a.activity-ref { color: inherit; } diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js index bdc0416846..b8cdd8cf33 100644 --- a/extensions/BugModal/web/bug_modal.js +++ b/extensions/BugModal/web/bug_modal.js @@ -757,13 +757,7 @@ $(function() { .map(($input) => { let invalid = false; - if ($input.id === 'att-data') { - invalid = !$input.value.trim() - && !document.querySelector('#att-textarea').value.trim() - && !document.querySelector('#att-file').files.length; - document.querySelector('#att-dropbox')?.classList - .toggle('attention', invalid); - } else if ($input.type === 'text') { + if ($input.type === 'text') { invalid = !$input.value.trim(); } else if ($input.type === 'select-one') { invalid = $input.selectedIndex === -1; diff --git a/extensions/BugModal/web/create.js b/extensions/BugModal/web/create.js index 2a664cb86b..0c412f1a7a 100644 --- a/extensions/BugModal/web/create.js +++ b/extensions/BugModal/web/create.js @@ -103,7 +103,7 @@ window.addEventListener('DOMContentLoaded', () => { window.status_comment_required = statusCommentRequired; // attachment.js - bz_attachment_form.update_requirements(false); + bzAttachmentForm.updateRequirements(false); // bug_modal.js initKeywordsAutocomplete(keywords); @@ -133,7 +133,7 @@ window.addEventListener('DOMContentLoaded', () => { }, { key: 'update_token', - label: '', + label: 'Action', formatter: Bugzilla.DupTable.formatCcButton, allowHTML: true, sortable: false, @@ -283,9 +283,7 @@ window.addEventListener('DOMContentLoaded', () => { const $attachFileActionOuter = document.querySelector('#attach-file-action-outer'); const updatedRequiredFields = (required) => { - $attachFileContentOuter.querySelectorAll('[aria-required]').forEach(($input) => { - $input.setAttribute('aria-required', required); - }); + bzAttachmentForm.updateRequirements(required); }; $attachNewFile.addEventListener('click', () => { diff --git a/extensions/GuidedBugEntry/template/en/default/bug/create/comment-guided.txt.tmpl b/extensions/GuidedBugEntry/template/en/default/bug/create/comment-guided.txt.tmpl index 8485dbf6e5..17ac63d363 100644 --- a/extensions/GuidedBugEntry/template/en/default/bug/create/comment-guided.txt.tmpl +++ b/extensions/GuidedBugEntry/template/en/default/bug/create/comment-guided.txt.tmpl @@ -8,21 +8,19 @@ Firefox for Android [% END %] [% IF cgi.param('bug_steps') %] -Steps to reproduce: +### Steps to reproduce [%+ cgi.param('bug_steps') %] [% END %] [% IF cgi.param('actual') %] - -Actual results: +### Actual results [%+ cgi.param('actual') %] [% END %] [% IF cgi.param('expected') %] - -Expected results: +### Expected results [%+ cgi.param('expected') %] [% END %] diff --git a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl index 3a640ea1a0..13528a0f1d 100644 --- a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl +++ b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl @@ -11,108 +11,109 @@ [% js_urls = [ 'extensions/GuidedBugEntry/web/js/products.js', 'extensions/GuidedBugEntry/web/js/guided.js', 'extensions/ProdCompSearch/web/js/prod_comp_search.js', - 'js/field.js', 'js/TUI.js', 'js/data-table.js', 'js/bug.js' ] %] + 'js/field.js', 'js/TUI.js', 'js/data-table.js', 'js/bug.js', + 'js/attachment.js' ] %] [% PROCESS global/header.html.tmpl - title = "Enter A Bug" + title = "Enter " _ terms.Bug generate_api_token = 1 + responsive = 1 + use_text_editor = 1 javascript_urls = js_urls - style_urls = [ + style_urls = [ 'extensions/GuidedBugEntry/web/style/guided.css', - 'skins/standard/index.css' + 'skins/standard/index.css', + 'skins/standard/attachment.css', ] %] - - - - - -
-[% INCLUDE webdev_step %] -[% INCLUDE product_step %] -[% INCLUDE otherProducts_step %] -[% INCLUDE dupes_step %] -[% INCLUDE bugForm_step %] -
+[% + dupe_labels = { + id => field_descs.bug_id, + summary => field_descs.short_desc, + component => field_descs.component, + status => field_descs.bug_status + }; +%] -
- - Switch to the standard [% terms.bug %] entry form +
+ + +
- - -[% PROCESS global/footer.html.tmpl %] -[%############################################################################%] -[%# page title #%] -[%############################################################################%] - -[% BLOCK page_title %] -
-

Enter A [% terms.Bug %]

-
-[% END %] +[% PROCESS global/footer.html.tmpl %] [%############################################################################%] -[%# webdev step #%] +[%# webdev step #%] [%############################################################################%] [% BLOCK webdev_step %] -