chore: add prettierrc and dir=auto to form inputs
This commit is contained in:
parent
16cd57029b
commit
6248ea0a62
7
.prettierrc
Normal file
7
.prettierrc
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"useTabs": false,
|
||||
"tabWidth": 2,
|
||||
"printWidth": 100
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
class Bootstrap {
|
||||
class Bootstrap
|
||||
{
|
||||
|
||||
public static function modal($args) {
|
||||
public static function modal($args)
|
||||
{
|
||||
|
||||
$buttonSecondary = $args['buttonSecondary'];
|
||||
$buttonSecondaryClass = $args['buttonSecondaryClass'];
|
||||
@ -140,7 +142,7 @@ EOF;
|
||||
return <<<EOF
|
||||
<div class="$class">
|
||||
$label
|
||||
<input type="text" value="$value" class="form-control" id="$id" name="$name" placeholder="$placeholder" $disabled>
|
||||
<input type="text" dir="auto" value="$value" class="form-control" id="$id" name="$name" placeholder="$placeholder" $disabled>
|
||||
$tip
|
||||
</div>
|
||||
EOF;
|
||||
@ -258,7 +260,7 @@ return <<<EOF
|
||||
<div class="form-group row">
|
||||
$label
|
||||
<div class="col-sm-10">
|
||||
<input class="$class" id="$id" name="$name" value="$value" placeholder="$placeholder" type="$type" $disabled $readonly>
|
||||
<input class="$class" id="$id" name="$name" value="$value" placeholder="$placeholder" type="$type" dir="auto" $disabled $readonly>
|
||||
$tip
|
||||
</div>
|
||||
</div>
|
||||
|
@ -283,7 +283,9 @@ echo Bootstrap::formOpen(array(
|
||||
});
|
||||
|
||||
// Datepicker
|
||||
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
|
||||
$("#jsdate").datetimepicker({
|
||||
format: DB_DATE_FORMAT
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@ -396,7 +398,7 @@ echo Bootstrap::formOpen(array(
|
||||
|
||||
<!-- Title -->
|
||||
<div class="form-group mb-1">
|
||||
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="<?php echo $page->title() ?>" placeholder="<?php $L->p('Enter title') ?>">
|
||||
<input id="jstitle" name="title" type="text" dir="auto" class="form-control form-control-lg rounded-0" value="<?php echo $page->title() ?>" placeholder="<?php $L->p('Enter title') ?>">
|
||||
</div>
|
||||
|
||||
<!-- Editor -->
|
||||
|
@ -11,7 +11,7 @@ echo Bootstrap::formOpen(array());
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<input type="text" value="'.(isset($_POST['username'])?Sanitize::html($_POST['username']):'').'" class="form-control form-control-lg" id="jsusername" name="username" placeholder="'.$L->g('Username').'" autofocus>
|
||||
<input type="text" dir="auto" value="' . (isset($_POST['username']) ? Sanitize::html($_POST['username']) : '') . '" class="form-control form-control-lg" id="jsusername" name="username" placeholder="' . $L->g('Username') . '" autofocus>
|
||||
</div>
|
||||
';
|
||||
|
||||
@ -35,4 +35,3 @@ echo Bootstrap::formOpen(array());
|
||||
echo '</form>';
|
||||
|
||||
echo '<p class="mt-3 text-right">' . $L->g('Powered by Bludit') . ((defined('BLUDIT_PRO')) ? ' PRO' : '') . '</p>'
|
||||
?>
|
||||
|
@ -265,7 +265,9 @@ echo Bootstrap::formOpen(array(
|
||||
});
|
||||
|
||||
// Datepicker
|
||||
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
|
||||
$("#jsdate").datetimepicker({
|
||||
format: DB_DATE_FORMAT
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
@ -377,7 +379,7 @@ echo Bootstrap::formOpen(array(
|
||||
|
||||
<!-- Title -->
|
||||
<div id="jseditorTitle" class="form-group mb-1">
|
||||
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="" placeholder="<?php $L->p('Enter title') ?>">
|
||||
<input id="jstitle" name="title" type="text" dir="auto" class="form-control form-control-lg rounded-0" value="" placeholder="<?php $L->p('Enter title') ?>">
|
||||
</div>
|
||||
|
||||
<!-- Editor -->
|
||||
|
@ -12,7 +12,7 @@ echo Bootstrap::formTitle(array('title' => $L->g('Search plugins')));
|
||||
|
||||
?>
|
||||
|
||||
<input type="text" class="form-control" id="search" placeholder="<?php $L->p('Search') ?>">
|
||||
<input type="text" dir="auto" class="form-control" id="search" placeholder="<?php $L->p('Search') ?>">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#search").on("keyup", function() {
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
class Login {
|
||||
|
||||
class Login
|
||||
{
|
||||
protected $users;
|
||||
protected $site;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginAbout extends Plugin {
|
||||
class pluginAbout extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -20,7 +21,7 @@ class pluginAbout extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginAPI extends Plugin {
|
||||
class pluginAPI extends Plugin
|
||||
{
|
||||
|
||||
private $method;
|
||||
|
||||
@ -35,13 +36,13 @@ class pluginAPI extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('API Token') . '</label>';
|
||||
$html .= '<input name="token" type="text" value="'.$this->getValue('token').'">';
|
||||
$html .= '<input name="token" type="text" dir="auto" value="' . $this->getValue('token') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This token is for read only and is regenerated every time you install the plugin') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Amount of pages') . '</label>';
|
||||
$html .= '<input id="jsnumberOfItems" name="numberOfItems" type="text" value="'.$this->getValue('numberOfItems').'">';
|
||||
$html .= '<input id="jsnumberOfItems" name="numberOfItems" type="text" dir="auto" value="' . $this->getValue('numberOfItems') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This is the maximum of pages to return when you call to') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -203,8 +204,7 @@ class pluginAPI extends Plugin {
|
||||
elseif (($method === 'POST') && ($parameters[0] === 'files') && !empty($parameters[1])) {
|
||||
$pageKey = $parameters[1];
|
||||
$data = $this->uploadFile($pageKey);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->response(401, 'Unauthorized', array('message' => 'Access denied or invalid endpoint.'));
|
||||
}
|
||||
|
||||
@ -333,7 +333,8 @@ class pluginAPI extends Plugin {
|
||||
try {
|
||||
$page = new Page($pageKey);
|
||||
array_push($list, $page->json($returnsArray = true));
|
||||
} catch (Exception $e){}
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
$data = $tag->json($returnsArray = true);
|
||||
@ -617,7 +618,8 @@ class pluginAPI extends Plugin {
|
||||
try {
|
||||
$page = new Page($pageKey);
|
||||
array_push($list, $page->json($returnsArray = true));
|
||||
} catch (Exception $e){}
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
$data = $category->json($returnsArray = true);
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginCategories extends Plugin {
|
||||
class pluginCategories extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -22,7 +23,7 @@ class pluginCategories extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginDisqus extends Plugin {
|
||||
class pluginDisqus extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -22,7 +23,7 @@ class pluginDisqus extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('disqus-shortname') . '</label>';
|
||||
$html .= '<input name="shortname" id="jsshortname" type="text" value="'.$this->getValue('shortname').'">';
|
||||
$html .= '<input name="shortname" id="jsshortname" type="text" dir="auto" value="' . $this->getValue('shortname') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('Get the shortname from the Disqus general settings') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -108,5 +109,4 @@ $code = <<<EOF
|
||||
EOF;
|
||||
return $code;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class plugineasyMDE extends Plugin {
|
||||
class plugineasyMDE extends Plugin
|
||||
{
|
||||
|
||||
// The plugin is going to be loaded in this views
|
||||
private $loadOnViews = array(
|
||||
@ -23,12 +24,12 @@ class plugineasyMDE extends Plugin {
|
||||
|
||||
$html = '<div>';
|
||||
$html .= '<label>' . $L->get('toolbar') . '</label>';
|
||||
$html .= '<input name="toolbar" id="jstoolbar" type="text" value="'.$this->getValue('toolbar').'">';
|
||||
$html .= '<input name="toolbar" id="jstoolbar" type="text" dir="auto" value="' . $this->getValue('toolbar') . '">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('tab-size') . '</label>';
|
||||
$html .= '<input name="tabSize" id="jstabSize" type="text" value="'.$this->getValue('tabSize').'">';
|
||||
$html .= '<input name="tabSize" id="jstabSize" type="text" dir="auto" value="' . $this->getValue('tabSize') . '">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginHitCounter extends Plugin {
|
||||
class pluginHitCounter extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -35,7 +36,7 @@ class pluginHitCounter extends Plugin {
|
||||
// Label of the plugin to show in the sidebar
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginLinks extends Plugin {
|
||||
class pluginLinks extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -38,14 +39,15 @@ class pluginLinks extends Plugin {
|
||||
|
||||
// Delete the link from the array
|
||||
unset($links[$name]);
|
||||
}
|
||||
elseif( isset($_POST['addLink']) ) {
|
||||
} elseif (isset($_POST['addLink'])) {
|
||||
// Values from $_POST
|
||||
$name = $_POST['linkName'];
|
||||
$url = $_POST['linkURL'];
|
||||
|
||||
// Check empty string
|
||||
if( empty($name) ) { return false; }
|
||||
if (empty($name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add the link
|
||||
$links[$name] = $url;
|
||||
@ -70,7 +72,7 @@ class pluginLinks extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input name="label" class="form-control" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input name="label" class="form-control" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -84,12 +86,12 @@ class pluginLinks extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Name') . '</label>';
|
||||
$html .= '<input name="linkName" type="text" class="form-control" value="" placeholder="Bludit">';
|
||||
$html .= '<input name="linkName" type="text" dir="auto" class="form-control" value="" placeholder="Bludit">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Url') . '</label>';
|
||||
$html .= '<input name="linkURL" type="text" class="form-control" value="" placeholder="https://www.bludit.com/">';
|
||||
$html .= '<input name="linkURL" type="text" dir="auto" class="form-control" value="" placeholder="https://www.bludit.com/">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
@ -105,12 +107,12 @@ class pluginLinks extends Plugin {
|
||||
foreach ($links as $name => $url) {
|
||||
$html .= '<div class="my-2">';
|
||||
$html .= '<label>' . $L->get('Name') . '</label>';
|
||||
$html .= '<input type="text" class="form-control" value="'.$name.'" disabled>';
|
||||
$html .= '<input type="text" dir="auto" class="form-control" value="' . $name . '" disabled>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Url') . '</label>';
|
||||
$html .= '<input type="text" class="form-control" value="'.$url.'" disabled>';
|
||||
$html .= '<input type="text" dir="auto" class="form-control" value="' . $url . '" disabled>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginMaintenanceMode extends Plugin {
|
||||
class pluginMaintenanceMode extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -28,7 +29,7 @@ class pluginMaintenanceMode extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Message') . '</label>';
|
||||
$html .= '<input name="message" id="jsmessage" type="text" value="'.$this->getValue('message').'">';
|
||||
$html .= '<input name="message" id="jsmessage" type="text" dir="auto" value="' . $this->getValue('message') . '">';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginNavigation extends Plugin {
|
||||
class pluginNavigation extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -23,7 +24,7 @@ class pluginNavigation extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input id="jslabel" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -39,7 +40,7 @@ class pluginNavigation extends Plugin {
|
||||
if (ORDER_BY == 'date') {
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Amount of items') . '</label>';
|
||||
$html .= '<input id="jsnumberOfItems" name="numberOfItems" type="text" value="'.$this->getValue('numberOfItems').'">';
|
||||
$html .= '<input id="jsnumberOfItems" name="numberOfItems" type="text" dir="auto" value="' . $this->getValue('numberOfItems') . '">';
|
||||
$html .= '</div>';
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginOpenGraph extends Plugin {
|
||||
class pluginOpenGraph extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -21,13 +22,13 @@ class pluginOpenGraph extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Default image') . '</label>';
|
||||
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" value="'.$this->getValue('defaultImage').'" placeholder="https://">';
|
||||
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" dir="auto" value="' . $this->getValue('defaultImage') . '" placeholder="https://">';
|
||||
$html .= '<span class="tip">' . $L->g('set-a-default-image-for-content') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Facebook App ID') . '</label>';
|
||||
$html .= '<input name="fbAppId" type="text" value="'.$this->getValue('fbAppId').'" placeholder="App ID">';
|
||||
$html .= '<input name="fbAppId" type="text" dir="auto" value="' . $this->getValue('fbAppId') . '" placeholder="App ID">';
|
||||
$html .= '<span class="tip">' . $L->g('set-your-facebook-app-id') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -69,8 +70,7 @@ class pluginOpenGraph extends Plugin {
|
||||
$pageContent = '';
|
||||
if (Text::isNotEmpty($this->getValue('defaultImage'))) {
|
||||
$og['image'] = $this->getValue('defaultImage');
|
||||
}
|
||||
elseif (isset($content[0]) ) {
|
||||
} elseif (isset($content[0])) {
|
||||
$og['image'] = $content[0]->coverImage($absolute = true);
|
||||
$pageContent = $content[0]->content();
|
||||
}
|
||||
@ -104,5 +104,4 @@ class pluginOpenGraph extends Plugin {
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginRemoteContent extends Plugin {
|
||||
class pluginRemoteContent extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -29,13 +30,13 @@ class pluginRemoteContent extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $language->get('Webhook') . '</label>';
|
||||
$html .= '<input id="jswebhook" name="webhook" type="text" value="'.$this->getValue('webhook').'">';
|
||||
$html .= '<input id="jswebhook" name="webhook" type="text" dir="auto" value="' . $this->getValue('webhook') . '">';
|
||||
$html .= '<span class="tip">' . DOMAIN_BASE . $this->getValue('webhook') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $language->get('Source') . '</label>';
|
||||
$html .= '<input id="jssource" name="source" type="text" value="'.$this->getValue('source').'" placeholder="https://">';
|
||||
$html .= '<input id="jssource" name="source" type="text" dir="auto" value="' . $this->getValue('source') . '" placeholder="https://">';
|
||||
$html .= '<span class="tip">' . $language->get('Complete URL of the zip file') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -205,5 +206,4 @@ EOF;
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginRSS extends Plugin {
|
||||
class pluginRSS extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -26,7 +27,7 @@ class pluginRSS extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Amount of items') . '</label>';
|
||||
$html .= '<input id="jsnumberOfItems" name="numberOfItems" type="text" value="'.$this->getValue('numberOfItems').'">';
|
||||
$html .= '<input id="jsnumberOfItems" name="numberOfItems" type="text" dir="auto" value="' . $this->getValue('numberOfItems') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('Amount of items to show on the feed') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -35,7 +36,9 @@ class pluginRSS extends Plugin {
|
||||
|
||||
private function encodeURL($url)
|
||||
{
|
||||
return preg_replace_callback('/[^\x20-\x7f]/', function($match) { return urlencode($match[0]); }, $url);
|
||||
return preg_replace_callback('/[^\x20-\x7f]/', function ($match) {
|
||||
return urlencode($match[0]);
|
||||
}, $url);
|
||||
}
|
||||
|
||||
private function createXML()
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginSearch extends Plugin {
|
||||
class pluginSearch extends Plugin
|
||||
{
|
||||
|
||||
private $pagesFound = array();
|
||||
private $numberOfItems = 0;
|
||||
@ -26,13 +27,13 @@ class pluginSearch extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Minimum number of characters when searching') . '</label>';
|
||||
$html .= '<input name="minChars" type="text" value="'.$this->getValue('minChars').'">';
|
||||
$html .= '<input name="minChars" type="text" dir="auto" value="' . $this->getValue('minChars') . '">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
@ -55,7 +56,7 @@ class pluginSearch extends Plugin {
|
||||
$html = '<div class="plugin plugin-search">';
|
||||
$html .= '<h2 class="plugin-label">' . $this->getValue('label') . '</h2>';
|
||||
$html .= '<div class="plugin-content">';
|
||||
$html .= '<input type="text" id="jspluginSearchText" /> ';
|
||||
$html .= '<input type="text" dir="auto" id="jspluginSearchText" /> ';
|
||||
if ($this->getValue('showButtonSearch')) {
|
||||
$html .= '<input type="button" value="' . $L->get('Search') . '" onClick="pluginSearch()" />';
|
||||
}
|
||||
@ -235,5 +236,4 @@ EOF;
|
||||
|
||||
return (array_keys($results));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,8 @@
|
||||
/*
|
||||
This plugin uses the javascript library https://github.com/gionkunz/chartist-js
|
||||
*/
|
||||
class pluginSimpleStats extends Plugin {
|
||||
class pluginSimpleStats extends Plugin
|
||||
{
|
||||
|
||||
private $loadOnController = array(
|
||||
'dashboard'
|
||||
@ -31,7 +32,7 @@ class pluginSimpleStats extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input id="jslabel" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -271,5 +272,4 @@ EOF;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginStaticPages extends Plugin {
|
||||
class pluginStaticPages extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -22,7 +23,7 @@ class pluginStaticPages extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input id="jslabel" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginTags extends Plugin {
|
||||
class pluginTags extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -19,7 +20,7 @@ class pluginTags extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<input id="jslabel" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginTinymce extends Plugin {
|
||||
class pluginTinymce extends Plugin
|
||||
{
|
||||
|
||||
private $loadOnController = array(
|
||||
'new-content',
|
||||
@ -27,23 +28,23 @@ class pluginTinymce extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('toolbar-top') . '</label>';
|
||||
$html .= '<input name="toolbar1" id="jstoolbar1" type="text" value="'.$this->getValue('toolbar1').'">';
|
||||
$html .= '<input name="toolbar1" id="jstoolbar1" type="text" dir="auto" value="' . $this->getValue('toolbar1') . '">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('toolbar-bottom') . '</label>';
|
||||
$html .= '<input name="toolbar2" id="jstoolbar2" type="text" value="'.$this->getValue('toolbar2').'">';
|
||||
$html .= '<input name="toolbar2" id="jstoolbar2" type="text" dir="auto" value="' . $this->getValue('toolbar2') . '">';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Plugins') . '</label>';
|
||||
$html .= '<input name="plugins" id="jsplugins" type="text" value="'.$this->getValue('plugins').'">';
|
||||
$html .= '<input name="plugins" id="jsplugins" type="text" dir="auto" value="' . $this->getValue('plugins') . '">';
|
||||
$html .= '</div>';
|
||||
|
||||
if (strpos($this->getValue('plugins'), 'codesample') !== false) {
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('codesample-languages') . '</label>';
|
||||
$html .= '<input name="codesampleLanguages" id="jsCodesampleLanguages" type="text" value="'.$this->getValue('codesampleLanguages').'">';
|
||||
$html .= '<input name="codesampleLanguages" id="jsCodesampleLanguages" type="text" dir="auto" value="' . $this->getValue('codesampleLanguages') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('codesample-supported-laguages') . '</span>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
@ -78,8 +79,9 @@ class pluginTinymce extends Plugin {
|
||||
$version = $this->version();
|
||||
|
||||
if (strpos($this->getValue('plugins'), 'codesample') !== false) {
|
||||
$codesampleConfig = '';
|
||||
$codesampleLanguages = explode("|", $this->getValue('codesampleLanguages'));
|
||||
foreach($codesampleLanguages AS $codesampleLang) {
|
||||
foreach ($codesampleLanguages as $codesampleLang) {
|
||||
$values = explode(" ", $codesampleLang);
|
||||
$codesampleConfig .= "{ text: '" . $values[0] . "', value: '" . $values[1] . "' },";
|
||||
}
|
||||
@ -150,5 +152,4 @@ $html = <<<EOF
|
||||
EOF;
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
class pluginTwitterCards extends Plugin {
|
||||
class pluginTwitterCards extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
@ -20,7 +21,7 @@ class pluginTwitterCards extends Plugin {
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Default image') . '</label>';
|
||||
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" value="'.$this->getValue('defaultImage').'" placeholder="https://">';
|
||||
$html .= '<input id="jsdefaultImage" name="defaultImage" type="text" dir="auto" value="' . $this->getValue('defaultImage') . '" placeholder="https://">';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
|
@ -98,7 +98,7 @@ EOF;
|
||||
|
||||
$html = '<div class="mb-3">';
|
||||
$html .= '<label class="form-label" for="label">' . $L->get('Label') . '</label>';
|
||||
$html .= '<input class="form-control" id="label" name="label" type="text" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<input class="form-control" id="label" name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<div class="form-text">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
|
@ -650,7 +650,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
<input type="hidden" name="timezone" id="jstimezone" value="UTC">
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" value="admin" class="form-control form-control-lg" id="jsusername" name="username" placeholder="Username" disabled>
|
||||
<input type="text" dir="auto" value="admin" class="form-control form-control-lg" id="jsusername" name="username" placeholder="Username" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0">
|
||||
|
Loading…
x
Reference in New Issue
Block a user