{strip}
{bithelp}
{if $gContent->mArticleId}

{tr}Edit Article{/tr}: {$article.title|escape}

{elseif $gContent->hasUserPermission('p_articles_approve_submission') || $gContent->hasUserPermission('p_articles_auto_approve')}

{tr}Create Article{/tr}

{else}

{tr}Submit Article{/tr}

{/if}
{if $preview}

Preview

{include file="bitpackage:articles/article_display.tpl" outer_div='display articles'}
{/if} {formfeedback hash=$feedback} {formfeedback warning=$errors.title|default:''}
{form enctype="multipart/form-data" id="writearticle"} {jstabs} {jstab title="Article Body"} {legend legend="Article Body"}
{formlabel label="Title" for="title"} {forminput} {formhelp note=""} {/forminput}
{formlabel label="Author Name" for="author_name"} {forminput} {formhelp note=""} {/forminput}
{if $topics || $gContent->hasUserPermission( 'p_articles_admin' )}
{formlabel label="Topic" for="topic_id"} {forminput} {if $topics} {else} {tr}No Topics set{/tr}. {smartlink ititle="Article Topics" ifile="admin/admin_topics.php"} {/if} {formhelp note=""} {/forminput}
{/if} {if count($types) == 1} {section name=t loop=$types} {if $types[t].use_ratings eq 'y'}{assign var=ratings value=TRUE}{/if} {/section} {else}
{formlabel label="Type" for="article_type_id"} {forminput} {formhelp note=""} {/forminput}
{/if} {if $ratings}
{formlabel label="Rating" for="rating"} {forminput} {formhelp note="Rating is only used when the article type allows it."}{*(we shouldn't use hide since you can't edit this page if you don't have js enabled) (can't get js to enable/disable this as needed)*} {/forminput}
{/if} {capture assign=textarea_help} {tr}If the article body exceeds the specified maximum body length, a separate page will be provided with the full body of the article. You can override this by using ...split... on a separate line in your text.{/tr} {/capture} {assign var=length value=$gBitSystem->getConfig('articles_description_length')} {assign var=textarea_id value=$smarty.const.LIBERTY_TEXT_AREA} {textarea name="edit" onkeydown="charCounter('$textarea_id','artCounter','$length');" onkeyup="charCounter('$textarea_id','artCounter','$length');" edit=$article.raw} {assign var=artCount value=$article.data|count_characters:true} {include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_mini_tpl"} {if $gBitSystem->isFeatureActive( 'articles_submissions_rnd_img' ) && !( $gContent->mArticleId || ( $gContent->hasUserPermission('p_articles_approve_submission') || $gContent->hasUserPermission('p_articles_auto_approve') ) )}
{formfeedback error=$errors.captcha} {* captcha force=true variant=row *} {/if}
 
{if $gBitSystem->isFeatureActive( 'articles_attachments' ) } {include file="bitpackage:liberty/edit_storage_list.tpl" primary_label="Article Image"} {/if} {/legend} {/jstab} {include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_tab_tpl"} {jstab title="Advanced"} {legend legend="Publication and Expiration Dates"}
{formlabel label="Publish Date" for=""} {forminput} {html_select_date prefix="publish_" time=$article.publish_date start_year="-5" end_year="+10"} {tr}at{/tr}  {html_select_time prefix="publish_" time=$article.publish_date display_seconds=false} {$siteTimeZone} {formhelp note="If the article type allows it, this article will not be displayed before this date."} {/forminput}
{formlabel label="Expiration Date" for=""} {forminput} {html_select_date prefix="expire_" time=$article.expire_date start_year="-5" end_year="+10"} {tr}at{/tr}  {html_select_time prefix="expire_" time=$article.expire_date display_seconds=false} {$siteTimeZone} {formhelp note="If the article type allows it, this article will not be displayed after this date."} {/forminput}
{/legend} {/jstab} {if $gBitSystem->isFeatureActive( 'articles_attachments' ) && $gBitUser->hasPermission('p_liberty_attach_attachments') } {jstab title="Attachments"} {legend legend="Attachment Browser"} {include file="bitpackage:liberty/edit_storage.tpl" formid="writearticle"} {/legend} {/jstab} {/if} {/jstabs} {/form}
{/strip}