1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-01 07:38:11 +03:00
ifhub.club/templates/skin/habra/actions/ActionQuestion/add.tpl

149 lines
6.1 KiB
Smarty
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{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>
{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'}