2011-10-08 21:36:38 +00:00
%div
2016-02-29 17:19:00 +00:00
= form_for [:profile, @key], html: { class: 'js-requires-input' } do |f|
2016-04-05 01:25:38 +00:00
= form_errors(@key)
2011-10-08 21:36:38 +00:00
2013-12-30 23:27:02 +00:00
.form-group
2019-05-30 17:56:56 +00:00
= f.label :key, s_('Profiles|Key'), class: 'label-bold'
2020-09-25 15:09:36 +00:00
%p= _("Paste your public SSH key, which is usually contained in the file '~/.ssh/id_ed25519.pub' or '~/.ssh/id_rsa.pub' and begins with 'ssh-ed25519' or 'ssh-rsa'. Do not paste your private SSH key, as that can compromise your identity.")
2021-04-20 21:09:07 +00:00
= f.text_area :key, class: "form-control gl-form-input js-add-ssh-key-validation-input qa-key-public-key-field", rows: 8, required: true, placeholder: s_('Profiles|Typically starts with "ssh-ed25519 …" or "ssh-rsa …"')
2020-03-13 09:09:23 +00:00
.form-row
.col.form-group
= f.label :title, _('Title'), class: 'label-bold'
2021-04-20 21:09:07 +00:00
= f.text_field :title, class: "form-control gl-form-input input-lg qa-key-title-field", required: true, placeholder: s_('Profiles|e.g. My MacBook key')
2021-04-21 21:09:40 +00:00
%p.form-text.text-muted= s_('Profiles|Give your individual key a title. This will be publicly visible.')
2020-03-13 09:09:23 +00:00
.col.form-group
= f.label :expires_at, s_('Profiles|Expires at'), class: 'label-bold'
2020-05-04 21:09:41 +00:00
= f.date_field :expires_at, class: "form-control input-lg", min: Date.tomorrow, data: { qa_selector: 'key_expiry_date_field' }
2021-04-12 12:09:15 +00:00
%p.form-text.text-muted{ data: { qa_selector: 'key_expiry_date_field_description' } }= ssh_key_expires_field_description
2012-08-22 00:56:53 +00:00
2018-07-06 14:36:02 +00:00
.js-add-ssh-key-validation-warning.hide
.bs-callout.bs-callout-warning{ role: 'alert', aria_live: 'assertive' }
%strong= _('Oops, are you sure?')
2021-04-12 12:09:15 +00:00
%p= s_("Profiles|Publicly visible private SSH keys can compromise your system.")
2018-07-06 14:36:02 +00:00
2021-03-17 18:09:01 +00:00
%button.btn.gl-button.btn-confirm.js-add-ssh-key-validation-confirm-submit= _("Yes, add it")
2018-07-06 14:36:02 +00:00
2020-06-26 06:09:03 +00:00
.gl-mt-3
2021-03-17 18:09:01 +00:00
= f.submit s_('Profiles|Add key'), class: "gl-button btn btn-confirm js-add-ssh-key-validation-original-submit qa-add-key-button"