Commit 53bf57f3 authored by Clement Ho's avatar Clement Ho

[skip ci] input-group-btn's input-group-text should not create a new div

parent 7d00cc9c
...@@ -47,13 +47,12 @@ ...@@ -47,13 +47,12 @@
%fieldset.row %fieldset.row
.input-group .input-group
.project-path.input-group-prepend .project-path.input-group-prepend
.input-group-text
- if current_user.can_select_namespace? - if current_user.can_select_namespace?
- selected = params[:namespace_id] || :current_user - selected = params[:namespace_id] || :current_user
- opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner.login, path: repo.owner.login) } : {} - opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner.login, path: repo.owner.login) } : {}
= select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'select2 js-select-namespace', tabindex: 1 } = select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'input-group-text select2 js-select-namespace', tabindex: 1 }
- else - else
= text_field_tag :path, current_user.namespace_path, class: "input-large form-control", tabindex: 1, disabled: true = text_field_tag :path, current_user.namespace_path, class: "input-group-text input-large form-control", tabindex: 1, disabled: true
%span.input-group-prepend %span.input-group-prepend
.input-group-text / .input-group-text /
= text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true = text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true
......
...@@ -55,13 +55,12 @@ ...@@ -55,13 +55,12 @@
%fieldset.row %fieldset.row
.input-group .input-group
.project-path.input-group-prepend .project-path.input-group-prepend
.input-group-text
- if current_user.can_select_namespace? - if current_user.can_select_namespace?
- selected = params[:namespace_id] || :current_user - selected = params[:namespace_id] || :current_user
- opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner, path: repo.owner) } : {} - opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner, path: repo.owner) } : {}
= select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'select2 js-select-namespace', tabindex: 1 } = select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'input-group-text select2 js-select-namespace', tabindex: 1 }
- else - else
= text_field_tag :path, current_user.namespace_path, class: "input-large form-control", tabindex: 1, disabled: true = text_field_tag :path, current_user.namespace_path, class: "input-group-text input-large form-control", tabindex: 1, disabled: true
%span.input-group-prepend %span.input-group-prepend
.input-group-text / .input-group-text /
= text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true = text_field_tag :path, repo.name, class: "input-mini form-control", tabindex: 2, autofocus: true, required: true
......
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
.input-group .input-group
= text_field_tag 'created-personal-access-token', @new_personal_access_token, readonly: true, class: "form-control js-select-on-focus", 'aria-describedby' => "created-personal-access-token-help-block" = text_field_tag 'created-personal-access-token', @new_personal_access_token, readonly: true, class: "form-control js-select-on-focus", 'aria-describedby' => "created-personal-access-token-help-block"
%span.input-group-append %span.input-group-append
.input-group-text = clipboard_button(text: @new_personal_access_token, title: "Copy personal access token to clipboard", placement: "left", class: "input-group-text btn-default btn-clipboard")
= clipboard_button(text: @new_personal_access_token, title: "Copy personal access token to clipboard", placement: "left", class: "btn-default btn-clipboard")
%span#created-personal-access-token-help-block.form-text.text-muted.text-danger Make sure you save it - you won't be able to access it again. %span#created-personal-access-token-help-block.form-text.text-muted.text-danger Make sure you save it - you won't be able to access it again.
%hr %hr
......
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
.email-modal-input-group.input-group .email-modal-input-group.input-group
= text_field_tag :issuable_email, email, class: "monospace js-select-on-focus form-control", readonly: true = text_field_tag :issuable_email, email, class: "monospace js-select-on-focus form-control", readonly: true
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#issuable_email', class: 'btn btn-clipboard input-group-text btn-transparent d-none d-sm-block')
= clipboard_button(target: '#issuable_email', class: 'btn btn-clipboard btn-transparent d-none d-sm-block')
= mail_to email, class: 'btn btn-clipboard btn-transparent', = mail_to email, class: 'btn btn-clipboard btn-transparent',
subject: _("Enter the #{name} title"), subject: _("Enter the #{name} title"),
body: _("Enter the #{name} description"), body: _("Enter the #{name} description"),
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
%span %span
= text_field_tag :push_to_create_tip, push_to_create_project_command, class: "js-select-on-focus form-control monospace", readonly: true, aria: { label: _("Push project from command line") } = text_field_tag :push_to_create_tip, push_to_create_project_command, class: "js-select-on-focus form-control monospace", readonly: true, aria: { label: _("Push project from command line") }
%span.input-group-append %span.input-group-append
.input-group-text = clipboard_button(text: push_to_create_project_command, title: _("Copy command to clipboard"), class: 'input-group-text', placement: "right")
= clipboard_button(text: push_to_create_project_command, title: _("Copy command to clipboard"), placement: "right")
%p %p
= link_to("What does this command do?", help_page_path("gitlab-basics/create-project", anchor: "push-to-create-a-new-project"), target: "_blank") = link_to("What does this command do?", help_page_path("gitlab-basics/create-project", anchor: "push-to-create-a-new-project"), target: "_blank")
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
.input-group .input-group
%input.form-control.cluster-name.js-select-on-focus{ value: @cluster.name, readonly: true } %input.form-control.cluster-name.js-select-on-focus{ value: @cluster.name, readonly: true }
%span.input-group-append %span.input-group-append
.input-group-text = clipboard_button(text: @cluster.name, title: s_('ClusterIntegration|Copy Kubernetes cluster name'), class: 'input-group-text btn-secondary')
= clipboard_button(text: @cluster.name, title: s_('ClusterIntegration|Copy Kubernetes cluster name'), class: 'btn-secondary')
= form_for @cluster, url: namespace_project_cluster_path(@project.namespace, @project, @cluster), as: :cluster do |field| = form_for @cluster, url: namespace_project_cluster_path(@project.namespace, @project, @cluster), as: :cluster do |field|
= form_errors(@cluster) = form_errors(@cluster)
...@@ -16,16 +15,14 @@ ...@@ -16,16 +15,14 @@
.input-group .input-group
= platform_kubernetes_field.text_field :api_url, class: 'form-control js-select-on-focus', placeholder: s_('ClusterIntegration|API URL'), readonly: true = platform_kubernetes_field.text_field :api_url, class: 'form-control js-select-on-focus', placeholder: s_('ClusterIntegration|API URL'), readonly: true
%span.input-group-append %span.input-group-append
.input-group-text = clipboard_button(text: @cluster.platform_kubernetes.api_url, title: s_('ClusterIntegration|Copy API URL'), class: 'input-group-text btn-secondary')
= clipboard_button(text: @cluster.platform_kubernetes.api_url, title: s_('ClusterIntegration|Copy API URL'), class: 'btn-secondary')
.form-group .form-group
= platform_kubernetes_field.label :ca_cert, s_('ClusterIntegration|CA Certificate') = platform_kubernetes_field.label :ca_cert, s_('ClusterIntegration|CA Certificate')
.input-group .input-group
= platform_kubernetes_field.text_area :ca_cert, class: 'form-control js-select-on-focus', placeholder: s_('ClusterIntegration|Certificate Authority bundle (PEM format)'), readonly: true = platform_kubernetes_field.text_area :ca_cert, class: 'form-control js-select-on-focus', placeholder: s_('ClusterIntegration|Certificate Authority bundle (PEM format)'), readonly: true
%span.input-group-append.clipboard-addon %span.input-group-append.clipboard-addon
.input-group-text = clipboard_button(text: @cluster.platform_kubernetes.ca_cert, title: s_('ClusterIntegration|Copy CA Certificate'), class: 'input-group-text btn-blank')
= clipboard_button(text: @cluster.platform_kubernetes.ca_cert, title: s_('ClusterIntegration|Copy CA Certificate'), class: 'btn-blank')
.form-group .form-group
= platform_kubernetes_field.label :token, s_('ClusterIntegration|Token') = platform_kubernetes_field.label :token, s_('ClusterIntegration|Token')
......
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
.input-group .input-group
= text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true = text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#domain_dns', class: 'btn-default input-group-text d-none d-sm-block')
= clipboard_button(target: '#domain_dns', class: 'btn-default d-none d-sm-block')
%p.form-text.text-muted %p.form-text.text-muted
To access this domain create a new DNS record To access this domain create a new DNS record
......
...@@ -22,16 +22,14 @@ ...@@ -22,16 +22,14 @@
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :display_name, "GitLab / #{@project.full_name}", class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :display_name, "GitLab / #{@project.full_name}", class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#display_name', class: 'input-group-text')
= clipboard_button(target: '#display_name')
.form-group .form-group
= label_tag :description, 'Description', class: 'col-sm-2 col-12 col-form-label' = label_tag :description, 'Description', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#description', class: 'input-group-text')
= clipboard_button(target: '#description')
.form-group .form-group
= label_tag nil, 'Command trigger word', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Command trigger word', class: 'col-sm-2 col-12 col-form-label'
...@@ -48,8 +46,7 @@ ...@@ -48,8 +46,7 @@
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :request_url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :request_url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#request_url', class: 'input-group-text')
= clipboard_button(target: '#request_url')
.form-group .form-group
= label_tag nil, 'Request method', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Request method', class: 'col-sm-2 col-12 col-form-label'
...@@ -60,16 +57,14 @@ ...@@ -60,16 +57,14 @@
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :response_username, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :response_username, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#response_username', class: 'input-group-text')
= clipboard_button(target: '#response_username')
.form-group .form-group
= label_tag :response_icon, 'Response icon', class: 'col-sm-2 col-12 col-form-label' = label_tag :response_icon, 'Response icon', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :response_icon, asset_url('gitlab_logo.png'), class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :response_icon, asset_url('gitlab_logo.png'), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#response_icon', class: 'input-group-text')
= clipboard_button(target: '#response_icon')
.form-group .form-group
= label_tag nil, 'Autocomplete', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Autocomplete', class: 'col-sm-2 col-12 col-form-label'
...@@ -80,16 +75,14 @@ ...@@ -80,16 +75,14 @@
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :autocomplete_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#autocomplete_hint', class: 'input-group-text')
= clipboard_button(target: '#autocomplete_hint')
.form-group .form-group
= label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-12 col-form-label' = label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#autocomplete_description', class: 'input-group-text')
= clipboard_button(target: '#autocomplete_description')
%hr %hr
......
...@@ -40,8 +40,7 @@ ...@@ -40,8 +40,7 @@
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#url', class: 'input-group-text')
= clipboard_button(target: '#url')
.form-group .form-group
= label_tag nil, 'Method', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Method', class: 'col-sm-2 col-12 col-form-label'
...@@ -52,8 +51,7 @@ ...@@ -52,8 +51,7 @@
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :customize_name, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :customize_name, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#customize_name', class: 'input-group-text')
= clipboard_button(target: '#customize_name')
.form-group .form-group
= label_tag nil, 'Customize icon', class: 'col-sm-2 col-12 col-form-label' = label_tag nil, 'Customize icon', class: 'col-sm-2 col-12 col-form-label'
...@@ -70,24 +68,21 @@ ...@@ -70,24 +68,21 @@
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#autocomplete_description', class: 'input-group-text')
= clipboard_button(target: '#autocomplete_description')
.form-group .form-group
= label_tag :autocomplete_usage_hint, 'Autocomplete usage hint', class: 'col-sm-2 col-12 col-form-label' = label_tag :autocomplete_usage_hint, 'Autocomplete usage hint', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :autocomplete_usage_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :autocomplete_usage_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#autocomplete_usage_hint', class: 'input-group-text')
= clipboard_button(target: '#autocomplete_usage_hint')
.form-group .form-group
= label_tag :descriptive_label, 'Descriptive label', class: 'col-sm-2 col-12 col-form-label' = label_tag :descriptive_label, 'Descriptive label', class: 'col-sm-2 col-12 col-form-label'
.col-sm-10.col-12.input-group .col-sm-10.col-12.input-group
= text_field_tag :descriptive_label, 'Perform common operations on GitLab project', class: 'form-control form-control-sm', readonly: 'readonly' = text_field_tag :descriptive_label, 'Perform common operations on GitLab project', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#descriptive_label', class: 'input-group-text')
= clipboard_button(target: '#descriptive_label')
%hr %hr
......
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
.git-clone-holder.input-group .git-clone-holder.input-group
.input-group-prepend .input-group-prepend
.input-group-text
- if allowed_protocols_present? - if allowed_protocols_present?
.clone-dropdown-btn.btn .input-group-text.clone-dropdown-btn.btn
%span %span
= enabled_project_button(project, enabled_protocol) = enabled_project_button(project, enabled_protocol)
- else - else
%a#clone-dropdown.btn.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } } %a#clone-dropdown.input-group-text.btn.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } }
%span %span
= default_clone_protocol.upcase = default_clone_protocol.upcase
= icon('caret-down') = icon('caret-down')
...@@ -20,5 +19,4 @@ ...@@ -20,5 +19,4 @@
= text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: 'Project clone URL' } = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: 'Project clone URL' }
.input-group-append .input-group-append
.input-group-text = clipboard_button(target: '#project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-secondary btn-clipboard")
= clipboard_button(target: '#project_clone', title: _("Copy URL to clipboard"), class: "btn-secondary btn-clipboard")
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