Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Bugzilla/Test/Selenium.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ END;
aria-required="true" aria-invalid="false" aria-errormessage="field-[% name FILTER html %]-error"
[% END %]
[% error_message = BLOCK %]
<div id="field-[% name FILTER html %]-error" class="input-error bz_default_hidden" aria-live="assertive">
<div id="field-[% name FILTER html %]-error" class="error-message bz_default_hidden" aria-live="assertive">
[% IF field_type == constants.FIELD_TYPE_SINGLE_SELECT %]
You must select a
[% ELSIF field_type == constants.FIELD_TYPE_MULTI_SELECT %]
Expand Down
16 changes: 0 additions & 16 deletions extensions/BugModal/web/bug_modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 1 addition & 7 deletions extensions/BugModal/web/bug_modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 3 additions & 5 deletions extensions/BugModal/web/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -133,7 +133,7 @@ window.addEventListener('DOMContentLoaded', () => {
},
{
key: 'update_token',
label: '',
label: 'Action',
formatter: Bugzilla.DupTable.formatCcButton,
allowHTML: true,
sortable: false,
Expand Down Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %]
Loading