Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

show.html.haml 1.39 KB
Newer Older
Kamil Trzcinski's avatar
Kamil Trzcinski committed
1
- page_title "Variables"
2
3
4
%h3.page-title
  Secret Variables

5
%p.light
Douwe Maan's avatar
Douwe Maan committed
6
7
  These variables will be set to environment by the runner and will be hidden in the build log.
  %br
8
  So you can use them for passwords, secret keys or whatever you want.
Douwe Maan's avatar
Douwe Maan committed
9
10
11
12

%hr


13
= nested_form_for @project, url: url_for(controller: 'projects/variables', action: 'update'), html: { class: 'form-horizontal' }  do |f|
Douwe Maan's avatar
Douwe Maan committed
14
15
  - if @project.errors.any?
    #error_explanation
16
      %p.lead= "#{pluralize(@project.errors.count, "error")} prohibited this project from being saved:"
Douwe Maan's avatar
Douwe Maan committed
17
18
      .alert.alert-error
        %ul
19
          - @project.errors.full_messages.each do |msg|
Douwe Maan's avatar
Douwe Maan committed
20
21
            %li= msg

22
  = f.fields_for :variables do |variable_form|
Douwe Maan's avatar
Douwe Maan committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    .form-group
      = variable_form.label :key, 'Key', class: 'control-label'
      .col-sm-10
        = variable_form.text_field :key, class: 'form-control', placeholder: "PROJECT_VARIABLE"

    .form-group
      = variable_form.label :value, 'Value', class: 'control-label'
      .col-sm-10
        = variable_form.text_area :value, class: 'form-control', rows: 2, placeholder: ""

        = variable_form.link_to_remove "Remove this variable", class: 'btn btn-danger pull-right prepend-top-10'
    %hr
  %p
    .clearfix
37
      = f.link_to_add "Add a variable", :variables, class: 'btn btn-success pull-right'
Douwe Maan's avatar
Douwe Maan committed
38
39
40

  .form-actions
    = f.submit 'Save changes', class: 'btn btn-save', return_to: request.original_url