<div id="modal_add_child_node" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <%= simple_form_for Node.new(parent_id: @node.id), html: {class: 'form-horizontal'} do |f| %>
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Add subnode</h3>
  </div>
  <div class="modal-body">
    <p>You are adding a child to the <strong><%= @node.label %></strong> node.</p>
    <%= f.hidden_field :parent_id %>
    <%= f.input :label %>
    <%= f.input :type_id, collection: [["Default", Node::Types::DEFAULT], ["Host", Node::Types::HOST]], include_blank: false %>
  </div>
  <div class="modal-footer">
    <button class="btn btn-primary">Add</button>
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
  </div>
  <% end %>
</div>