Commit b824b9ac authored by Stanislav Lashmanov's avatar Stanislav Lashmanov

Fix duplicate draft help text

Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/348824

Changelog: fixed
parent 37856ef5
...@@ -77,6 +77,7 @@ export default class IssuableForm { ...@@ -77,6 +77,7 @@ export default class IssuableForm {
this.initAutosave(); this.initAutosave();
this.form.on('submit', this.handleSubmit); this.form.on('submit', this.handleSubmit);
this.form.on('click', '.btn-cancel', this.resetAutosave); this.form.on('click', '.btn-cancel', this.resetAutosave);
this.form.find('.js-unwrap-on-load').unwrap();
this.initWip(); this.initWip();
const $issuableDueDate = $('#issuable-due-date'); const $issuableDueDate = $('#issuable-due-date');
......
...@@ -150,6 +150,10 @@ label { ...@@ -150,6 +150,10 @@ label {
margin-bottom: 0; margin-bottom: 0;
margin-top: #{$grid-size / 2}; margin-top: #{$grid-size / 2};
font-size: $gl-font-size; font-size: $gl-font-size;
.invisible {
visibility: hidden;
}
} }
.gl-field-error, .gl-field-error,
......
...@@ -14,13 +14,15 @@ ...@@ -14,13 +14,15 @@
- if issuable.respond_to?(:work_in_progress?) - if issuable.respond_to?(:work_in_progress?)
.form-text.text-muted .form-text.text-muted
.js-wip-explanation .js-wip-explanation{ style: "display: none;" }
= remove_wip_text = remove_wip_text
.js-no-wip-explanation .js-no-wip-explanation
- if has_wip_commits - if has_wip_commits
= _('It looks like you have some draft commits in this branch.') = _('It looks like you have some draft commits in this branch.')
%br %br
= add_wip_text .invisible
.js-unwrap-on-load
= add_wip_text
- if no_issuable_templates && can?(current_user, :push_code, issuable.project) - if no_issuable_templates && can?(current_user, :push_code, issuable.project)
= render 'shared/issuable/form/default_templates' = render 'shared/issuable/form/default_templates'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment