bludit/admin/views/new-post.php

75 lines
2.4 KiB
PHP
Raw Normal View History

2015-07-04 00:36:37 +02:00
<h2 class="title"><i class="fa fa-pencil"></i> <?php $Language->p('New post') ?></h2>
2015-05-05 03:00:01 +02:00
<form method="post" action="" class="forms">
<label>
2015-07-03 22:44:26 +02:00
<?php $Language->p('Title') ?>
<input id="jstitle" name="title" type="text" class="width-70">
2015-05-05 03:00:01 +02:00
</label>
<label>
2015-07-03 22:44:26 +02:00
<?php $Language->p('Content') ?> <span class="forms-desc"><?php $Language->p('HTML and Markdown code supported') ?></span>
<textarea id="jscontent" name="content" rows="10" class="width-70"></textarea>
2015-05-05 03:00:01 +02:00
</label>
<?php
if($Site->advancedOptions()) {
2015-07-03 22:44:26 +02:00
echo '<div id="jsadvancedOptions">';
2015-05-05 03:00:01 +02:00
}
else
{
2015-07-04 02:14:58 +02:00
echo '<p class="advOptions">'.$Language->g('Enable more features at').' <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">'.$Language->g('settings-advanced-writting-settings').'</a></p>';
2015-07-03 22:44:26 +02:00
echo '<div id="jsadvancedOptions" style="display:none">';
2015-05-05 03:00:01 +02:00
}
?>
2015-07-03 22:44:26 +02:00
<h4><?php $Language->p('Advanced options') ?></h4>
2015-05-05 03:00:01 +02:00
<label>
2015-07-03 22:44:26 +02:00
<?php $Language->p('Friendly Url') ?>
2015-05-05 03:00:01 +02:00
<div class="input-groups width-50">
2015-07-03 22:44:26 +02:00
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsparentExample"></span></span>
<input id="jsslug" name="slug" type="text">
2015-05-05 03:00:01 +02:00
</div>
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
</label>
<label>
2015-07-03 22:44:26 +02:00
<?php $Language->p('Description') ?>
<input id="jsdescription" name="description" type="text" class="width-50">
2015-05-05 03:00:01 +02:00
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
</label>
<label>
2015-07-03 22:44:26 +02:00
<?php $Language->p('Tags') ?>
<input id="jstags" name="tags" type="text" class="width-50">
2015-05-05 03:00:01 +02:00
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
</label>
</div>
2015-07-03 22:44:26 +02:00
<button class="btn btn-blue" name="publish"><i class="fa fa-sun-o fa-right"></i><?php $Language->p('Publish now') ?></button>
<button class="btn" name="draft"><i class="fa fa-circle-o fa-right"></i><?php $Language->p('Draft') ?></button>
2015-05-05 03:00:01 +02:00
</form>
<script>
$(document).ready(function()
{
2015-07-03 22:44:26 +02:00
$("#jstitle").keyup(function() {
2015-05-05 03:00:01 +02:00
var slug = $(this).val();
2015-07-03 22:44:26 +02:00
checkSlugPost(slug, "", $("#jsslug"));
2015-05-05 03:00:01 +02:00
});
2015-07-03 22:44:26 +02:00
$("#jsslug").keyup(function() {
var slug = $("#jsslug").val();
2015-05-05 03:00:01 +02:00
2015-07-03 22:44:26 +02:00
checkSlugPost(slug, "", $("#jsslug"));
2015-05-05 03:00:01 +02:00
});
});
2015-07-03 22:44:26 +02:00
</script>