Commit 820be11446a5f59bc74f71202437aad61498f0ca
Committed by
Paulo Meireles
1 parent
b1db3b99
Exists in
master
and in
22 other branches
[Mezuro] Warning user that changing project configuration may lose data.
Showing
1 changed file
with
7 additions
and
2 deletions
Show diff stats
plugins/mezuro/views/cms/mezuro_plugin/_project_content.html.erb
| ... | ... | @@ -38,8 +38,13 @@ |
| 38 | 38 | |
| 39 | 39 | <% @selected = (@project.nil? ? @configuration_names[0] : @project.configuration_name) %> |
| 40 | 40 | |
| 41 | -<%= required labelled_form_field _('Configuration'), | |
| 42 | - f.select(:configuration_name, @configuration_names, {:selected => @selected}) %><br/> | |
| 41 | +<% if !@project.nil? && !@article.id.nil? %> | |
| 42 | + <%= required labelled_form_field _('Configuration') + " (Changing the configuration will erase your saved periodic avaliations)", | |
| 43 | + f.select(:configuration_name, @configuration_names, {:selected => @selected}) %> | |
| 44 | +<% else %> | |
| 45 | + <%= required labelled_form_field _('Configuration'), | |
| 46 | + f.select(:configuration_name, @configuration_names, {:selected => @selected}) %><br/> | |
| 47 | +<% end %> | |
| 43 | 48 | |
| 44 | 49 | <% selected = (@project.nil? ? 0 : @project.process_period.to_i) %> |
| 45 | 50 | <%= required labelled_form_field _('Periodic Avaliation'), | ... | ... |