2017-05-07 18:35:56 -04:00
- content_for :page_specific_javascripts do
2017-05-10 17:26:50 -04:00
= webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'schedule_form'
2017-05-07 18:35:56 -04:00
= form_for [@project.namespace.becomes(Namespace), @project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "form-horizontal js-pipeline-schedule-form" } do |f|
= form_errors(@schedule)
.form-group
2017-05-12 21:15:27 -04:00
.col-md-9
2017-06-07 09:46:10 -04:00
= f.label :description, _('Description'), class: 'label-light'
2017-06-11 19:33:28 -04:00
= f.text_field :description, class: 'form-control', required: true, autofocus: true, placeholder: s_('PipelineSchedules|Provide a short description for this pipeline')
2017-05-07 18:35:56 -04:00
.form-group
2017-05-12 21:15:27 -04:00
.col-md-9
2017-06-07 09:46:10 -04:00
= f.label :cron, _('Interval Pattern'), class: 'label-light'
2017-05-07 18:35:56 -04:00
#interval-pattern-input{ data: { initial_interval: @schedule.cron } }
.form-group
2017-05-12 21:15:27 -04:00
.col-md-9
2017-06-07 09:46:10 -04:00
= f.label :cron_timezone, _('Cron Timezone'), class: 'label-light'
2017-06-19 16:26:28 -04:00
= dropdown_tag(_("Select a timezone"), options: { toggle_class: 'btn js-timezone-dropdown', title: _("Select a timezone"), filter: true, placeholder: s_("OfSearchInADropdown|Filter"), data: { data: timezone_data } } )
2017-05-07 18:35:56 -04:00
= f.text_field :cron_timezone, value: @schedule.cron_timezone, id: 'schedule_cron_timezone', class: 'hidden', name: 'schedule[cron_timezone]', required: true
.form-group
2017-05-12 21:15:27 -04:00
.col-md-9
2017-06-07 09:46:10 -04:00
= f.label :ref, _('Target Branch'), class: 'label-light'
2017-06-19 16:26:28 -04:00
= dropdown_tag(_("Select target branch"), options: { toggle_class: 'btn js-target-branch-dropdown', dropdown_class: 'git-revision-dropdown', title: _("Select target branch"), filter: true, placeholder: s_("OfSearchInADropdown|Filter"), data: { data: @project.repository.branch_names, default_branch: @project.default_branch } } )
2017-05-07 18:35:56 -04:00
= f.text_field :ref, value: @schedule.ref, id: 'schedule_ref', class: 'hidden', name: 'schedule[ref]', required: true
2017-06-19 11:59:10 -04:00
.form-group
.col-md-9
%label.label-light
2017-07-04 20:13:33 -04:00
#{ s_('PipelineSchedules|Variables') }
2017-07-06 12:33:18 -04:00
%ul.js-pipeline-variable-list.pipeline-variable-list
- @schedule.variables.each do |variable|
= render 'variable_row', id: variable.id, key: variable.key, value: variable.value
= render 'variable_row'
2017-05-07 18:35:56 -04:00
.form-group
2017-05-12 21:15:27 -04:00
.col-md-9
2017-06-11 19:33:28 -04:00
= f.label :active, s_('PipelineSchedules|Activated'), class: 'label-light'
2017-05-07 18:35:56 -04:00
%div
= f.check_box :active, required: false, value: @schedule.active?
2017-06-12 01:36:12 -04:00
= _('Active')
2017-05-07 18:35:56 -04:00
.footer-block.row-content-block
2017-06-07 09:46:10 -04:00
= f.submit _('Save pipeline schedule'), class: 'btn btn-create', tabindex: 3
= link_to _('Cancel'), pipeline_schedules_path(@project), class: 'btn btn-cancel'