Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-04-07 09:52:25 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-04-07 17:17:27 +0300
commit76c0364ca52ce0b777f2ddb277fe666d95392256 (patch)
tree8923dd63370e13a5c769a438c7769cc4120118f1 /app/views
parent2548c155eed13c806951a6303c85dbb0c5772ca3 (diff)
Use allow_destroy. Remove condtion from form.haml.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/triggers/_form.html.haml7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/views/projects/triggers/_form.html.haml b/app/views/projects/triggers/_form.html.haml
index 169f6c43225..c56ee3a1130 100644
--- a/app/views/projects/triggers/_form.html.haml
+++ b/app/views/projects/triggers/_form.html.haml
@@ -18,13 +18,10 @@
.form-group
= f.label :ref, "Ref (For scheduled trigger)", class: "label-light"
= f.text_field :ref, class: "form-control", title: 'Trigger Schedule Ref is required.', placeholder: "master"
- - if action_name == 'edit'
- = f.hidden_field :trigger_schedule_on, :value => @trigger.trigger_schedule.present? ? 1 : 0
- - else
.form-group
.checkbox
- = f.label :trigger_schedule_on do
- = f.check_box :trigger_schedule_on
+ = schedule_fields.label :_destroy do
+ = schedule_fields.check_box :_destroy, { checked: (@trigger.trigger_schedule.id.present?) }, 0, 1
%strong Register as scheduled trigger
.help-block
If checked, this trigger will be executed periodically according to `cron`, `cron_timezone` and `ref`