diff options
Diffstat (limited to 'app/views/shared/web_hooks/_form.html.haml')
-rw-r--r-- | app/views/shared/web_hooks/_form.html.haml | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/app/views/shared/web_hooks/_form.html.haml b/app/views/shared/web_hooks/_form.html.haml index c95e63bdc83..ecb736dac4f 100644 --- a/app/views/shared/web_hooks/_form.html.haml +++ b/app/views/shared/web_hooks/_form.html.haml @@ -10,21 +10,25 @@ = s_('Webhooks|URL must be percent-encoded if it contains one or more special characters.') .form-group = form.label :token, s_('Webhooks|Secret token'), class: 'label-bold' - = form.text_field :token, class: 'form-control gl-form-input', placeholder: '' + = form.password_field :token, value: hook.masked_token, autocomplete: 'new-password', class: 'form-control gl-form-input' %p.form-text.text-muted - code_start = '<code>'.html_safe - code_end = '</code>'.html_safe - = s_('Webhooks|Used to validate received payloads. Sent with the request in the %{code_start}X-Gitlab-Token HTTP%{code_end} header.').html_safe % { code_start: code_start, code_end: code_end } + = s_('Webhooks|Used to validate received payloads. Sent with the request in the %{code_start}X-Gitlab-Token%{code_end} HTTP header.').html_safe % { code_start: code_start, code_end: code_end } .form-group = form.label :url, s_('Webhooks|Trigger'), class: 'label-bold' %ul.list-unstyled %li.gl-pb-5 - = form.gitlab_ui_checkbox_component :push_events, s_('Webhooks|Push events') - .gl-pl-6 - = form.text_field :push_events_branch_filter, class: 'form-control gl-form-input', - placeholder: 'Branch name or wildcard pattern to trigger on (leave blank for all)' - %p.form-text.text-muted.custom-control - = s_('Webhooks|Push to the repository.') + - if Feature.enabled?(:enhanced_webhook_support_regex) + - is_new_hook = hook.id.nil? + .js-vue-push-events{ data: { push_events: hook.push_events.to_s, strategy: hook.branch_filter_strategy, is_new_hook: is_new_hook.to_s, push_events_branch_filter: hook.push_events_branch_filter } } + - else + = form.gitlab_ui_checkbox_component :push_events, s_('Webhooks|Push events') + .gl-pl-6 + = form.text_field :push_events_branch_filter, class: 'form-control gl-form-input', + placeholder: 'Branch name or wildcard pattern to trigger on (leave blank for all)' + %p.form-text.text-muted.custom-control + = s_('Webhooks|Push to the repository.') %li.gl-pb-5 = form.gitlab_ui_checkbox_component :tag_push_events, s_('Webhooks|Tag push events'), |