<!-- BEGIN: MAIN -->
<div class="centerwrap pt20 mb20">
  <div class="w700" style="margin: auto">
    <h1 class="f32 sm-text-center">Редактирование вопрос-ответа</h1>
    <div class="block-response mb15">
      <i class="ico-arrow-left dib v-align-m"></i>
      <a class="dib v-align-m f14 color-gray color-text" href="{PHP|cot_url('admin', 'm=market&p=faq')}">Вернуться в админ панель</a>
    </div>
    {FILE "{PHP.cfg.themes_dir}/{PHP.cfg.defaulttheme}/warnings.tpl"}
    <div id="foxPostForm" class="pt0 p15-20 white-bg-border w700">
      <form action="{FAQEDIT_FORM_ID|cot_url('faq', 'm=edit&id='$this'&a=update)}" id="sendDodjiRequest" method="POST" name="sendDodjiRequest" enctype="multipart/form-data" class="js-form">
        <div>
          <div class="pt20 pb10">
            <div>
              ID вопроса: <b>{FAQ_EDIT_ID}</b>
            </div>
          </div>
        </div>
        <div>
          <div class="pb10 long-touch-js">
            <div>
              <label class="semibold" for="wish_rfaqparent">ID родительской категории</label>
              <input name="rfaqparent" id="wish_rfaqparent" type="text" class="js-rfaqparent-input w700 styled-input styled-input--thin f15" placeholder="" value="{FAQ_EDIT_PARENT}" data-format="val"/>
              <span class="js-rfaqparent-error-field color-red hidden"></span>
            </div>
          </div>
        </div>
        <div>
          <div class="pb10 long-touch-js">
            <div>
              <label class="semibold" for="wish_rfaqtitle">Сформулируйте вопрос</label>
              <input name="rfaqtitle" id="wish_rfaqtitle" type="text" class="js-rfaqtitle-input w700 styled-input styled-input--thin f15" placeholder="Введите вопрос..." value="{FAQ_EDIT_TITLE}"/>
              <span class="js-rfaqtitle-error-field color-red hidden"></span>
            </div>
          </div>
        </div>
        <!-- IF {FAQEDIT_FORM_HASCHILDS} -->
        <div class="alert alert-warning">
          Этот вопрос является категорией, т.к. имеет дочерние вопросы ({FAQEDIT_FORM_HASCHILDS} шт.)
        </div>
        <!-- ENDIF -->
        <div id="faq_if_haschilds"<!-- IF {FAQEDIT_FORM_HASCHILDS} --> style="display: none;"<!-- ENDIF -->>
          <div>
            <div class="pt10 pb10 long-touch-js">
              <div>
                <label class="semibold" for="wish_rfaqtextstring">
                  Ответ на вопрос (Текст)
                  <a role="button" id="copy_faqtext_tostring">Скопировать из HTML</a>
                  <label class="pull-right">
                    <input type="checkbox" id="auto_faqtext_tostring"/>
                    создать автоматически из HTML
                  </label>
                </label>
                <textarea data-autoresize class="js-rfaqtextstring-input text w700 f15 autoheight-js" style="height:100px;" cols="1" id="wish_rfaqtextstring" name="rfaqtextstring" rows="1">{FAQ_EDIT_TEXT_STRING}</textarea>
              </div>
              <span class="js-rfaqtextstring-error-field color-red hidden"></span>
            </div>
          </div>
          <div class="clear"></div>
          <div>
            <div class="pt10 pb10 long-touch-js">
              <div>
                <label class="semibold" for="wish_rfaqtext">Ответ на вопрос HTML</label>

                <textarea id="wish_rfaqtext" class="js-rfaqtext-input" data-ckeditor="full" style="" cols="5" name="rfaqtext" rows="5">{FAQ_EDIT_TEXT}</textarea>
              </div>
              <span class="js-rfaqtext-error-field color-red hidden"></span>
            </div>
          </div>
        </div>
        <div class="bottom-form-filed mt0 pt0">
          <input type="submit" value="Сохранить" class="js-sendDodjiRequest__submit green-btn btn--big pull-reset m-wMax w250 mt20"/>
          <input type="hidden" name="action" value="submit"/>
          <!-- IF !{FAQEDIT_FORM_HASCHILDS} -->
            <p class="form_delete_action">вы можете <a href="{FAQEDIT_FORM_ID|cot_url('faq', 'm=edit&id='$this'&a=update&delete=1')}&x={PHP.sys.xk}">удалить</a> вопрос-ответ</p>
          <!-- ENDIF -->
        </div>
      </form>
    </div>
  </div>
</div>

{PHP|ckeditor_init()}

<script src="themes/itbirja/js/pages/new_faq.js" type="text/javascript"></script>
<!-- END: MAIN -->