aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin@lenny.robin>2011-07-08 13:28:46 +0100
committerRobin Houston <robin@lenny.robin>2011-07-08 13:28:46 +0100
commitb5370569d4bcdb83daa1a2ee7c0263771ca85ef7 (patch)
tree1b5d3a0fa04f18d312abc8b5c45948b888bbe4a7
parent627947caa928d269c53ef168eb9f71f132917750 (diff)
If there’s a unique guess as to the correct info request an incoming
message should be associated with, prepopulate the "move" form with it.
-rw-r--r--app/views/admin_request/_incoming_message_actions.rhtml6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/admin_request/_incoming_message_actions.rhtml b/app/views/admin_request/_incoming_message_actions.rhtml
index e31b4e97a..c23b4060a 100644
--- a/app/views/admin_request/_incoming_message_actions.rhtml
+++ b/app/views/admin_request/_incoming_message_actions.rhtml
@@ -1,7 +1,11 @@
<% form_tag '../redeliver_incoming' do %>
<div>
id or url_title of request:
- <%= text_field_tag 'url_title', "", { :size => 20 } %>
+ <% if @info_requests && @info_requests.size == 1 %>
+ <%= text_field_tag 'url_title', @info_requests[0].url_title, { :size => 20 } %>
+ <% else %>
+ <%= text_field_tag 'url_title', "", { :size => 20 } %>
+ <% end %>
<%= hidden_field_tag 'redeliver_incoming_message_id', incoming_message.id %>
<%= submit_tag "Redeliver to another request" %>
</div>