Skip to content

Commit

Permalink
Auto-focus on Agent Type when creating an agent
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Nov 9, 2016
1 parent 486246e commit 74077b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/agents/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% if @agent.new_record? %>
<div class="form-group type-select">
<%= f.label :type %>
<%= f.select :type, options_for_select([['Select an Agent Type', 'Agent', {title: ''}]] + Agent.types.map {|type| [agent_type_to_human(type.name), type, {title: h(Agent.build_for_type(type.name,current_user,{}).html_description.lines.first.strip)}] }, @agent.type), {}, :class => 'form-control' %>
<%= f.select :type, options_for_select([['Select an Agent Type', 'Agent', {title: ''}]] + Agent.types.map {|type| [agent_type_to_human(type.name), type, {title: h(Agent.build_for_type(type.name,current_user,{}).html_description.lines.first.strip)}] }, @agent.type), {}, class: 'form-control', autofocus: true %>
</div>
<% end %>
</div>
Expand Down

0 comments on commit 74077b0

Please sign in to comment.