summaryrefslogtreecommitdiff
path: root/app/views/shared/deploy_keys/_form.html.haml
blob: e6075c3ae3a32adebbe423a06cdfc8150f475b05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- form = local_assigns.fetch(:form)
- deploy_key = local_assigns.fetch(:deploy_key)

= form_errors(deploy_key)

.form-group
  = form.label :title, class: 'control-label'
  .col-sm-10= form.text_field :title, class: 'form-control'

.form-group
  - if deploy_key.new_record?
    = form.label :key, class: 'control-label'
    .col-sm-10
      %p.light
        Paste a machine public key here. Read more about how to generate it
        = link_to 'here', help_page_path('ssh/README')
      = form.text_area :key, class: 'form-control thin_area', rows: 5
  - else
    = form.label :fingerprint, class: 'control-label'
    .col-sm-10
      = form.text_field :fingerprint, class: 'form-control', readonly: 'readonly'

.form-group
  .control-label
  .col-sm-10
    = form.label :can_push do
      = form.check_box :can_push
      %strong Write access allowed
    %p.light.append-bottom-0
      Allow this key to push to repository as well? (Default only allows pull access.)