diff options
author | Bryce Johnson <bryce@gitlab.com> | 2017-05-19 20:33:03 +0300 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2017-05-22 20:56:13 +0300 |
commit | a25fb529167f773a634f6034533c24513b15157f (patch) | |
tree | f48bf6ae2b3586ed837c34640647045b0a580270 /app/views/shared | |
parent | 18a6d9c5326bc2b90a1f0cc8664d638a39885924 (diff) |
Upgrade Remove Source Branch checkbox UX.
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/issuable/form/_merge_params.html.haml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/views/shared/issuable/form/_merge_params.html.haml b/app/views/shared/issuable/form/_merge_params.html.haml index d23f79be2be..271150ed318 100644 --- a/app/views/shared/issuable/form/_merge_params.html.haml +++ b/app/views/shared/issuable/form/_merge_params.html.haml @@ -5,3 +5,13 @@ -# This check is duplicated below, to avoid conflicts with EE. - return unless issuable.can_remove_source_branch?(current_user) + +.form-group + .col-sm-10.col-sm-offset-2 + - if issuable.can_remove_source_branch?(current_user) + .checkbox + - initial_checkbox_value = issuable.merge_params.key?('force_remove_source_branch') ? issuable.force_remove_source_branch? : true + = label_tag 'merge_request[force_remove_source_branch]' do + = hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil + = check_box_tag 'merge_request[force_remove_source_branch]', '1', initial_checkbox_value + Remove source branch when merge request is accepted. |