diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /app/views/shared/snippets/_form.html.haml | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
Diffstat (limited to 'app/views/shared/snippets/_form.html.haml')
-rw-r--r-- | app/views/shared/snippets/_form.html.haml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/views/shared/snippets/_form.html.haml b/app/views/shared/snippets/_form.html.haml index 198735df5ee..c325e8d4a16 100644 --- a/app/views/shared/snippets/_form.html.haml +++ b/app/views/shared/snippets/_form.html.haml @@ -10,7 +10,7 @@ .form-group = f.label :title, class: 'label-bold' - = f.text_field :title, class: 'form-control', required: true, autofocus: true, data: { qa_selector: 'snippet_title_field' } + = f.text_field :title, class: 'form-control', required: true, autofocus: true .form-group.js-description-input - description_placeholder = s_('Snippets|Optionally add a description about what your snippet does or how to use it...') @@ -18,17 +18,17 @@ = f.label :description, s_("Snippets|Description (optional)"), class: 'label-bold' .js-collapsible-input .js-collapsed{ class: ('d-none' if is_expanded) } - = text_field_tag nil, nil, class: 'form-control', placeholder: description_placeholder, data: { qa_selector: 'description_placeholder' } + = text_field_tag nil, nil, class: 'form-control', placeholder: description_placeholder .js-expanded{ class: ('d-none' if !is_expanded) } = render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do - = render 'shared/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: description_placeholder, qa_selector: 'snippet_description_field' + = render 'shared/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: description_placeholder = render 'shared/notes/hints' .form-group.file-editor = f.label :file_name, s_('Snippets|File') .file-holder.snippet .js-file-title.file-title-flex-parent - = f.text_field :file_name, placeholder: s_("Snippets|Give your file a name to add code highlighting, e.g. example.rb for Ruby"), class: 'form-control js-snippet-file-name', data: { qa_selector: 'file_name_field' } + = f.text_field :file_name, placeholder: s_("Snippets|Give your file a name to add code highlighting, e.g. example.rb for Ruby"), class: 'form-control js-snippet-file-name' .file-content.code #editor{ data: { 'editor-loading': true } }< %pre.editor-loading-content= @snippet.content @@ -46,11 +46,11 @@ .form-actions - if @snippet.new_record? - = f.submit 'Create snippet', class: "btn-success btn", data: { qa_selector: 'submit_button' } + = f.submit 'Create snippet', class: "btn-success btn gl-button" - else - = f.submit 'Save changes', class: "btn-success btn", data: { qa_selector: 'submit_button' } + = f.submit 'Save changes', class: "btn-success btn gl-button" - if @snippet.project_id - = link_to "Cancel", project_snippets_path(@project), class: "btn btn-cancel" + = link_to "Cancel", project_snippets_path(@project), class: "btn gl-button btn-default" - else - = link_to "Cancel", snippets_path(@project), class: "btn btn-cancel" + = link_to "Cancel", snippets_path(@project), class: "btn gl-button btn-default" |