Last active
December 16, 2015 13:59
-
-
Save ademers/5445209 to your computer and use it in GitHub Desktop.
EECMS Safecracker with RTE field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:safecracker | |
channel="blog" | |
allow_comments="yes" | |
return="blog/URL_TITLE" | |
datepicker="no" | |
include_jquery="no" | |
error_handling="inline" | |
form_class="form-horizontal" | |
safecracker_head="yes" | |
author_only="yes" | |
status="Pending Moderation" | |
rte_selector=".rte" | |
} | |
<fieldset class="control-group {if error:title}error{/if}"> | |
<label class="control-label" for="title">Post Title</label> | |
<div class="controls"> | |
<input class="span8" type="text" name="title" id="title" value="{title}"> | |
{if error:title}<span class="help-block">The Title field is required.</span>{/if} | |
</div> | |
</fieldset> | |
<fieldset class="control-group {if error:blog_excerpt}error{/if}"> | |
<label class="control-label" for="blog_excerpt">Post Excerpt</label> | |
<div class="controls"> | |
<textarea class="span8" name="blog_excerpt" id="blog_excerpt" rows="6">{blog_excerpt}</textarea> | |
<span class="help-block">{instructions:blog_excerpt}</span> | |
{if error:blog_excerpt} | |
<span class="help-block">The Post Excerpt field is required.</span> | |
{/if} | |
</div> | |
</fieldset> | |
<fieldset class="control-group {if error:blog_body}error{/if}"> | |
<label class="control-label" for="blog_body">Post Body</label> | |
<div class="controls"> | |
<textarea class="span8" name="blog_body" id="blog_body" rows="24">{blog_body}</textarea> | |
<span class="help-block">{instructions:blog_body}</span> | |
{if error:blog_body} | |
<span class="help-block">The Blog Body field is required.</span> | |
{/if} | |
</div> | |
</fieldset> | |
<fieldset class="control-group {if error:blog_rte}error{/if}"> | |
<label class="control-label" for="blog_rte">Post RTE</label> | |
<div class="controls"> | |
<textarea class="span8 rte" name="blog_rte" id="blog_rte" rows="24">{blog_rte}</textarea> | |
<span class="help-block">{instructions:blog_rte}</span> | |
{if error:blog_rte} | |
<span class="help-block">The Blog Body field is required.</span> | |
{/if} | |
</div> | |
</fieldset> | |
<fieldset class="control-group {if error:blog_photo}error{/if}"> | |
<label class="control-label" for="fileInput">Post Photo</label> | |
<div class="controls"> | |
{field:blog_photo} | |
<p class="help-block"> | |
Maximum file size: 2 MB<br /> | |
Maximum file resolution: 1050x1050 px | |
{if error:blog_photo}<span class="help-block">The Item Photo field is required.</span>{/if} | |
</p> | |
</div> | |
</fieldset> | |
<fieldset class="form-actions"> | |
{!-- Rename file on upload, prepend username. see extenstion by @_rsan --} | |
<!-- <input type="hidden" name="member_photo_prefix" value="{username}-" /> --> | |
<button type="submit" class="btn btn-primary">Publish</button> | |
<button type="reset" class="btn">Cancel</button> | |
</fieldset> | |
{/exp:safecracker} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment