<% form_tag({:action => 'edit'}) do %>

<div class="box tabular settings">
<p><label><%= l(:setting_app_title) %></label>
<%= text_field_tag 'settings[app_title]', Setting.app_title, :size => 30 %></p>

<p><label><%= l(:setting_welcome_text) %></label>
<%= text_area_tag 'settings[welcome_text]', Setting.welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p>
<%= wikitoolbar_for 'settings[welcome_text]' %>

<p><label><%= l(:label_theme) %></label>
<%= select_tag 'settings[ui_theme]', options_for_select( ([[l(:label_default), '']] + Redmine::Themes.themes.collect {|t| [t.name, t.id]}), Setting.ui_theme) %></p>

<p><label><%= l(:setting_default_language) %></label>
<%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p>

<p><label><%= l(:setting_date_format) %></label>
<%= select_tag 'settings[date_format]', options_for_select( [[l(:label_language_based), '']] + Setting::DATE_FORMATS.collect {|f| [Date.today.strftime(f), f]}, Setting.date_format) %></p>

<p><label><%= l(:setting_time_format) %></label>
<%= select_tag 'settings[time_format]', options_for_select( [[l(:label_language_based), '']] + Setting::TIME_FORMATS.collect {|f| [Time.now.strftime(f), f]}, Setting.time_format) %></p>

<p><label><%= l(:setting_user_format) %></label>
<%= select_tag 'settings[user_format]', options_for_select( @options[:user_format], Setting.user_format.to_s ) %></p>

<p><label><%= l(:setting_attachment_max_size) %></label>
<%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %> KB</p>

<p><label><%= l(:setting_per_page_options) %></label>
<%= text_field_tag 'settings[per_page_options]', Setting.per_page_options_array.join(', '), :size => 20 %><br /><em><%= l(:text_comma_separated) %></em></p>

<p><label><%= l(:setting_host_name) %></label>
<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>

<p><label><%= l(:setting_protocol) %></label>
<%= select_tag 'settings[protocol]', options_for_select(['http', 'https'], Setting.protocol) %></p>

<p><label><%= l(:setting_text_formatting) %></label>
<%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %></p>

<p><label><%= l(:setting_wiki_compression) %></label>
<%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>

<p><label><%= l(:setting_feeds_limit) %></label>
<%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
</div>

<%= submit_tag l(:button_save) %>
<% end %>
