

<div class="modal-dialog modal-lg">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      <h4 class="modal-title">头像设置</h4>
    </div>
    <div class="modal-body">

    <form id="avatar-crop-form" method="post" action="{{ path('admin_user_avatar_crop', {id:user.id, filename:filename}) }}" enctype="multipart/form-data">
     
      <div class="form-group clearfix">
        <div class="col-md-offset-2 col-md-8 controls">
          <img src="{{ file_url(pictureUrl) }}" id="avatar-crop" width="{{scaledSize.width}}" height="{{scaledSize.height}}" data-natural-width="{{ naturalSize.width }}" data-natural-height="{{ naturalSize.height }}" />
          <div class="help-block">提示：请选择图片裁剪区域。</div>
        </div>
      </div>

      <div class="form-group clearfix">
        <div class="col-md-offset-2 col-md-8 controls">
          <input type="hidden" name="x">
          <input type="hidden" name="y">
          <input type="hidden" name="width">
          <input type="hidden" name="height">
          <a class="btn btn-fat btn-primary" id="upload-picture-btn" data-goto="{{ path('admin_user_avatar', {id: user.id}) }}">保存</a>
        </div>
      </div>

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



</div>
          <div class="modal-footer">  <button type="button" class="btn btn-link pull-right" data-dismiss="modal">关闭</button>
  <script>app.load('user/avatar-crop-modal')</script>
</div>
      </div>
</div>
