Commit c2cbc155 authored by Clement Ho's avatar Clement Ho

[skip ci] .input-group-addon to .input-group-prepend, .input-group-append

parent c5523286
...@@ -86,7 +86,11 @@ Please update your Git repository remotes as soon as possible.`), ...@@ -86,7 +86,11 @@ Please update your Git repository remotes as soon as possible.`),
<div class="form-group"> <div class="form-group">
<label :for="$options.inputId">{{ s__('Profiles|Path') }}</label> <label :for="$options.inputId">{{ s__('Profiles|Path') }}</label>
<div class="input-group"> <div class="input-group">
<div class="input-group-addon">{{ rootUrl }}</div> <div class="input-group-prepend">
<div class="input-group-text">
{{ rootUrl }}
</div>
</div>
<input <input
:id="$options.inputId" :id="$options.inputId"
class="form-control" class="form-control"
......
...@@ -170,11 +170,13 @@ label { ...@@ -170,11 +170,13 @@ label {
max-width: 180px; max-width: 180px;
} }
.input-group-addon { .input-group-prepend,
.input-group-append {
background-color: $input-group-addon-bg; background-color: $input-group-addon-bg;
} }
.input-group-addon:not(:first-child):not(:last-child) { .input-group-prepend:not(:first-child):not(:last-child),
.input-group-append:not(:first-child):not(:last-child) {
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;
} }
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
} }
} }
.input-group-addon { .input-group-prepend,
.input-group-append {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
line-height: unset; line-height: unset;
...@@ -524,7 +525,8 @@ a.deploy-project-label { ...@@ -524,7 +525,8 @@ a.deploy-project-label {
display: flex; display: flex;
} }
.input-group-addon { .input-group-prepend,
.input-group-append {
flex: 1; flex: 1;
text-align: left; text-align: left;
padding-left: ($gl-padding * 3); padding-left: ($gl-padding * 3);
......
= form_for @appearance, url: admin_appearances_path, do |f| = form_for @appearance, url: admin_appearances_path do |f|
= form_errors(@appearance) = form_errors(@appearance)
%fieldset.app_logo %fieldset.app_logo
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
= f.label :color, "Background color", class: 'col-form-label' = f.label :color, "Background color", class: 'col-form-label'
.col-sm-10 .col-sm-10
.input-group .input-group
.input-group-addon.label-color-preview &nbsp; .input-group-prepend
.input-group-text.label-color-preview &nbsp;
= f.text_field :color, class: "form-control" = f.text_field :color, class: "form-control"
.form-text.text-muted .form-text.text-muted
Choose any color. Choose any color.
......
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
= 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: '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-large form-control", tabindex: 1, disabled: true
%span.input-group-addon / %span.input-group-prepend
.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
%td.import-actions.job-status %td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do = button_tag class: "btn btn-import js-add-to-import" do
......
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
= 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: '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-large form-control", tabindex: 1, disabled: true
%span.input-group-addon / %span.input-group-prepend
.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
%td.import-actions.job-status %td.import-actions.job-status
= button_tag class: 'btn btn-import js-add-to-import' do = button_tag class: 'btn btn-import js-add-to-import' do
......
...@@ -13,13 +13,15 @@ ...@@ -13,13 +13,15 @@
.form-group .form-group
.input-group .input-group
- if current_user.can_select_namespace? - if current_user.can_select_namespace?
.input-group-addon.has-tooltip{ title: root_url } .input-group-prepend.has-tooltip{ title: root_url }
= root_url .input-group-text
= root_url
= select_tag :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), class: 'select2 js-select-namespace', tabindex: 1 = select_tag :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), class: 'select2 js-select-namespace', tabindex: 1
- else - else
.input-group-addon.static-namespace.has-tooltip{ title: user_url(current_user.username) + '/' } .input-group-prepend.static-namespace.has-tooltip{ title: user_url(current_user.username) + '/' }
#{user_url(current_user.username)}/ .input-group-text
#{user_url(current_user.username)}/
= hidden_field_tag :namespace_id, value: current_user.namespace_id = hidden_field_tag :namespace_id, value: current_user.namespace_id
.form-group.col-12.col-sm-6.project-path .form-group.col-12.col-sm-6.project-path
= label_tag :path, 'Project name', class: 'label-light' = label_tag :path, 'Project name', class: 'label-light'
......
...@@ -9,13 +9,15 @@ ...@@ -9,13 +9,15 @@
Project path Project path
.input-group .input-group
- if current_user.can_select_namespace? - if current_user.can_select_namespace?
.input-group-addon.has-tooltip{ title: root_url } .input-group-prepend.has-tooltip{ title: root_url }
= root_url .input-group-text
= root_url
= f.select :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), {}, { class: 'select2 js-select-namespace qa-project-namespace-select', tabindex: 1} = f.select :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), {}, { class: 'select2 js-select-namespace qa-project-namespace-select', tabindex: 1}
- else - else
.input-group-addon.static-namespace.has-tooltip{ title: user_url(current_user.username) + '/' } .input-group-prepend.static-namespace.has-tooltip{ title: user_url(current_user.username) + '/' }
#{user_url(current_user.username)}/ .input-group-text
#{user_url(current_user.username)}/
= f.hidden_field :namespace_id, value: current_user.namespace_id = f.hidden_field :namespace_id, value: current_user.namespace_id
.form-group.project-path.col-sm-6 .form-group.project-path.col-sm-6
= f.label :path, class: 'label-light' do = f.label :path, class: 'label-light' do
......
...@@ -14,11 +14,12 @@ ...@@ -14,11 +14,12 @@
%label.label-light %label.label-light
Template Template
.input-group.template-input-group .input-group.template-input-group
.input-group-addon .input-group-prepend
.selected-icon .input-group-text
- Gitlab::ProjectTemplate.all.each do |template| .selected-icon
= custom_icon(template.logo) - Gitlab::ProjectTemplate.all.each do |template|
.selected-template = custom_icon(template.logo)
.selected-template
%button.btn.btn-secondary.change-template{ type: "button" } Change template %button.btn.btn-secondary.change-template{ type: "button" } Change template
= render 'new_project_fields', f: f, project_name_id: "template-project-name" = render 'new_project_fields', f: f, project_name_id: "template-project-name"
...@@ -21,8 +21,9 @@ ...@@ -21,8 +21,9 @@
= 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-addon.clipboard-addon %span.input-group-append.clipboard-addon
= clipboard_button(text: @cluster.platform_kubernetes.ca_cert, title: s_('ClusterIntegration|Copy CA Certificate'), class: 'btn-blank') .input-group-text
= 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')
......
...@@ -17,9 +17,10 @@ ...@@ -17,9 +17,10 @@
= platform_kubernetes_field.label :token, s_('ClusterIntegration|Token') = platform_kubernetes_field.label :token, s_('ClusterIntegration|Token')
.input-group .input-group
= platform_kubernetes_field.text_field :token, class: 'form-control js-cluster-token', type: 'password', placeholder: s_('ClusterIntegration|Token'), autocomplete: 'off' = platform_kubernetes_field.text_field :token, class: 'form-control js-cluster-token', type: 'password', placeholder: s_('ClusterIntegration|Token'), autocomplete: 'off'
%span.input-group-addon.clipboard-addon %span.input-group-append.clipboard-addon
%button.js-show-cluster-token.btn-blank{ type: 'button' } .input-group-text
= s_('ClusterIntegration|Show') %button.js-show-cluster-token.btn-blank{ type: 'button' }
= s_('ClusterIntegration|Show')
.form-group .form-group
= platform_kubernetes_field.label :namespace, s_('ClusterIntegration|Project namespace (optional, unique)') = platform_kubernetes_field.label :namespace, s_('ClusterIntegration|Project namespace (optional, unique)')
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
= link_to icon('exchange'), { from: params[:to], to: params[:from] }, class: 'commits-compare-switch has-tooltip btn btn-white', title: 'Swap revisions' = link_to icon('exchange'), { from: params[:to], to: params[:from] }, class: 'commits-compare-switch has-tooltip btn btn-white', title: 'Swap revisions'
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown .form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
.input-group.inline-input-group .input-group.inline-input-group
%span.input-group-addon %span.input-group-prepend
= s_("CompareBranches|Source") .input-group-text
= s_("CompareBranches|Source")
= hidden_field_tag :to, params[:to] = hidden_field_tag :to, params[:to]
= button_tag type: 'button', title: params[:to], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do = button_tag type: 'button', title: params[:to], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do
.dropdown-toggle-text.str-truncated= params[:to] || _("Select branch/tag") .dropdown-toggle-text.str-truncated= params[:to] || _("Select branch/tag")
...@@ -14,8 +15,9 @@ ...@@ -14,8 +15,9 @@
.compare-ellipsis.inline ... .compare-ellipsis.inline ...
.form-group.dropdown.compare-form-group.from.js-compare-from-dropdown .form-group.dropdown.compare-form-group.from.js-compare-from-dropdown
.input-group.inline-input-group .input-group.inline-input-group
%span.input-group-addon %span.input-group-prepend
= s_("CompareBranches|Target") .input-group-text
= s_("CompareBranches|Target")
= hidden_field_tag :from, params[:from] = hidden_field_tag :from, params[:from]
= button_tag type: 'button', title: params[:from], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do = button_tag type: 'button', title: params[:from], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do
.dropdown-toggle-text.str-truncated= params[:from] || _("Select branch/tag") .dropdown-toggle-text.str-truncated= params[:from] || _("Select branch/tag")
......
...@@ -142,8 +142,9 @@ ...@@ -142,8 +142,9 @@
%span Path %span Path
.form-group .form-group
.input-group .input-group
.input-group-addon .input-group-prepend
#{URI.join(root_url, @project.namespace.full_path)}/ .input-group-text
#{URI.join(root_url, @project.namespace.full_path)}/
= f.text_field :path, class: 'form-control' = f.text_field :path, class: 'form-control'
%ul %ul
%li Be careful. Renaming a project's repository can have unintended side effects. %li Be careful. Renaming a project's repository can have unintended side effects.
......
...@@ -124,9 +124,11 @@ ...@@ -124,9 +124,11 @@
.form-group .form-group
= f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light' = f.label :build_coverage_regex, "Test coverage parsing", class: 'label-light'
.input-group .input-group
%span.input-group-addon / %span.input-group-prepend
.input-group-text /
= f.text_field :build_coverage_regex, class: 'form-control', placeholder: 'Regular expression' = f.text_field :build_coverage_regex, class: 'form-control', placeholder: 'Regular expression'
%span.input-group-addon / %span.input-group-append
.input-group-text /
%p.form-text.text-muted %p.form-text.text-muted
A regular expression that will be used to find the test coverage A regular expression that will be used to find the test coverage
output in the job trace. Leave blank to disable output in the job trace. Leave blank to disable
......
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
Group path Group path
.col-sm-10 .col-sm-10
.input-group.gl-field-error-anchor .input-group.gl-field-error-anchor
.group-root-path.input-group-addon.has-tooltip{ title: group_path, :'data-placement' => 'bottom' } .group-root-path.input-group-prepend.has-tooltip{ title: group_path, :'data-placement' => 'bottom' }
%span>= root_url .input-group-text
- if parent %span>= root_url
%strong= parent.full_path + '/' - if parent
%strong= parent.full_path + '/'
= f.hidden_field :parent_id = f.hidden_field :parent_id
= f.text_field :path, placeholder: 'open-source', class: 'form-control', = f.text_field :path, placeholder: 'open-source', class: 'form-control',
autofocus: local_assigns[:autofocus] || false, required: true, autofocus: local_assigns[:autofocus] || false, required: true,
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
= f.label :color, "Background color", class: 'col-form-label' = f.label :color, "Background color", class: 'col-form-label'
.col-sm-10 .col-sm-10
.input-group .input-group
.input-group-addon.label-color-preview &nbsp; .input-group-prepend
.input-group-text.label-color-preview &nbsp;
= f.text_field :color, class: "form-control" = f.text_field :color, class: "form-control"
.form-text.text-muted .form-text.text-muted
Choose any color. Choose any color.
......
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