blob: bbfa3ea6e56bdbcdc59828148a8cb03bd92eb63c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{strip}
{if !$textarea_noformat}
{include file="bitpackage:liberty/edit_format.tpl"}
{/if}
{if $gBitSystem->isFeatureActive('package_smileys')}
{include file="bitpackage:smileys/smileys_full.tpl"}
{/if}
{if $gBitSystem->isFeatureActive('package_quicktags')}
{include file="bitpackage:quicktags/quicktags_full.tpl"}
{/if}
{/strip}
<div class="row rt-edit">
{formlabel label=$textarea_label for=$textarea_id}
{forminput}
{formfeedback error=$textarea_error}
{if !$textarea_id}{assign var=textarea_id value=$smarty.const.LIBERTY_TEXT_AREA}{/if}
<textarea {$textarea_class} {$textarea_attributes} {if $textarea_maxchars}onkeydown="BitBase.charCounter('{$textarea_id}','{$textarea_id}Counter','{$textarea_maxchars}');" onkeyup="BitBase.charCounter('{$textarea_id}','{$textarea_id}Counter','{$textarea_maxchars}');"{/if} {spellchecker width=$cols height=$rows} id="{$textarea_id}" name="{$textarea_name|default:edit}" {$textarea_style}>{$textarea_data|escape:html}</textarea>
{if $textarea_required}{required}{/if}
{if $textarea_maxchars}
<script type="text/javascript">//<![CDATA[
if( typeof( BitBase ) == 'undefined' ){ldelim}
BitBase = {ldelim}{rdelim};
{rdelim};
BitBase.charCounter = function( textareaId, counterId, maxChars ) {ldelim}
document.getElementById( counterId ).value = maxChars - document.getElementById( textareaId ).value.length;
{rdelim}
//]]></script>
{assign var=charCount value=$textarea_data|count_characters:true}
<div class="formhelp">{tr}Maximum character count:{/tr}{$textarea_maxchars}<br />
{tr}Characters remaining:{/tr} <input readonly="readonly" type="text" id="{$textarea_id}Counter" size="5" value="{$textarea_maxchars-$charCount}" /></div>
{/if}
{formhelp note=$textarea_help}
{if $gBitSystem->isPackageActive('fckeditor') &&
($gBitSystem->isFeatureActive("fckeditor_ask") ||
$gBitSystem->isFeatureActive("fckeditor_on_click"))}
{formhelp note="Click in the textarea to activate the editor."}
{/if}
{/forminput}
</div>
|