diff --git a/app/views/spree/admin/mail_methods/_form.html.erb b/app/views/spree/admin/mail_methods/_form.html.erb new file mode 100644 index 0000000000..f9062582df --- /dev/null +++ b/app/views/spree/admin/mail_methods/_form.html.erb @@ -0,0 +1,76 @@ +
+
+ +
+
+ <%= Spree.t(:general) %> + +
+ <%= preference_field_tag("enable_mail_delivery", Spree::Config[:enable_mail_delivery], :type => :boolean) %> + <%= label_tag :enable_mail_delivery, Spree.t(:enable_mail_delivery) %> +
+ +
+ <%= label_tag :mails_from, Spree.t(:send_mails_as) %>
+ <%= text_field_tag :mails_from, Spree::Config[:mails_from], :maxlength => 256, :class => 'fullwidth' %> +
+ + <%= Spree.t(:smtp_send_all_emails_as_from_following_address) %> + +
+ +
+ <%= label_tag :mail_bcc, Spree.t(:send_copy_of_all_mails_to) %>
+ <%= text_field_tag :mail_bcc, Spree::Config[:mail_bcc], :maxlength => 256, :class => 'fullwidth' %> +
+ + <%= Spree.t(:smtp_send_copy_to_this_addresses) %> + +
+ +
+ <%= label_tag :intercept_email, Spree.t(:intercept_email_address) %>
+ <%= text_field_tag :intercept_email, Spree::Config[:intercept_email], :maxlength => 256, :class => 'fullwidth' %> +
+ + <%= Spree.t(:intercept_email_instructions) %> + +
+
+
+ +
+
+ <%= Spree.t(:smtp) %> +
+ <%= label_tag :mail_domain, Spree.t(:smtp_domain) %>
+ <%= text_field_tag :mail_domain, Spree::Config[:mail_domain], :class => 'fullwidth' %> +
+
+ <%= label_tag :mail_host, Spree.t(:smtp_mail_host) %>
+ <%= text_field_tag :mail_host, Spree::Config[:mail_host], :class => 'fullwidth' %> +
+
+ <%= label_tag :mail_port, Spree.t(:smtp_port) %>
+ <%= text_field_tag :mail_port, Spree::Config[:mail_port], :class => 'fullwidth' %> +
+
+ <%= label_tag :secure_connection_type, Spree.t(:secure_connection_type) %>
+ <%= select_tag(:secure_connection_type, options_from_collection_for_select(Spree::Core::MailSettings::SECURE_CONNECTION_TYPES.map{|w| Spree.t(w.downcase.to_sym, :default => w)}, :to_s, :to_s, Spree::Config[:secure_connection_type]), :class => 'select2 fullwidth') %> +
+
+ <%= label_tag :mail_auth_type, Spree.t(:smtp_authentication_type) %>
+ <%= select_tag(:mail_auth_type, options_from_collection_for_select(Spree::Core::MailSettings::MAIL_AUTH.map{|w| Spree.t(w.downcase.to_sym, :default => w)}, :to_s, :to_s, Spree::Config[:mail_auth_type]), :class => 'select2 fullwidth') %> +
+
+ <%= label_tag :smtp_username, Spree.t(:smtp_username) %>
+ <%= text_field_tag :smtp_username, Spree::Config[:smtp_username], :class => 'fullwidth' %> +
+
+ <%= label_tag :preferred_smtp_password, Spree.t(:smtp_password) %>
+ <%= password_field_tag :smtp_password, Spree::Config[:smtp_password], :class => 'fullwidth' %> +
+
+
+
+
diff --git a/app/views/spree/admin/mail_methods/edit.html.erb b/app/views/spree/admin/mail_methods/edit.html.erb new file mode 100644 index 0000000000..9519360d9f --- /dev/null +++ b/app/views/spree/admin/mail_methods/edit.html.erb @@ -0,0 +1,21 @@ +<%= render :partial => 'spree/admin/shared/configuration_menu' %> + +<% content_for :page_title do %> + <%= Spree.t(:mail_method_settings) %> +<% end %> + +<% content_for :page_actions do %> +
  • + <%= link_to_with_icon 'icon-envelope-alt', Spree.t('admin.mail_methods.send_testmail'), testmail_admin_mail_method_path, + :method => :post, :title => Spree.t('admin.mail_methods.send_testmail'), :class => 'send_mail button no-text' %> +
  • +<% end %> + +<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @mail_method } %> + +<%= form_tag admin_mail_method_path, :method => :put do |f| %> +
    + <%= render :partial => 'form', :locals => { :f => f } %> +
    <%= button Spree.t('actions.update'), 'icon-refresh' %>
    +
    +<% end %>