{% extends 'activity/activity-form-layout.html.twig' %}

{% do script(['//service-cdn.qiqiuyun.net/js-sdk/uploader/sdk-v1.js', 'app/js/activity-manage/audio/index.js']) %}
{% block activity_content %}
  {% set mediaType = activity.mediaType|default('audio') %}
  {% set fileType = 'audio' %}
  <div class="form-group">
    <div class="col-sm-2 control-label">
      <label for="ext_mediaId" class="control-label-required">{{ '音频'|trans }}</label>
    </div>
    <div class="col-sm-10">
      {% include 'file-chooser/file-choose.html.twig'with {
        mediaType: mediaType,
        fileType:'audio',
        file: activity.ext.file|default(null),
        placeholder: '音频'
      } %}
      <input type="hidden" id="ext_mediaId" name="ext[mediaId]" value="{{ activity.ext.mediaId|default(null) }}">
    </div>
  </div>
  <div class="form-group for-video-type" id="lesson-length-form-group">
    <div class="col-sm-2 control-label for-video-type">
      <label for="second" class="control-label-required">{{ '音频时长'|trans }}</label>
    </div>
    <div class="col-sm-10">
      <input id="mediaId" class="form-control" type="hidden" name="mediaId" value={{ activity.mediaId|default(null) }}>
      <input class="form-control width-150 js-length mrs" id="minute" type="text" name="minute" value="{{ activity.minute|default(null) }}">{{ '分'|trans }}
      <input class="form-control width-150 js-length mhs" id="second" type="text" name="second" value="{{ activity.second|default(null) }}" >{{ '秒'|trans }}
      <input type="hidden" id="length" name="length" value="{{ activity.length|default(null) }}">
    </div>
  </div>
{% endblock %}
{% block activity_finish %}
  <div class=" form-group">
    <div class="col-sm-2 control-label">
      <label>{{ '完成条件'|trans }}</label>
    </div>
    <div class="col-sm-4 form-control-static">
      听完音频
      <input type="hidden" id="finish-condition" name="condition">
      {#<select id="finish-condition" name="condition" class="form-control">
        <option value="">听完音频</option>
      </select>#}
    </div>
  </div>
{% endblock %}