diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-06-15 21:47:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-06-15 21:47:22 +0000 |
commit | 95f7471e9c786a7cf5700f6b078ed62ca0cf264e (patch) | |
tree | 6edc607d2cfafe012a28d404cbe1a74f10efb40c /app | |
parent | 3ae42cb32617670cb6c99a60f5cda2cf961d110c (diff) | |
download | redmine-95f7471e9c786a7cf5700f6b078ed62ca0cf264e.tar.gz redmine-95f7471e9c786a7cf5700f6b078ed62ca0cf264e.zip |
Adds a form to manually submit an email to the mail handler.
Use GET /mail_handler?key= to get the form.
git-svn-id: http://svn.redmine.org/redmine/trunk@14314 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/mail_handler_controller.rb | 4 | ||||
-rw-r--r-- | app/views/mail_handler/new.html.erb | 43 |
2 files changed, 47 insertions, 0 deletions
diff --git a/app/controllers/mail_handler_controller.rb b/app/controllers/mail_handler_controller.rb index 11cf40009..53d37ae7d 100644 --- a/app/controllers/mail_handler_controller.rb +++ b/app/controllers/mail_handler_controller.rb @@ -18,6 +18,10 @@ class MailHandlerController < ActionController::Base before_filter :check_credential + # Displays the email submission form + def new + end + # Submits an incoming email to MailHandler def index options = params.dup diff --git a/app/views/mail_handler/new.html.erb b/app/views/mail_handler/new.html.erb new file mode 100644 index 000000000..a9d069650 --- /dev/null +++ b/app/views/mail_handler/new.html.erb @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8" /> +<style> + label {display:block;margin:0.5em;} +</style> +</head> +<body> +<h1>Redmine Mail Handler</h1> + +<%= form_tag({}, :multipart => true, :action => 'post') do %> + <%= hidden_field_tag 'key', params[:key] %> + + <fieldset> + <legend>Raw Email</legend> + <%= text_area_tag 'email', '', :style => 'width:95%; height:400px;' %></label> + </fieldset> + + <fieldset> + <legend>Options</legend> + <label>unknown_user: <%= select_tag 'unknown_user', options_for_select(['', 'ignore', 'accept', 'create']) %></label> + <label>default_group: <%= text_field_tag 'default_group' %></label> + <label>no_account_notice: <%= check_box_tag 'no_account_notice', 1 %></label> + <label>no_notification: <%= check_box_tag 'no_notification', 1 %></label> + <label>no_permission_check: <%= check_box_tag 'no_permission_check', 1 %></label> + </fieldset> + + <fieldset> + <legend>Issue attributes options</legend> + <label>project: <%= text_field_tag 'issue[project]' %></label> + <label>status: <%= text_field_tag 'issue[status]' %></label> + <label>tracker: <%= text_field_tag 'issue[tracker]' %></label> + <label>category: <%= text_field_tag 'issue[category]' %></label> + <label>priority: <%= text_field_tag 'issue[priority]' %></label> + <label>private: <%= check_box_tag 'issue[private]', 1 %></label> + <label>allow_override: <%= text_field_tag 'allow_override' %></label> + </fieldset> + + <p><%= submit_tag 'Submit Email' %></p> +<% end %> +</body> +</html> |