1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 17:24:46 +02:00

Minor updates

This commit is contained in:
Ryan Cramer
2025-06-06 16:15:24 -04:00
parent eb48adccb2
commit 24ac500048
4 changed files with 10 additions and 7 deletions

View File

@@ -1648,8 +1648,8 @@ $config->adminEmail = '';
* #property bool compress Compress compiled CSS?
* #property array customLessFiles Custom .less files to include, relative to PW installation root.
* #property string customCssFile Target custom .css file to compile custom .less file(s) to.
* #proeprty bool noDarkMode If theme supports a dark mode, specify true to disable it as an option.
* #proeprty bool noTogcbx If theme supports toggle style checkboxes, disable them.
* #property bool noDarkMode If theme supports a dark mode, specify true to disable it as an option.
* #property bool noTogcbx If theme supports toggle style checkboxes, disable them.
*
*/
$config->AdminThemeUikit = array(

View File

@@ -136,7 +136,7 @@ class AdminThemeUikit extends AdminThemeFramework implements Module, Configurabl
// settings specific to default theme/style
$this->setArray([
'defaultStyleName' => 'auto',
'defaultStyleName' => 'light',
'defaultMainColor' => 'red',
'defaultMainColorCustom' => '#eb1d61',
'defaultMainColorCustomDark' => '',

View File

@@ -24,7 +24,7 @@ if(empty($value)) $value = 'auto';
if(!empty($settings['noDarkMode'])) {
$darkAttr = [ 'disabled' => 'disabled' ];
$value = 'light';
$f->notes = __('Dark mode disabled has been disabled by `$config->AdminThemeUikit("noDarkMode")`');
$f->notes = __('Dark mode has been disabled by `$config->AdminThemeUikit("noDarkMode")`');
} else {
$f->notes = __('Individual users can also choose light/dark/auto mode from the user tools menu.');
}

View File

@@ -636,6 +636,7 @@ class ProcessPagesExportImport extends Process {
$modules = $this->wire()->modules;
$input = $this->wire()->input;
$adminTheme = $this->wire()->adminTheme;
/** @var InputfieldForm $form */
$form = $modules->get('InputfieldForm');
@@ -700,16 +701,17 @@ class ProcessPagesExportImport extends Process {
$f->startLabel = $this->_('Choose parent');
$checkedDirect = $input->post('import_parent_type') == 'direct' ? "checked='checked'" : '';
$checkedBelow = $checkedDirect ? '' : "checked='checked'";
$radioClass = $adminTheme->getClass('input-radio');
$f->appendMarkup =
"<p class='InputfieldRadios'>" .
"<label style='display:block'>" .
"<input type='radio' name='import_parent_type' $checkedBelow value='below'>" .
"<input type='radio' name='import_parent_type' $checkedBelow value='below' class='$radioClass'>" .
"<span class='pw-no-select'>" .
$this->_('Import pages into selected parent and maintain page path structure below it') .
"</span>" .
"</label>" .
"<label style='display:block'>" .
"<input type='radio' name='import_parent_type' $checkedDirect value='direct'>" .
"<input type='radio' name='import_parent_type' $checkedDirect value='direct' class='$radioClass'>" .
"<span class='pw-no-select'>" .
$this->_('Import pages as children of selected parent page only') .
"</span>" .
@@ -871,7 +873,8 @@ class ProcessPagesExportImport extends Process {
// NullPage (error)
} else if($numChanges) {
// Page (success)
$attr = "type='radio' name='confirm$originalID' class='import-confirm'";
$class = $this->wire()->adminTheme->getClass('input-radio');
$attr = "type='radio' name='confirm$originalID' class='import-confirm $class'";
$val = $this->wire()->input->post("confirm$originalID");
if($val == $originalID || $val === null) {
$checkedYes = "checked='checked'";