Commit 395e34bd authored by Tim Zallmann's avatar Tim Zallmann

Changed the data for New Tag to a script block

parent 24d9142c
......@@ -250,7 +250,7 @@ import PerformanceBar from './performance_bar';
case 'projects:tags:new':
new ZenMode();
new gl.GLForm($('.tag-form'), true);
new RefSelectDropdown($('.js-branch-select'), window.gl.availableRefs);
new RefSelectDropdown($('.js-branch-select'), JSON.parse(document.getElementById('availableRefs').innerHTML));
break;
case 'projects:snippets:new':
case 'projects:snippets:edit':
......
......@@ -40,8 +40,4 @@
.form-actions
= button_tag 'Create tag', class: 'btn btn-create', tabindex: 3
= link_to 'Cancel', project_tags_path(@project), class: 'btn btn-cancel'
-# haml-lint:disable InlineJavaScript
:javascript
window.gl = window.gl || { };
window.gl.availableRefs = #{@project.repository.ref_names.to_json};
%script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment