Form for plugins settingsn

This commit is contained in:
Diego Najar 2018-05-16 23:17:41 +02:00
parent 226ff3ce70
commit 605281d561
4 changed files with 55 additions and 15 deletions

View File

@ -43,6 +43,42 @@ div.sidebar .nav-item span.oi {
padding-right: 5px;
}
/*
PLUGINS
*/
.plugin-form label {
display: block;
margin-top: 1rem !important;
}
.plugin-form input[type="text"],
.plugin-form textarea,
.plugin-form select {
display: block;
width: 100%;
padding: .375rem .75rem;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: .25rem;
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.plugin-form textarea {
min-height: 120px;
}
.plugin-form span.tip {
display: block;
font-size: 80%;
font-weight: 400;
margin-top: .25rem;
color: #6c757d !important;
}
/*
NEW CONTENT / EDIT CONTENT
*/

View File

@ -1,11 +1,10 @@
<?php
<?php defined('BLUDIT') or die('Bludit CMS.');
HTML::title(array('title'=>$plugin->name(), 'icon'=>'puzzle-piece'));
echo Bootstrap::pageTitle(array('title'=>$plugin->name(), 'icon'=>'person'));
HTML::formOpen(array('id'=>'jsformplugin'));
echo Bootstrap::formOpen(array('class'=>'plugin-form'));
// Security token
HTML::formInputHidden(array(
echo Bootstrap::formInputHidden(array(
'name'=>'tokenCSRF',
'value'=>$Security->getTokenCSRF()
));
@ -14,11 +13,12 @@ HTML::formOpen(array('id'=>'jsformplugin'));
echo $plugin->form();
if ($plugin->formButtons()) {
// Form buttons
echo '<div class="uk-form-row uk-margin-bottom">
<button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>
<a class="uk-button" href="'.HTML_PATH_ADMIN_ROOT.'plugins">'.$L->g('Cancel').'</a>
</div>';
echo '
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary mr-2" name="save">'.$L->g('Save').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'plugins" role="button">'.$L->g('Cancel').'</a>
</div>
';
}
HTML::formClose();
echo Bootstrap::formClose();

View File

@ -16,7 +16,7 @@ class pluginAbout extends Plugin {
$html = '<div>';
$html .= '<label>'.$Language->get('Label').'</label>';
$html .= '<input id="jslabel" name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
$html .= '<span class="tip">'.$Language->get('This title is almost always used in the sidebar of the site').'</span>';
$html .= '</div>';

View File

@ -10,7 +10,7 @@ Search and select a page
not implementd
- manage->users->edit user
not implementd
Change profile image
- add more users roles
@ -18,3 +18,7 @@ not implementd
not implemented
- if you are editing a page autosave, the autosave need to be the same
- new content -> options -> Advanced
-- date, javascript for select the date
--