diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-04-07 09:52:25 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-04-07 17:17:27 +0300 |
commit | 76c0364ca52ce0b777f2ddb277fe666d95392256 (patch) | |
tree | 8923dd63370e13a5c769a438c7769cc4120118f1 /app/views | |
parent | 2548c155eed13c806951a6303c85dbb0c5772ca3 (diff) |
Use allow_destroy. Remove condtion from form.haml.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/triggers/_form.html.haml | 7 |
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` |