{% if setting('default.defaultCoursePicture') %}
  <div class="form-group" id="course-picture-class">
    <div class="col-md-8 control-label"><b>自定义默认课程图片</b></div>
    <form id="course-picture-form" method="post" action="{{ path('admin_setting_default_course_picture') }}" enctype="multipart/form-data">
      <div class="controls col-md-8 controls">
        <img src="{{ system_default_path('coursePicture', 'true' ) }}">
      </div>

      <div class="form-group">
        <div class="col-md-2 control-label"></div>
          <div class="controls col-md-8 controls">
            <input id="course-picture-field" type="file" name="picture" accept="image/gif,image/jpeg,image/png">
            <p class="help-block">你可以上传jpg, gif, png格式的文件, 图片建议尺寸至少为480x270。</p>
          </div>
      </div>

      <div class="form-group">
        <div class="col-md-2 control-label"></div>
        <div class="controls col-md-8 controls">      
          <button type="submit" class="btn btn-default btn-sm">上传</button>
        </div>
      </div>
      <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    </form>
  </div>

  <div class="form-group" id="system-course-picture-class" style="display:none;">
    <div class="col-md-8 control-label"><b>系统默认课程图片</b></div>
      <div class="controls col-md-8 controls">
        <img src="{{ system_default_path('coursePicture', '' ) }}">
      </div>
  </div>

{% else %}

  <div class="form-group" id="course-picture-class" style="display:none;">
    <div class="col-md-8 control-label"><b>自定义默认课程图片</b></div>
    <form id="course-picture-form" method="post" action="{{ path('admin_setting_default_course_picture') }}" enctype="multipart/form-data">
      <div class="controls col-md-8 controls">
        <img src="{{ system_default_path('coursePicture', 'true' ) }}">
      </div>

      <div class="form-group">
        <div class="col-md-2 control-label"></div>
          <div class="controls col-md-8 controls">
            <input id="course-picture-field" type="file" name="picture" accept="image/gif,image/jpeg,image/png">
            <p class="help-block">你可以上传jpg, gif, png格式的文件, 图片建议尺寸至少为480x270。</p>
          </div>
      </div>

      <div class="form-group">
        <div class="col-md-2 control-label"></div>
        <div class="controls col-md-8 controls">      
          <button type="submit" class="btn btn-default btn-sm">上传</button>
        </div>
      </div>
      <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    </form>
  </div>

  <div class="form-group" id="system-course-picture-class">
    <div class="col-md-8 control-label"><b>系统默认课程图片</b></div>
      <div class="controls col-md-8 controls">
        <img src="{{ system_default_path('coursePicture', '' ) }}">
      </div>
  </div>

{% endif %}