2015-05-05 03:00:01 +02:00
|
|
|
<h2 class="title"><i class="fa fa-pencil"></i> New page</h2>
|
2015-03-27 02:00:01 +01:00
|
|
|
|
|
|
|
<form method="post" action="" class="forms">
|
|
|
|
|
|
|
|
<label>
|
2015-05-05 03:00:01 +02:00
|
|
|
Title
|
2015-06-27 06:28:13 +02:00
|
|
|
<input id="jsTitle" name="title" type="text" class="width-70">
|
2015-03-27 02:00:01 +01:00
|
|
|
</label>
|
|
|
|
|
2015-05-05 03:00:01 +02:00
|
|
|
<label>
|
|
|
|
Content <span class="forms-desc">HTML and Markdown code supported.</span>
|
2015-06-27 06:28:13 +02:00
|
|
|
<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-06-27 06:28:13 +02:00
|
|
|
echo '<div id="jsAdvancedOptions">';
|
2015-05-05 03:00:01 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-06-27 05:44:41 +02:00
|
|
|
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
2015-06-27 06:28:13 +02:00
|
|
|
echo '<div id="jsAdvancedOptions" style="display:none">';
|
2015-05-05 03:00:01 +02:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<h4>Advanced options</h4>
|
|
|
|
|
2015-06-27 06:28:13 +02:00
|
|
|
<label for="jsParent">
|
2015-05-05 03:00:01 +02:00
|
|
|
Page parent
|
2015-06-27 06:28:13 +02:00
|
|
|
<select id="jsParent" name="parent" class="width-50">
|
2015-05-05 03:00:01 +02:00
|
|
|
<?php
|
|
|
|
$htmlOptions[NO_PARENT_CHAR] = '(No parent)';
|
|
|
|
$htmlOptions += $dbPages->parentKeyList();
|
|
|
|
foreach($htmlOptions as $value=>$text) {
|
|
|
|
echo '<option value="'.$value.'">'.$text.'</option>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
<div class="forms-desc">Tip/Help ???</div>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<label>
|
|
|
|
Friendly url
|
|
|
|
<div class="input-groups width-50">
|
2015-06-27 06:28:13 +02:00
|
|
|
<span class="input-prepend"><?php echo $Site->urlPage() ?><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>
|
|
|
|
Description
|
2015-06-27 06:28:13 +02:00
|
|
|
<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>
|
2015-03-27 02:00:01 +01:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label>
|
2015-05-05 03:00:01 +02:00
|
|
|
Tags
|
2015-06-27 06:28:13 +02:00
|
|
|
<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>
|
2015-03-27 02:00:01 +01:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label>
|
2015-05-05 03:00:01 +02:00
|
|
|
Position
|
2015-06-27 06:28:13 +02:00
|
|
|
<input id="jsPosition" name="position" type="text" class="width-20" value="0">
|
2015-03-27 02:00:01 +01:00
|
|
|
</label>
|
|
|
|
|
2015-05-05 03:00:01 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<button class="btn btn-blue" name="publish"><i class="fa fa-sun-o fa-right"></i>Publish now</button>
|
|
|
|
<button class="btn" name="draft"><i class="fa fa-circle-o fa-right"></i>Draft</button>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
$(document).ready(function()
|
|
|
|
{
|
|
|
|
|
2015-06-27 06:28:13 +02:00
|
|
|
$("#jsSlug").keyup(function() {
|
2015-05-05 03:00:01 +02:00
|
|
|
var text = $(this).val();
|
2015-06-27 06:28:13 +02:00
|
|
|
var parent = $("#jsParent").val();
|
2015-05-05 03:00:01 +02:00
|
|
|
|
2015-06-27 06:28:13 +02:00
|
|
|
checkSlugPage(text, parent, "", $("#jsSlug"));
|
2015-05-05 03:00:01 +02:00
|
|
|
});
|
|
|
|
|
2015-06-27 06:28:13 +02:00
|
|
|
$("#jsTitle").keyup(function() {
|
2015-05-05 03:00:01 +02:00
|
|
|
var text = $(this).val();
|
2015-06-27 06:28:13 +02:00
|
|
|
var parent = $("#jsParent").val();
|
2015-05-05 03:00:01 +02:00
|
|
|
|
2015-06-27 06:28:13 +02:00
|
|
|
checkSlugPage(text, parent, "", $("#jsSlug"));
|
2015-05-05 03:00:01 +02:00
|
|
|
});
|
|
|
|
|
2015-06-27 06:28:13 +02:00
|
|
|
$("#jsParent").change(function() {
|
2015-05-05 03:00:01 +02:00
|
|
|
var parent = $(this).val();
|
2015-06-27 06:28:13 +02:00
|
|
|
var text = $("#jsSlug").val();
|
2015-05-05 03:00:01 +02:00
|
|
|
|
|
|
|
if(parent==NO_PARENT_CHAR) {
|
2015-06-27 06:28:13 +02:00
|
|
|
$("#jsParentExample").text("");
|
2015-05-05 03:00:01 +02:00
|
|
|
}
|
|
|
|
else {
|
2015-06-27 06:28:13 +02:00
|
|
|
$("#jsParentExample").text(parent+"/");
|
2015-05-05 03:00:01 +02:00
|
|
|
}
|
|
|
|
|
2015-06-27 06:28:13 +02:00
|
|
|
checkSlugPage(text, parent, "", $("#jsSlug"));
|
2015-05-05 03:00:01 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
2015-03-27 02:00:01 +01:00
|
|
|
|
2015-05-31 03:06:55 +02:00
|
|
|
</script>
|