Revision f4c209f1
Added by Dmitri Dolguikh about 8 years ago
app/views/containers/steps/image.html.erb | ||
---|---|---|
3 | 3 |
|
4 | 4 |
<%= render :layout => 'title', :locals => { :step => 2 } do %> |
5 | 5 |
<ul class="nav nav-tabs" data-tabs="tabs"> |
6 |
<li class="active"><a href="#hub" data-toggle="tab" id="hub_tab">
|
|
6 |
<li class=<%= ("active" if @docker_container_wizard_states_image.registry_id.nil?) %>><a href="#hub" data-toggle="tab" id="hub_tab">
|
|
7 | 7 |
<span class="glyphicon glyphicon-cloud-download"></span> |
8 | 8 |
<%= _("Docker hub") %> |
9 | 9 |
</a></li> |
10 |
<li><a href="#registry" data-toggle="tab" id="registry_tab"> |
|
10 |
<li class=<%= ("active" unless @docker_container_wizard_states_image.registry_id.nil?) %>><a href="#registry" data-toggle="tab" id="registry_tab">
|
|
11 | 11 |
<span class="glyphicon glyphicon-cloud-download"></span> |
12 | 12 |
<%= _("External registry") %> |
13 | 13 |
</a></li> |
14 | 14 |
</ul> |
15 | 15 |
|
16 |
<%= form_for @image, :class => 'form-horizontal', :url => wizard_path, :method => :put do |f| %> |
|
16 |
<%= form_for @docker_container_wizard_states_image, :class => 'form-horizontal', :url => wizard_path, :method => :put do |f| %>
|
|
17 | 17 |
<div class="tab-content"> |
18 |
<div class="tab-pane active" id="hub"> |
|
19 |
</div> |
|
20 |
<div class="tab-pane" id="registry"> |
|
18 |
<% if @docker_container_wizard_states_image.registry_id.nil? %> |
|
19 |
<div class="tab-pane active" id="hub"> |
|
20 |
</div> |
|
21 |
<div class="tab-pane" id="registry"> |
|
22 |
<% else %> |
|
23 |
<div class="tab-pane" id="hub"> |
|
24 |
</div> |
|
25 |
<div class="tab-pane active" id="registry"> |
|
26 |
<% end %> |
|
21 | 27 |
<div class="input-group col-md-6"> |
22 | 28 |
<%= select_registry f %> |
23 | 29 |
</div> |
... | ... | |
28 | 34 |
<div class="input-group"> |
29 | 35 |
|
30 | 36 |
<%= auto_complete_docker_search('docker_container_wizard_states_image[repository_name]', '', |
31 |
:'data-url' => auto_complete_repository_name_image_search_path(@image.compute_resource_id), |
|
37 |
:'data-url' => auto_complete_repository_name_image_search_path(@docker_container_wizard_states_image.compute_resource_id),
|
|
32 | 38 |
:value => f.object.repository_name.present? ? f.object.repository_name : '', |
33 | 39 |
:id => :search, |
34 | 40 |
:focus_on_load => true, |
... | ... | |
38 | 44 |
<%= button_tag(:class => 'btn btn-default', |
39 | 45 |
:type => 'button', |
40 | 46 |
:id => 'search_repository', |
41 |
:'data-url' => search_repository_image_search_path(@image.compute_resource_id), |
|
47 |
:'data-url' => search_repository_image_search_path(@docker_container_wizard_states_image.compute_resource_id),
|
|
42 | 48 |
:onclick => 'searchRepo(this)') do %> |
43 | 49 |
<span class="glyphicon glyphicon-search"></span> |
44 | 50 |
<% end %> |
... | ... | |
47 | 53 |
</div> |
48 | 54 |
<%= text_f f, :tag, |
49 | 55 |
:id => 'tag', |
50 |
:'data-url' => auto_complete_image_tag_image_search_path(@image.compute_resource_id) %> |
|
56 |
:'data-url' => auto_complete_image_tag_image_search_path(@docker_container_wizard_states_image.compute_resource_id) %>
|
|
51 | 57 |
<div class="col-md-12"> |
52 | 58 |
<div id='searching_spinner' class='col-md-offset-3 hide'> |
53 | 59 |
<span id='waiting_text'> |
Also available in: Unified diff
fixes #9004: wizard moves correctly between persisted states now