debian-mirror-gitlab/app/views/shared/deploy_keys/_form.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
2.1 KiB
Text
Raw Normal View History

2017-09-10 17:25:29 +05:30
- form = local_assigns.fetch(:form)
- deploy_key = local_assigns.fetch(:deploy_key)
2018-03-17 18:26:18 +05:30
- deploy_keys_project = deploy_key.deploy_keys_project_for(@project)
2017-09-10 17:25:29 +05:30
2022-10-11 01:57:18 +05:30
= form_errors(deploy_key)
2017-09-10 17:25:29 +05:30
.form-group
2018-11-08 19:23:39 +05:30
= form.label :title, class: 'col-form-label col-sm-2'
2021-06-08 01:23:25 +05:30
.col-sm-10= form.text_field :title, class: 'form-control gl-form-input', data: { qa_selector: 'deploy_key_title_field' }, readonly: ('readonly' unless can?(current_user, :update_deploy_key, deploy_key))
2017-09-10 17:25:29 +05:30
.form-group
- if deploy_key.new_record?
2018-11-08 19:23:39 +05:30
= form.label :key, class: 'col-form-label col-sm-2'
2017-09-10 17:25:29 +05:30
.col-sm-10
%p.light
2022-08-13 15:12:31 +05:30
- link_start = "<a href='#{help_page_path('user/ssh')}' target='_blank' rel='noreferrer noopener'>".html_safe
2019-07-07 11:18:12 +05:30
- link_end = '</a>'
2021-03-11 19:13:27 +05:30
= _('Paste a public key here. %{link_start}How do I generate it?%{link_end}').html_safe % { link_start: link_start, link_end: link_end.html_safe }
2021-06-08 01:23:25 +05:30
= form.text_area :key, class: 'form-control gl-form-input thin_area', rows: 5, data: { qa_selector: 'deploy_key_field' }
2017-09-10 17:25:29 +05:30
- else
2022-08-13 15:12:31 +05:30
- if deploy_key.fingerprint_sha256.present?
= form.label :fingerprint, _('Fingerprint (SHA256)'), class: 'col-form-label col-sm-2'
.col-sm-10
= form.text_field :fingerprint_sha256, class: 'form-control gl-form-input', readonly: 'readonly'
- if deploy_key.fingerprint.present?
= form.label :fingerprint, _('Fingerprint (MD5)'), class: 'col-form-label col-sm-2'
.col-sm-10
= form.text_field :fingerprint, class: 'form-control gl-form-input', readonly: 'readonly'
2017-09-10 17:25:29 +05:30
2023-06-20 00:43:36 +05:30
.form-group
.col-sm-10
= form.label :expires_at, _('Expiration date (optional)'), class: 'label-bold'
= form.text_field :expires_at, class: 'form-control gl-form-input', readonly: 'readonly'
2018-03-17 18:26:18 +05:30
- if deploy_keys_project.present?
= form.fields_for :deploy_keys_projects, deploy_keys_project do |deploy_keys_project_form|
.form-group
2018-11-08 19:23:39 +05:30
.col-form-label.col-sm-2
2018-03-17 18:26:18 +05:30
.col-sm-10
2022-06-21 17:19:12 +05:30
= deploy_keys_project_form.gitlab_ui_checkbox_component :can_push, _('Grant write permissions to this key'),
help_text: _('Allow this key to push to this repository')