Commit 3d1e7d493cdaf39bd2b927d765620a74fad97260

Authored by João M. M. da Silva
Committed by Paulo Meireles
1 parent bc84b9cc

[Mezuro] Changed order of configurations to clone in configuration cms

view.
plugins/mezuro/lib/mezuro_plugin/configuration_content.rb
... ... @@ -43,7 +43,6 @@ class MezuroPlugin::ConfigurationContent < Article
43 43 rescue Exception => exception
44 44 errors.add_to_base(exception.message)
45 45 end
46   - all_names_and_ids[-1] = "None"
47 46 all_names_and_ids
48 47 end
49 48  
... ...
plugins/mezuro/views/cms/mezuro_plugin/_configuration_content.html.erb
... ... @@ -2,7 +2,7 @@
2 2  
3 3 <%
4 4 kalibro_configuration = @article.title.nil? ? nil : @article.kalibro_configuration
5   - kalibro_configuration_names = @article.configuration_names_and_ids.values
  5 + kalibro_configuration_names = ["None"] + @article.configuration_names_and_ids.values.sort
6 6 %>
7 7  
8 8 <%= error_messages_for 'kalibro_configuration' %>
... ... @@ -14,12 +14,13 @@
14 14  
15 15 <%= required_fields_message %>
16 16  
  17 +<%= required f.text_field(:name) %>
  18 +
  19 +<%= f.text_field :description %><br/>
  20 +
17 21 <%= if kalibro_configuration.nil?
18 22 required labelled_form_field _('Clone Configuration'),
19 23 f.select(:configuration_to_clone_name, kalibro_configuration_names)
20 24 end %>
21 25 <br/>
22 26  
23   -<%= required f.text_field(:name) %>
24   -
25   -<%= f.text_field :description %><br/>
... ...