.box-body
= form_for @definition, html: { role: 'form' } do |form|
.row.form-group
.col-md-4
= form.label :name
= form.text_field :name, class: 'form-control'
.form-group
= form.label :description
= form.text_area :description, class: 'form-control', rows: 10
.form-group
label Administrators
- if @definition.new_record?
ul.media-list
li.media
span.pull-left
img.img-rounded src="#{current_user.image}" height='20' width='20'
.media-body
= current_user.name
- else
= collection_select(:admin_assignments, :user_id, Kuroko2::User.active.order(:name).all, :id, :name,
{ selected: @definition.admins.map(&:id), include_blank: false },
{ multiple: true, class: 'form-control' })
.form-group
= form.label :script
= form.text_area :script, class: 'form-control script-input', rows: 6
.checkbox
label
= form.check_box :api_allowed
' Allow API execution of this job
label Notification
.form-group
= form.text_field :hipchat_room, class: 'form-control', placeholder: 'Hipchat Room name'
.form-group
= form.text_field :slack_channel, class: 'form-control', placeholder: '#slack-channel'
.checkbox
label
= form.check_box :hipchat_notify_finished
' Notify success event to Slack/Hipchat
.checkbox
label
= form.check_box :notify_cancellation
' Notify administrators when the job is cancelled by system.
.form-group
label for='hipchat_additional_text'
'Failure notification text
= form.text_field :hipchat_additional_text, class: 'form-control', placeholder: '@YourName @your-name'
.form-group
label Next Job Execution
.radio
label
= form.radio_button :prevent_multi, 0
' Always launch next job (allow parallel execution)
.radio
label
= form.radio_button :prevent_multi, 1
' Prevent if current job is WORKING or ERROR
.radio
label
= form.radio_button :prevent_multi, 2
' Prevent if current job is WORKING
.radio
label
= form.radio_button :prevent_multi, 3
' Prevent if current job is ERROR
.form-group
label Job Scheduling
.radio
label
= form.radio_button :suspended, false
b> Active:
' the job will be scheduled to run.
.radio
label
= form.radio_button :suspended, true
b> Suspend:
' the job will NOT be scheduled to run.
.form-group
label Tags
.form-group
= form.text_field :text_tags, class: 'form-control', placeholder: 'Tag1,Tag2,Tag3'
.box-footer
.row
.col-md-3.col-md-offset-9
= form.submit class: 'btn btn-default btn-block'