debian-mirror-gitlab/app/views/profiles/keys/_form.html.haml

29 lines
1.8 KiB
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
%div
2016-06-02 11:05:42 +05:30
= form_for [:profile, @key], html: { class: 'js-requires-input' } do |f|
= form_errors(@key)
2014-09-02 18:07:02 +05:30
.form-group
2019-09-04 21:01:54 +05:30
= f.label :key, s_('Profiles|Key'), class: 'label-bold'
2021-01-03 14:25:43 +05:30
%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-06-08 01:23:25 +05:30
= 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-04-08 14:13:33 +05:30
.form-row
.col.form-group
= f.label :title, _('Title'), class: 'label-bold'
2021-06-08 01:23:25 +05:30
= 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')
%p.form-text.text-muted= s_('Profiles|Give your individual key a title. This will be publicly visible.')
2020-04-08 14:13:33 +05:30
.col.form-group
= f.label :expires_at, s_('Profiles|Expires at'), class: 'label-bold'
2020-05-24 23:13:21 +05:30
= f.date_field :expires_at, class: "form-control input-lg", min: Date.tomorrow, data: { qa_selector: 'key_expiry_date_field' }
2021-04-29 21:17:54 +05:30
%p.form-text.text-muted{ data: { qa_selector: 'key_expiry_date_field_description' } }= ssh_key_expires_field_description
2018-11-08 19:23:39 +05:30
.js-add-ssh-key-validation-warning.hide
.bs-callout.bs-callout-warning{ role: 'alert', aria_live: 'assertive' }
%strong= _('Oops, are you sure?')
2021-04-29 21:17:54 +05:30
%p= s_("Profiles|Publicly visible private SSH keys can compromise your system.")
2018-11-08 19:23:39 +05:30
2021-04-29 21:17:54 +05:30
%button.btn.gl-button.btn-confirm.js-add-ssh-key-validation-confirm-submit= _("Yes, add it")
2014-09-02 18:07:02 +05:30
2020-07-28 23:09:34 +05:30
.gl-mt-3
2021-04-29 21:17:54 +05:30
= f.submit s_('Profiles|Add key'), class: "gl-button btn btn-confirm js-add-ssh-key-validation-original-submit qa-add-key-button"