{% extends 'TopxiaWebBundle:Group:setting-layout.html.twig' %}

{% set script_controller = 'group/group_logo' %}

{% block title %}{{groupinfo.title}}小组 - {{ parent() }}{% endblock %}

{% set settingNav = 'logo' %}

{% block group_setting_body %}

  <form id="group-avatar-form" class="form-horizontal" method="post" enctype="multipart/form-data" action="{{path ('group_logo_set',{id:id})}}">
  
  <div class="form-group">
    <label class="col-md-2 control-label">当前图标</label>
    <div class="controls col-md-8 controls">
      <img src="{{ file_path(logo, 'group.png')}}">
    </div>
  </div>
  <div class="form-group">
    <div class="col-md-2 control-label">
      <label for="form_avatar" class="required">新图标 </label>
    </div>
    <div class="controls col-md-8 controls">
      <input type="file" id="form_avatar" name="form[avatar]" required="required" accept="image/gif,image/jpeg,image/png" />
      <p class="help-block">你可以上传JPG、GIF或PNG格式的文件，文件大小不能超过<strong>{{ upload_max_filesize() }}</strong>。推荐大小（180*180）</p>
    </div>
  </div>
  <div class="form-group">
    <div class="col-md-2 control-label"></div>
    <div class="controls col-md-8 controls">
      
      <button id="group-save-btn" data-submiting-text="正在上传" type="submit" class="btn btn-primary">上传</button>
      
      <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    </div>
  </div>
</form>


  {% endblock %}