{% extends 'admin/layout.html.twig' %}

{% set menu = 'admin_cloud_consult_setting' %}

{% block main %}
  {{ web_macro.flash_messages() }}
  <div class="page-heading">
    云问答开关
  </div>
  <form class="form-horizontal" role="form" method="post" novalidate>
    <div class="form-group">
      <label for="" class="col-sm-3 control-label">启用云问答：</label>
      <div class="controls col-md-9 radios">
        <div class="form-group">
          <label>
            <input type="radio" name="cloud_consult_setting_enabled"
                   value="1" {% if cloud_consult.cloud_consult_is_buy and cloud_consult.cloud_consult_setting_enabled %} checked {% endif %} {% if not cloud_consult.cloud_consult_is_buy %} disabled{% endif %}> 开启
          </label>
          <label>
            <input type="radio" name="cloud_consult_setting_enabled"
                   value="0" {% if not cloud_consult.cloud_consult_is_buy or not cloud_consult.cloud_consult_setting_enabled %} checked {% endif %} {% if not cloud_consult.cloud_consult_is_buy %} disabled{% endif %}> 关闭
          </label>
        </div>
        <div class="help-block">
          {% if cloud_consult.cloud_consult_login_url | default('')%}
            <a href=" {{ cloud_consult.cloud_consult_login_url }} " target="_blank" class="btn btn-success">管理问答库</a>
            <br>
          {% endif %}
        </div>
        {% if  cloud_consult.cloud_consult_is_buy %}
          <div class="text-md mbl color-gray">
            智能在线咨询服务，可以自动回答学员的常见问题
            <br>
            即问即答，无需等待
            <br>
            整体提升客服效率80%，有效节省客户运营成本
            <br>
            24小时全天在线，365天全年无休
            <br>
            自动记录客户咨询数据，科学算法分析，挖掘优质客户
          </div>
        {% endif %}
      </div>
    </div>
    <div class="row form-group">
      <div class="controls col-md-offset-3 col-md-8">
          <button type="submit" class="btn btn-primary"{% if not cloud_consult.cloud_consult_is_buy %} disabled="disabled" {% endif %}>提交</button>
      </div>
    </div>
    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  </form>
{% endblock %}