HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/ilya/data/www/irk2.ru/templates/skin/habra/actions/ActionQuestion/add.tpl
{include file='header.tpl'}

{include file='menu.action.tpl'}

{include file='system_message.tpl'}


{literal}
<script>
document.addEvent('domready', function() {	
	var inputTags = $('topic_tags');
 
	new Autocompleter.Request.HTML(inputTags, DIR_WEB_ROOT+'/include/ajax/tagAutocompleter.php', {
		'indicatorClass': 'autocompleter-loading', // class added to the input during request
		'minLength': 2, // We need at least 1 character
		'selectMode': 'pick', // Instant completion
		'multiple': true // Tag support, by default comma separated
	}); 
});
</script>
{/literal}





<div class="backoffice">


		<div class="groups_topic_text" id="text_preview"></div>
   		<div style="clear: both;"></div>
       <form action="" method="POST" id="thisform" enctype="multipart/form-data">

       <label for="blog_id">В какой блог публикуем?</label>
     	<select name="blog_id" id="blog_id" style="width: 100%;" onChange="ajaxBlogInfo(this.value);">
     		<option value="0">мой персональный блог</option>
     		{foreach from=$aBlogsOwner item=oBlog}
     			<option value="{$oBlog->getId()}" {if $_aRequest.blog_id==$oBlog->getId()}selected{/if}>{$oBlog->getTitle()}</option>
     		{/foreach}
     		{foreach from=$aBlogsUser item=oBlogUser}
     			<option value="{$oBlogUser->getBlogId()}" {if $_aRequest.blog_id==$oBlogUser->getBlogId()}selected{/if}>{$oBlogUser->getBlogTitle()}</option>
     		{/foreach}
     	</select>
     	<script>
     		ajaxBlogInfo(document.getElementById('blog_id').value);
     	</script>
        <br /><span class="form_note_red"></span></p>
    
               <p>
       <label for="topic_title">Вопрос:</label>
       <input type="text" id="topic_title" name="topic_title" value="{$_aRequest.topic_title}" style="width: 100%;" {if $bEditDisabled}disabled{/if} /><br />

       <span class="form_note">Заголовок должен быть наполнен смыслом, чтобы можно было понять, о чем будет топик.</span><br />
       <span class="form_note_red"></span>
      </p>
     
      <p>
      	Варианты ответов:
      	<table>
      	{if count($_aRequest.answer)>=2}
        	{foreach from=$_aRequest.answer item=sAnswer}
 				<tr valign=top>
 					<td>
 						<nobr> <input type="radio" disabled></nobr>
 					</td>
  					<td width="100%">      
    					<input type="text" value="{$sAnswer}" name="answer[]" class="imputtext"  style="width: 100%;" {if $bEditDisabled}disabled{/if}>     
  					</td>
  					<td nowrap align="center">
   						<input type="button"  name="drop_answer" value=" - " onClick="dropField(this);" {if $bEditDisabled}disabled{/if}>
   						<input type="button"  value=" + " onClick="addField(this);" {if $bEditDisabled}disabled{/if}>   
  					</td>
 				</tr> 
 			{/foreach}
 		{else}
 			 <tr valign=top>
 				<td>
 					<nobr> <input type="radio" disabled></nobr>
 				</td>
  				<td width="100%">      
    				<input type="text" value="" name="answer[]" class="imputtext" style="width: 100%;" >     
  				</td>
  				<td nowrap align="center">
   					<input type="button"  name="drop_answer" value=" - " onClick="dropField(this);">
   					<input type="button"  value=" + " onClick="addField(this);">   
  				</td>
 			</tr>
 			<tr valign=top>
 				<td>
 					<nobr> <input type="radio" disabled></nobr>
 				</td>
  				<td width="100%">      
    				<input type="text" value="" name="answer[]" class="imputtext" style="width: 100%;" >     
  				</td>
  				<td nowrap align="center">
   					<input type="button"  name="drop_answer" value=" - " onClick="dropField(this);">
   					<input type="button"  value=" + " onClick="addField(this);">   
  				</td>
 			</tr>
 		{/if} 
		</table>
		{if !$bEditDisabled}
			{literal}<script>checkFieldForLast();</script>{/literal}
		{/if}

      </p>
     
            <label for="topic_text">Краткое описание (максимум 500 символов, HTML-теги запрещены):</label>       
           
		<textarea style="width: 100%;" name="topic_text" id="topic_text" rows="6">{$_aRequest.topic_text}</textarea><br>   
		

     <p>
      <label for="topic_tags">Метки:</label>
      <input type="text" id="topic_tags" name="topic_tags" value="{$_aRequest.topic_tags}" style="width: 100%;" /><br />
            <span class="form_note">Метки нужно разделять запятой. Например: <i>клон хабры</i>, <i>блоги</i>, <i>рейтинг</i>, <i>google</i>, <i>сиськи</i>, <i>кирпич</i>.</span>

     </p>

     <p>
     <input type="checkbox" id="topic_forbid_comment" name="topic_forbid_comment" value="1" {if $_aRequest.topic_forbid_comment==1}checked{/if}/>
      <label for="topic_forbid_comment"> &mdash; запретить комментировать</label>	
     <br />
            <span class="form_note">Если отметить эту галку, то нельзя будет оставлять комментарии к топику </span>
     </p>
     
     {if $oUserCurrent->isAdministrator()}
     <p>
     <input type="checkbox" id="topic_publish_index" name="topic_publish_index" value="1" {if $_aRequest.topic_publish_index==1}checked{/if}/>
      <label for="topic_publish_index"> &mdash; принудительно вывести на главную</label>	
     <br />
            <span class="form_note">Если отметить эту галку, то топик сразу попадёт на главную страницу(опция доступна только администраторам)</span>
     </p>
     {/if}

    <p class="l-bot">     
     <input type="submit" name="submit_topic_publish" value="опубликовать">&nbsp;
     <input type="submit" name="submit_topic_save" value="сохранить в черновиках">&nbsp;
     <input type="submit" name="submit_preview" value="предпросмотр" onclick="ajaxTextPreview(document.getElementById('topic_text').value,true); return false;">&nbsp;
    </p>

    <div class="form_note">Если нажать кнопку &laquo;Сохранить в черновиках&raquo;, топик 
    будет виден только Вам, а рядом с его заголовком будет отображаться замочек. 
    Чтобы топик был виден всем, нажмите &laquo;Опубликовать&raquo;.</div>

    <p>Может быть, перейти на <a href="{$DIR_WEB_ROOT}/blog/">заглавную страницу блогов</a>?</p>
	<input type="hidden" name="topic_id" value="{$_aRequest.topic_id}">
    </form>
     </div>
 </div>
</div>


{include file='footer.tpl'}