|
8 | 8 | * License: GNU/GPLv2 |
9 | 9 | * @see LICENSE.txt |
10 | 10 | * |
11 | | - * This file: The configuration page (last modified: 2025.08.16). |
| 11 | + * This file: The configuration page (last modified: 2025.08.20). |
12 | 12 | */ |
13 | 13 |
|
14 | 14 | namespace phpMussel\FrontEnd; |
|
570 | 570 | } |
571 | 571 |
|
572 | 572 | /** Provide hints, useful for users to better understand the directive at hand. */ |
573 | | - if (!empty($DirValue['hints'])) { |
574 | | - $ThisDir['Hints'] = $this->Loader->L10N->arrayFromL10nToArray($DirValue['hints']); |
575 | | - foreach ($ThisDir['Hints'] as $ThisDir['HintKey'] => $ThisDir['HintValue']) { |
576 | | - if (is_int($ThisDir['HintKey'])) { |
577 | | - $ThisDir['FieldOut'] .= "\n<br /><br />" . $ThisDir['HintValue']; |
578 | | - continue; |
| 573 | + if (isset($DirValue['hints'])) { |
| 574 | + $Try = ''; |
| 575 | + if (is_string($DirValue['hints']) && strpos($DirValue['hints'], '.') !== false) { |
| 576 | + $Try = $this->Loader->L10N->getString($DirValue['hints']); |
| 577 | + } |
| 578 | + if ($Try !== '') { |
| 579 | + $ThisDir['FieldOut'] .= " <br /><br />\n " . $Try; |
| 580 | + } else { |
| 581 | + $ThisDir['Hints'] = $this->Loader->L10N->arrayFromL10nToArray($DirValue['hints']); |
| 582 | + foreach ($ThisDir['Hints'] as $ThisDir['HintKey'] => $ThisDir['HintValue']) { |
| 583 | + if (is_int($ThisDir['HintKey'])) { |
| 584 | + $ThisDir['FieldOut'] .= " <br /><br />\n " . $ThisDir['HintValue']; |
| 585 | + continue; |
| 586 | + } |
| 587 | + $ThisDir['FieldOut'] .= sprintf( |
| 588 | + "<br /><br />\n <span class=\"s\">%s</span> %s", |
| 589 | + $ThisDir['HintKey'], |
| 590 | + $ThisDir['HintValue'] |
| 591 | + ); |
579 | 592 | } |
580 | | - $ThisDir['FieldOut'] .= sprintf( |
581 | | - "\n<br /><br /><span class=\"s\">%s</span> %s", |
582 | | - $ThisDir['HintKey'], |
583 | | - $ThisDir['HintValue'] |
584 | | - ); |
585 | 593 | } |
586 | 594 | } |
587 | 595 |
|
588 | 596 | /** Provide additional information, useful for users to better understand the directive at hand. */ |
589 | 597 | if (!empty($DirValue['See also']) && is_array($DirValue['See also'])) { |
590 | | - $ThisDir['FieldOut'] .= sprintf("\n<br /><br />%s<ul>\n", $this->Loader->L10N->getString('label.See also')); |
| 598 | + $ThisDir['FieldOut'] .= sprintf("<br />\n %s<ul>\n", isset($DirValue['hints']) ? '' : $this->L10N->getString('label.See also')); |
591 | 599 | foreach ($DirValue['See also'] as $DirValue['Ref key'] => $DirValue['Ref link']) { |
592 | 600 | $ThisDir['FieldOut'] .= sprintf( |
593 | | - '<li><a dir="ltr" href="%s">%s</a></li>', |
| 601 | + ' <li><a dir="ltr" href="%s"><span class="navicon link"></span>%s</a></li>', |
594 | 602 | $DirValue['Ref link'], |
595 | 603 | $this->Loader->L10N->getString($DirValue['Ref key']) ?: $DirValue['Ref key'] |
596 | | - ); |
| 604 | + ) . "\n"; |
| 605 | + } |
| 606 | + if (substr($ThisDir['FieldOut'], -1) === "\n") { |
| 607 | + $ThisDir['FieldOut'] = substr($ThisDir['FieldOut'], 0, -1); |
597 | 608 | } |
598 | | - $ThisDir['FieldOut'] .= "\n</ul>"; |
| 609 | + $ThisDir['FieldOut'] .= ' </ul>'; |
599 | 610 | } |
600 | 611 |
|
601 | 612 | /** Reset to defaults. */ |
|
607 | 618 | $DirValue['default'] |
608 | 619 | ); |
609 | 620 | } |
| 621 | + if (empty($DirValue['See also']) || !is_array($DirValue['See also'])) { |
| 622 | + $ThisDir['FieldOut'] .= '<br />'; |
| 623 | + } |
610 | 624 | $ThisDir['FieldOut'] .= sprintf( |
611 | | - '<br /><br /><input type="button" class="reset" onclick="javascript:%s" value="↺ %s" />', |
| 625 | + '<br /><input type="button" class="reset" onclick="javascript:%s" value="↺ %s" />', |
612 | 626 | $ThisDir['Reset'], |
613 | 627 | $this->Loader->L10N->getString('field.Reset') |
614 | 628 | ); |
|
0 commit comments