Skip to content

Commit

Permalink
Merge branch 'develop' into wip-laravel-11
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed May 14, 2024
2 parents 2953731 + f8459b4 commit eb2dc00
Show file tree
Hide file tree
Showing 121 changed files with 347 additions and 31,782 deletions.
34 changes: 34 additions & 0 deletions config/cors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/

'paths' => [],

'allowed_methods' => ['*'],

'allowed_origins' => ['*'],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],

'exposed_headers' => [],

'max_age' => 0,

'supports_credentials' => false,

];
1 change: 0 additions & 1 deletion config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

'mailers' => [
'smtp' => [
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'password' => env('MAIL_PASSWORD'),
'port' => env('MAIL_PORT', 587),
Expand Down
2 changes: 1 addition & 1 deletion modules/backend/assets/ui/js/build/backend.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/backend/assets/ui/js/build/manifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion modules/backend/assets/ui/js/build/vendor.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions modules/backend/behaviors/RelationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ protected function makeViewWidget()
$config->showSorting = $this->getConfig('view[showSorting]', true);
$config->defaultSort = $this->getConfig('view[defaultSort]');
$config->recordsPerPage = $this->getConfig('view[recordsPerPage]');
$config->showPageNumbers = $this->getConfig('view[showPageNumbers]', true);
$config->showCheckboxes = $this->getConfig('view[showCheckboxes]', !$this->readOnly);
$config->recordUrl = $this->getConfig('view[recordUrl]');
$config->customViewPath = $this->getConfig('view[customViewPath]');
Expand Down Expand Up @@ -820,6 +821,7 @@ protected function makeManageWidget()
$config->showSorting = $this->getConfig('manage[showSorting]', !$isPivot);
$config->defaultSort = $this->getConfig('manage[defaultSort]');
$config->recordsPerPage = $this->getConfig('manage[recordsPerPage]');
$config->showPageNumbers = $this->getConfig('manage[showPageNumbers]', true);
$config->noRecordsMessage = $this->getConfig('manage[noRecordsMessage]');

if ($this->viewMode === 'single') {
Expand Down
18 changes: 9 additions & 9 deletions modules/backend/formwidgets/DatePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@ public function prepareVars()
$value = DateTimeHelper::makeCarbon($value, false);

if (!($value instanceof Carbon)) {
throw new ApplicationException(sprintf('"%s" is not a valid date / time value.', $value));
$this->vars['error'] = (sprintf('"%s" is not a valid date / time value.', $value));
} else {
if ($this->mode === 'date' && !$this->ignoreTimezone) {
$backendTimeZone = \Backend\Models\Preference::get('timezone');
$value->setTimezone($backendTimeZone);
$value->setTime(0, 0, 0);
$value->setTimezone(Config::get('app.timezone'));
}
$value = $value->toDateTimeString();
}

if ($this->mode === 'date' && !$this->ignoreTimezone) {
$backendTimeZone = \Backend\Models\Preference::get('timezone');
$value->setTimezone($backendTimeZone);
$value->setTime(0, 0, 0);
$value->setTimezone(Config::get('app.timezone'));
}
$value = $value->toDateTimeString();
}

// Disable the datepicker visually when readOnly is enabled
Expand Down
4 changes: 4 additions & 0 deletions modules/backend/formwidgets/TagList.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ protected function hydrateRelationSaveValue($names): ?array
return $names;
}

if (!is_array($names)) {
$names = [$names];
}

$relationModel = $this->getRelationModel();
$existingTags = $relationModel
->whereIn($this->nameFrom, $names)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<p class="flash-message static error">
<?= e($error); ?></p>
</p>
<?php return; ?>
<?php endif; ?>
<?php if ($this->previewMode): ?>
<div class="form-control"><?= Backend::dateTime($value, [
Expand All @@ -11,7 +10,6 @@
'defaultValue' => $value
]) ?></div>
<?php else: ?>

<div
id="<?= $this->getId() ?>"
class="field-datepicker"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb2dc00

Please sign in to comment.