diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-19 23:18:09 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-19 23:18:09 +0000 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /app/views/profiles/keys | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) | |
download | gitlab-ce-6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde.tar.gz |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'app/views/profiles/keys')
-rw-r--r-- | app/views/profiles/keys/_form.html.haml | 10 | ||||
-rw-r--r-- | app/views/profiles/keys/_key.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/keys/_key_details.html.haml | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index a749fbd1eec..6f7eb21b7e0 100644 --- a/app/views/profiles/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -1,7 +1,7 @@ - max_date = ::Gitlab::CurrentSettings.max_ssh_key_lifetime_from_now.to_date if ssh_key_expiration_policy_enabled? %div = form_for [:profile, @key], html: { class: 'js-requires-input' } do |f| - = form_errors(@key, pajamas_alert: true) + = form_errors(@key) .form-group = f.label :key, s_('Profiles|Key'), class: 'label-bold' @@ -13,10 +13,12 @@ = f.text_field :title, class: "form-control gl-form-input input-lg qa-key-title-field", required: true, placeholder: s_('Profiles|Example: MacBook key') %p.form-text.text-muted= s_('Profiles|Key titles are publicly visible.') + .form-row .col.form-group - = f.label :expires_at, s_('Profiles|Expiration date'), class: 'label-bold' - = f.date_field :expires_at, class: "form-control input-lg", min: Date.tomorrow, max: max_date, data: { qa_selector: 'key_expiry_date_field' } - %p.form-text.text-muted{ data: { qa_selector: 'key_expiry_date_field_description' } }= ssh_key_expires_field_description + .js-access-tokens-expires-at{ data: {min_date: Date.tomorrow, max_date: max_date, default_date_offset: 365, description: ssh_key_expires_field_description } } + = f.label :expires_at, s_('Profiles|Expiration date'), class: 'label-bold' + = f.text_field :expires_at, class: "gl-datepicker-input form-control gl-form-input", placeholder: 'YYYY-MM-DD', min: Date.tomorrow, max: max_date, data: { js_name: 'expiresAt' } + %p.form-text.text-muted= ssh_key_expires_field_description .js-add-ssh-key-validation-warning.hide .bs-callout.bs-callout-warning{ role: 'alert', aria_live: 'assertive' } diff --git a/app/views/profiles/keys/_key.html.haml b/app/views/profiles/keys/_key.html.haml index 178ed01c766..de4a19bdad7 100644 --- a/app/views/profiles/keys/_key.html.haml +++ b/app/views/profiles/keys/_key.html.haml @@ -16,7 +16,7 @@ %span.gl-text-truncate.gl-sm-ml-3 = key.fingerprint - .gl-mt-3= s_('Profiles|Created%{time_ago}'.html_safe) % { time_ago: time_ago_with_tooltip(key.created_at, html_class: 'gl-ml-2')} + .gl-mt-3= html_escape(s_('Profiles|Created%{time_ago}')) % { time_ago: time_ago_with_tooltip(key.created_at, html_class: 'gl-ml-2').html_safe} .key-list-item-dates %span.last-used-at.gl-mr-3 diff --git a/app/views/profiles/keys/_key_details.html.haml b/app/views/profiles/keys/_key_details.html.haml index 8f7ccadd108..8016d989ff1 100644 --- a/app/views/profiles/keys/_key_details.html.haml +++ b/app/views/profiles/keys/_key_details.html.haml @@ -19,7 +19,7 @@ %strong= @key.last_used_at.try(:to_s, :medium) || _('Never') .col-md-8 - = form_errors(@key, type: 'key', pajamas_alert: true) unless @key.valid? + = form_errors(@key, type: 'key') unless @key.valid? %pre.well-pre = @key.key .card |