gitlab-org--gitlab-foss/app/views/projects/triggers/_form.html.haml

34 lines
1.8 KiB
Text
Raw Normal View History

2017-03-07 08:02:56 -05:00
= form_for [@project.namespace.becomes(Namespace), @project, @trigger], html: { class: 'gl-show-field-errors' } do |f|
= form_errors(@trigger)
- if @trigger.token
.form-group
%label.label-light Token
%p.form-control-static= @trigger.token
.form-group
2017-04-07 08:47:29 -04:00
= f.label :key, "Description", class: "label-light"
2017-03-07 08:02:56 -05:00
= f.text_field :description, class: "form-control", required: true, title: 'Trigger description is required.', placeholder: "Trigger description"
2017-04-07 08:47:29 -04:00
- if @trigger.persisted?
%hr
= f.fields_for :trigger_schedule do |schedule_fields|
= schedule_fields.hidden_field :id
.form-group
.checkbox
= schedule_fields.label :active do
= schedule_fields.check_box :active
2017-04-07 10:02:13 -04:00
%strong Schedule trigger (experimental)
2017-04-07 08:47:29 -04:00
.help-block
2017-04-07 11:15:28 -04:00
If checked, this trigger will be executed periodically according to cron and timezone.
2017-04-07 10:02:13 -04:00
= link_to icon('question-circle'), help_page_path('ci/triggers', anchor: 'schedule')
2017-04-07 08:47:29 -04:00
.form-group
= schedule_fields.label :cron, "Cron", class: "label-light"
2017-04-07 10:02:13 -04:00
= schedule_fields.text_field :cron, class: "form-control", title: 'Cron specification is required.', placeholder: "0 1 * * *"
2017-04-07 08:47:29 -04:00
.form-group
= schedule_fields.label :cron, "Timezone", class: "label-light"
2017-04-07 10:02:13 -04:00
= schedule_fields.text_field :cron_timezone, class: "form-control", title: 'Timezone is required.', placeholder: "UTC"
2017-04-07 08:47:29 -04:00
.form-group
= schedule_fields.label :ref, "Branch or tag", class: "label-light"
2017-04-07 10:02:13 -04:00
= schedule_fields.text_field :ref, class: "form-control", title: 'Branch or tag is required.', placeholder: "master"
2017-04-07 08:47:29 -04:00
.help-block Existing branch name, tag
2017-03-07 08:02:56 -05:00
= f.submit btn_text, class: "btn btn-save"