{% extends 'TopxiaWebBundle::bootstrap-modal-layout.html.twig' %}

{% block title %}发送私信{% endblock %}

{% block body %}
  <form id="message-create-form" class="form-horizontal" method="post" action="{{ path('message_create', {toId:userId}) }}">

    <div class="form-group">
      <div class="col-md-2 control-label">
        <label for="message_receiver">收件人</label>
      </div>
      <div class="col-md-10 controls">
        <input type="text" id="message_receiver" name="message_receiver" value={{receiver.truename}} class="form-control" readonly="readonly">
      </div>
    </div>


    <div class="form-group">
      <div class="col-md-2 control-label">
        <label for="message_content" class="required">内容</label>
      </div>
      <div class="col-md-10 controls">
        <textarea id="message_content" name="message_content" class="form-control" rows="5"></textarea>
      </div>
    </div>

    <div class="form-group">
      <div class="col-md-offset-2 col-md-10 controls">
        <button class="btn btn-primary" type="submit" data-submiting-text="正在发送" id="message-submit">发送</button>
      </div>
    </div>

    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  </form>

  <script> app.load('user/message-send-modal'); </script>
{% endblock %}

{% set hide_footer = true %}