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
= form_errors(deploy_key)
.form-group
2018-11-08 19:23:39 +05:30
= form.label :title, class: 'col-form-label col-sm-2'
2019-12-21 20:55:43 +05:30
.col-sm-10= form.text_field :title, class: 'form-control', 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
2019-07-07 11:18:12 +05:30
- link_start = "<a href='#{help_page_path('ssh/README')}' target='_blank' rel='noreferrer noopener'>".html_safe
- link_end = '</a>'
= _('Paste a machine public key here. Read more about how to generate it %{link_start}here%{link_end}').html_safe % { link_start: link_start, link_end: link_end.html_safe }
2017-09-10 17:25:29 +05:30
= form.text_area :key, class: 'form-control thin_area', rows: 5
- else
2018-11-08 19:23:39 +05:30
= form.label :fingerprint, class: 'col-form-label col-sm-2'
2017-09-10 17:25:29 +05:30
.col-sm-10
= form.text_field :fingerprint, class: 'form-control', 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
= deploy_keys_project_form.label :can_push do
= deploy_keys_project_form.check_box :can_push
2019-07-07 11:18:12 +05:30
%strong= _('Write access allowed')
2020-06-23 00:09:42 +05:30
%p.light.gl-mb-0
2019-07-07 11:18:12 +05:30
= _('Allow this key to push to repository as well? (Default only allows pull access.)')