<article class="inform hentry">
    <div class="register">
        <header class="entry-header">
            <h3 class="entry-title">{%ACTION%}</h3>
        </header>
        </hr>
    </div>
    <form action="news/savePost" method="post" onsubmit="return checkAddPost();">
        <div style="width:90%;">
            <div class="padding inputTitle">[lang_tpl:news_headline]</div>
            <div class="padding" style="padding-bottom:10px;">
                <label for="title"></label><input type="text" name="title" id="title" value="{%TITLE%}" size="35" class="add-n-form mob1" maxlength="150" placeholder="[lang_tpl:enter_title]" required onchange="alt_title(gid('title').value, 'check_rtitle');"/>
                <br/><sup>[lang_tpl:title_info_35]</sup>
                <div id="check_rtitle"></div>
                <div id="titleErr"></div>
            </div>
            <div class="padding inputTitle">[lang_tpl:publication_source]</div>
            <div class="padding" style="padding-bottom:10px;">
                <label for="source"></label><input type="text" name="source" id="source" value="{%SOURCE%}" size="35" class="add-n-form mob1" maxlength="150" placeholder="[lang_tpl:enter_sourse]"/>
                <br/><sup>[lang_tpl:sourse_info_35]</sup>
            </div>
            <div class="padding inputTitle">[lang_tpl:select_category]</div>
            <div class="padding" style="padding-bottom:10px;">
                <label>
                    <select name="category[]">
                        <option value="0">[lang_tpl:not_category]</option>
                        {%CATS_ONE%}
                    </select>
                </label>
            </div>
            <div class="padding inputTitle">[lang_tpl:associated_category]</div>
            <div class="padding" style="padding-bottom:10px;">
                <label>
                    <select name="category[]" style="min-width:150px; height:120px;" multiple>
                        {%CATS_MORE%}
                    </select>
                </label>
            </div>
            [admin]
            <div class="padding inputTitle">[lang_tpl:news_status]</div>
            <div class="padding" style="padding-bottom:10px;">
                <label>
                    <select name="status">
                        {%STATUS%}
                    </select>
                </label>
            </div>
            [/admin]
            <div class="padding inputTitle">[lang_tpl:news_short]</div>
            <div class="padding" style="padding-bottom:10px;">
                {%BB_SHORT%}
                <br/> <sup>[lang_tpl:news_info_short]</sup>
                <div id="postTextErr"></div>
            </div>
            <div class="padding inputTitle">[lang_tpl:news_full]</div>
            <div class="padding" style="padding-bottom:10px;">
                {%BB_FULL%}
                <br/><sup>[lang_tpl:news_info_full]</sup>
                [xfield_tpl]
                <table style="width:100%; border: 0; border-spacing: 1px; border-collapse: separate; margin-bottom:5px;">
                    <tr>
                        <td class="in_conf_input" align="center" width="100%">{%XTITLE%}</td>
                        <td class="in_conf_input">{%XBODY:[style="width:394px;"]%}</td>
                    </tr>
                </table>
                [/xfield_tpl]
                [fields]
                <table width="100%" style="border:0;" cellspacing="1" cellpadding="3" style="margin-bottom:5px;">
                    <tr>
                        <th colspan="2">[lang_tpl:addit_settings]</th>
                    </tr>
                    {%XFIELDS%}
                </table>
                [/fields]
            </div>
            <div class="padding">
                <input type="submit" class="submit" name="add" value="{%DO_IT%}"/>
                <input type="hidden" name="edit_id" id="comment_parent" value="{%ID%}">
            </div>
    </form>
</article>
<script language="javascript">
    function checkAddPost()
    {var err = 0;gid('titleErr').innerHTML = '';gid('postTextErr').innerHTML = '';if(gid('title').value == ''){err = 1;gid('titleErr').innerHTML = '[lang_tpl:not_headline]';} if(gid('short').value == ''){	err = 1;gid('postTextErr').innerHTML = '[lang_tpl:not_announcement]';}if (err == 1){alert('[lang_tpl:alert_fields]');return false;} else
    {return true;}
    }
    function alt_title(val, id)
    {if(val.length>3){AJAXEngine.setPostVar('title',encodeURI(val,true));AJAXEngine.sendRequest('ajax.php?do=alt_title',id)}}
</script>