<link rel="stylesheet" type="text/css" href="engine/skins/chosen/chosen.css"/>
<script type="text/javascript" src="engine/skins/chosen/chosen.js"></script>
<script type="text/javascript">
$(function(){
    $("#category").chosen();
});
</script>

<div class="col-lg-12 my">

<div class="card">
  <div class="card-body">
    <h5 class="card-title">Добавить игру</h5>
    <a href="/rules/" class="btn btn-primary float-right"><span class="icon-shield"></span> Правила</a>
    <p class="card-text">Заполните все поля ниже. После проверки администрацией, ваша игра будет опубликована на главной странице. <br>Так же, ознакомьтесь с правилами публикации</p>
  </div>
</div>

<ul class="timeline">
  <li class="timeline-inverted">
      <div class="timeline-badge warning"></div>
        <div class="timeline-panel">
          <div class="timeline-body">
            <div class="input-group">
              <span class="input-group-addon">Заголовок</span>
              <input type="text" name="title" id="title" value="{title}" class="form-control" aria-label="title" required>
            </div>
          </div>
        </div>
  </li>
 
  <li class="timeline-inverted">
    <div class="timeline-badge warning"></div>
      <div class="timeline-panel">
        <div class="timeline-body">
          <div class="input-group">
            <span class="input-group-addon">URL адрес</span>
            <input type="text" name="alt_name" id="alt_name" value="{alt-name}" class="form-control">
          </div>
        </div>
      </div>
  </li>

  <li class="timeline-inverted">
    <div class="timeline-badge warning"></div>
      <div class="timeline-panel">
        <div class="timeline-body">
          <div class="input-group">
            <span class="input-group-addon">Ключевые слова</span>
            <input type="text" name="tags" id="tags" value="{tags}" maxlength="150" class="form-control" placeholder="Через запятую" aria-label="title" autocomplete="off">
          </div>
        </div>
      </div>
  </li>

  <li class="timeline-inverted">
    <div class="timeline-badge warning"></div>
      <div class="timeline-panel">
        <div class="timeline-body">
          <div class="row my">
            <div class="col-md-6 my">
              <h4 class="timeline-title">Категория</h4>
              {category}
            </div>
            <div class="col-md-6 my">
              <h4 class="timeline-title">Прикрепить опрос к статье?</h4>
              <a class="btn btn-secondary" data-toggle="collapse" data-target="#votte" aria-expanded="false" aria-controls="votte" onclick="$('.addvote').toggle();return false;">
              <span class="icon-paper-clip"></span> Создать опрос
              </a>
            </div>
          </div>
        </div>
      </div>
  </li>

  <li class="timeline-inverted collapse" id="votte">
    <div class="timeline-badge warning" style="background-color: #8CC152 !important;"></div>
      <div class="timeline-panel">
        <div class="timeline-heading">
          <h4 class="timeline-title">Опрос</h4>
        </div>
      <div class="timeline-body">    
        <div class="input-group" style="width: 100%;">
          <input type="text" name="vote_title" value="{votetitle}" class="form-control" placeholder="Заголовок опроса">
        </div>
        <br>
        <div class="input-group" style="width: 100%;">
          <input type="text" name="frage" value="{frage}" class="form-control" placeholder="Вопрос">
        </div>
        <br>
        <textarea name="vote_body" style="width: 100%;" rows="5" class="form-control" placeholder="Каждая новая строка  является новым вариантом ответа">{votebody}</textarea><br />
        <label for="checkbox1" class="custom-control custom-checkbox" >
        <input id="checkbox1" type="checkbox" value="1" name="allow_m_vote" class="custom-control-input" {allowmvote}>
        <span class="custom-control-indicator"></span>
        <span class="custom-control-description">Разрешить выбор нескольких вариантов</span>
        </label>
      </div>
      </div>
  </li>


  <li class="timeline-inverted">
    <div class="timeline-badge warning"></div>
      <div class="timeline-panel">
        <div class="timeline-heading">
          <h4 class="timeline-title">Краткое описание</h4>
        </div>
      <div class="timeline-body">   
      [not-wysywyg]
      <div class="bb-editor">
        {bbcode}
        <textarea name="short_story" id="short_story" onfocus="setFieldName(this.name)" rows="8" class="wide" required>{short-story}</textarea>
      </div>
      [/not-wysywyg]
      {shortarea}
      </div>
      </div>
  </li>

  <li class="timeline-inverted">
    <div class="timeline-badge warning"></div>
      <div class="timeline-panel">
        <div class="timeline-heading">
          <h4 class="timeline-title">Полное описание</h4>
        </div>
        <div class="timeline-body">     
        [not-wysywyg]
          <div class="bb-editor">
            {bbcode}
            <textarea name="full_story" id="full_story" onfocus="setFieldName(this.name)" rows="18" class="wide" >{full-story}
            </textarea>
          </div>
        [/not-wysywyg]
            {fullarea}
        </div>
      </div>
  </li>

    </ul>

<div class="card mb15" style="margin: -35px 0px 5px 0px;">
  <div class="card-body">
   <table class="table" style="border: 1px solid #e6ecf5;border-radius: 5px;">
        {xfields}
      </table>

    <div class="row my">
      <div class="col-md-12 my">
        [recaptcha]
    <center>{recaptcha}</center>
  [/recaptcha]
  [question]
    <li class="form-group">
      <label for="question_answer">{question}</label>
      <input placeholder="Введите ответ" type="text" name="question_answer" id="question_answer" class="wide" required>
    </li>
  [/question]
  [sec_code]
      <div class="c-capcha">
        {sec_code}
        <input placeholder="Повторите код" title="Введите код указанный на картинке" type="text" name="sec_code" id="sec_code" required>
      </div>
  [/sec_code]
      </div>
      <div class="col-md-6 my">
        [group=1,2]<br>
        <div class="admin_checkboxs">{admintag}</div>
        [/group]
      </div>
    </div>
    <button class="btn btn-primary float-right" type="submit" name="add">Опубликовать</button>
  </div>
</div>

</div>



