2011-10-08 17:36:38 -04:00
%div
2016-02-29 12:19:00 -05:00
= form_for [:profile, @key], html: { class: 'js-requires-input' } do |f|
2016-04-04 21:25:38 -04:00
= form_errors(@key)
2011-10-08 17:36:38 -04:00
2013-12-30 18:27:02 -05:00
.form-group
2019-05-30 13:56:56 -04:00
= f.label :key, s_('Profiles|Key'), class: 'label-bold'
2020-09-25 11:09:36 -04: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 17:09:07 -04: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 05:09:23 -04:00
.form-row
.col.form-group
= f.label :title, _('Title'), class: 'label-bold'
2021-04-20 17:09:07 -04: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')
2020-09-25 11:09:36 -04:00
%p.form-text.text-muted= s_('Profiles|Give your individual key a title.')
2020-03-13 05:09:23 -04:00
.col.form-group
= f.label :expires_at, s_('Profiles|Expires at'), class: 'label-bold'
2020-05-04 17:09:41 -04:00
= f.date_field :expires_at, class: "form-control input-lg", min: Date.tomorrow, data: { qa_selector: 'key_expiry_date_field' }
2021-04-12 08:09:15 -04:00
%p.form-text.text-muted{ data: { qa_selector: 'key_expiry_date_field_description' } }= ssh_key_expires_field_description
2012-08-21 20:56:53 -04:00
2018-07-06 10:36:02 -04: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 08:09:15 -04:00
%p= s_("Profiles|Publicly visible private SSH keys can compromise your system.")
2018-07-06 10:36:02 -04:00
2021-03-17 14:09:01 -04:00
%button.btn.gl-button.btn-confirm.js-add-ssh-key-validation-confirm-submit= _("Yes, add it")
2018-07-06 10:36:02 -04:00
2020-06-26 02:09:03 -04:00
.gl-mt-3
2021-03-17 14:09:01 -04:00
= f.submit s_('Profiles|Add key'), class: "gl-button btn btn-confirm js-add-ssh-key-validation-original-submit qa-add-key-button"