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

{% set script_controller = 'setting/user-center' %}
{% set menu = 'admin_v2_setting_user_center' %}

{% block main %}

{% set user_center_name = mode == 'phpwind' ? 'WindID' : 'Ucenter' %}

<div class="page-header">
  <h1>{{'admin.admin_sync.content_title'|trans}}</h1>
</div>

{% if not bind %}

{{ web_macro.flash_messages() }}

<form class="form-horizontal with-discuz" method="post" novalidate id="sync-discuz-form">
  <div class="alert alert-info">
    {{'admin.admin_sync.tips'|trans({'%centerName%':user_center_name})|raw}}
  </div>

  <div class="row form-group">
    <div class="col-md-3 control-label"><label>{{ user_center_name }}{{'admin.admin_sync.username'|trans}}</label></div>
    <div class="controls col-md-8">
      <input class="form-control" name="nickname">
    </div>
  </div>

  <div class="row form-group">
    <div class="col-md-3 control-label"><label>{{ user_center_name }}{{'admin.admin_sync.password'|trans}}</label></div>
    <div class="controls col-md-8">
      <input type="password" class="form-control" name="password">
    </div>
  </div>

  <div class="row form-group">
    <div class="col-md-3 control-label"></div>
    <div class="controls col-md-8">
      <button type="submit" class="btn btn-primary">{{'admin.admin_sync.password'|trans}}</button>
      <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    </div>
  </div>

</form>

{% else %}
  <div class="alert alert-danger">{{'admin.admin_sync.sync_tips'|trans}}</div>

{% endif %}

{% endblock %}
