From 9216f29bc9781a09cef02a15072f554aab582a31 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 9 May 2012 12:19:32 +0800 Subject: [PATCH] Ray's changes for mail settings --- app/views/admin/sites/mail_setting.html.erb | 74 ++++++++++++++++++--- config/locales/en.yml | 8 +++ 2 files changed, 72 insertions(+), 10 deletions(-) diff --git a/app/views/admin/sites/mail_setting.html.erb b/app/views/admin/sites/mail_setting.html.erb index 5c94e174..71c99bf7 100644 --- a/app/views/admin/sites/mail_setting.html.erb +++ b/app/views/admin/sites/mail_setting.html.erb @@ -4,16 +4,70 @@
<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %> - <%= f.fields_for :site_settings, @site['site_settings'] do |f| %> - address: <%= f.text_field :address, :value => @site['site_settings']['address'] %> - port: <%= f.text_field :port, :value => @site['site_settings']['port'] %> - domain: <%= f.text_field :domain, :value => @site['site_settings']['domain'] %> - authentication: <%= f.text_field :authentication, :value => @site['site_settings']['authentication'] %> - user_name: <%= f.text_field :user_name, :value => @site['site_settings']['user_name'] %> - password: <%= f.text_field :password, :value => @site['site_settings']['password'] %> - tls: <%= f.check_box :tls, :checked => @site['site_settings']['tls'].eql?('1') %> - enable_starttls_auto: <%= f.check_box 'enable_starttls_auto', :checked => @site['site_settings']['enable_starttls_auto'].eql?('1') %> - <% end %> +
+
+ <%= f.fields_for :site_settings, @site['site_settings'] do |f| %> +
+
+ +
+ <%= f.text_field :address, :value => (@site['site_settings']['address'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :domain, :value => (@site['site_settings']['domain'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :authentication, :value => (@site['site_settings']['authentication'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :user_name, :value => (@site['site_settings']['user_name'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.text_field :password, :value => (@site['site_settings']['password'] rescue nil) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.check_box :tls, :checked => (@site['site_settings']['tls'].eql?('1') rescue false) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ <%= f.check_box 'enable_starttls_auto', :checked => (@site['site_settings']['enable_starttls_auto'].eql?('1') rescue false) %> +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ <% end %> +
+
<%= f.submit t("submit"), :class => "btn btn-primary" %> <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8be24e7f..d8b9a060 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -207,6 +207,14 @@ en: site_settings: Site Setting site_sub_menu: Site sub-menu site_title: Site title + mail_address: Address + mail_port: Port + mail_domain: Domain + mail_authentication: Authentication + mail_user_name: User Name + mail_password: Password + mail_tls: Tls + mail_enable_starttls_auto: Enable Starttls Auto super_pages: Super pages structure: Structure title: Title