Skip to content

Commit 90b0df8

Browse files
committed
Merge branch 'develop' into 1.2
2 parents c93db01 + 57a9807 commit 90b0df8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+808
-486
lines changed

.env.example

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
APP_NAME="Winter CMS"
2+
APP_KEY=
3+
APP_DEBUG=true
4+
APP_URL=http://localhost
5+
APP_LOCALE=en
6+
7+
DB_CONNECTION=mysql
8+
DB_HOST=127.0.0.1
9+
DB_PORT=3306
10+
DB_DATABASE=database
11+
DB_USERNAME=root
12+
DB_PASSWORD=
13+
14+
CACHE_DRIVER=file
15+
16+
SESSION_DRIVER=file
17+
18+
REDIS_HOST=127.0.0.1
19+
REDIS_PASSWORD=null
20+
REDIS_PORT=6379
21+
22+
QUEUE_CONNECTION=sync
23+
24+
MAIL_MAILER=log
25+
MAIL_LOG_CHANNEL=null
26+
MAIL_HOST=null
27+
MAIL_PORT=null
28+
MAIL_USERNAME=null
29+
MAIL_PASSWORD=null
30+
MAIL_ENCRYPTION=null
31+
MAIL_FROM_ADDRESS=[email protected]
32+
MAIL_FROM_NAME="${APP_NAME}"
33+
34+
ROUTES_CACHE=false
35+
ASSET_CACHE=false
36+
LINK_POLICY=detect
37+
ENABLE_CSRF=true
38+
DATABASE_TEMPLATES=false
39+
40+
AWS_ACCESS_KEY_ID=
41+
AWS_SECRET_ACCESS_KEY=
42+
AWS_DEFAULT_REGION=us-east-1
43+
AWS_BUCKET=

composer.json

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"dms/phpunit-arraysubset-asserts": "^0.1.0|^0.2.1"
4747
},
4848
"scripts": {
49+
"post-root-package-install": [
50+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
51+
],
4952
"post-create-project-cmd": [
5053
"@php artisan key:generate"
5154
],

modules/backend/console/CreateController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ class CreateController extends BaseScaffoldCommand
2121
{plugin : The name of the plugin. <info>(eg: Winter.Blog)</info>}
2222
{controller : The name of the controller to generate. <info>(eg: Posts)</info>}
2323
{--force : Overwrite existing files with generated files.}
24-
{--model= : Defines the model name to use. If not provided, the singular name of the controller is used.}';
24+
{--model= : Defines the model name to use. If not provided, the singular name of the controller is used.}
25+
{--uninspiring : Disable inspirational quotes}
26+
';
2527

2628
/**
2729
* @var string The console command description.

modules/backend/console/CreateFormWidget.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ class CreateFormWidget extends BaseScaffoldCommand
1919
protected $signature = 'create:formwidget
2020
{plugin : The name of the plugin. <info>(eg: Winter.Blog)</info>}
2121
{widget : The name of the form widget to generate. <info>(eg: PostList)</info>}
22-
{--force : Overwrite existing files with generated files.}';
22+
{--force : Overwrite existing files with generated files.}
23+
{--uninspiring : Disable inspirational quotes}
24+
';
2325

2426
/**
2527
* The console command description.

modules/backend/console/CreateReportWidget.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ class CreateReportWidget extends BaseScaffoldCommand
1919
protected $signature = 'create:reportwidget
2020
{plugin : The name of the plugin. <info>(eg: Winter.Blog)</info>}
2121
{widget : The name of the report widget to generate. <info>(eg: PostViews)</info>}
22-
{--force : Overwrite existing files with generated files.}';
22+
{--force : Overwrite existing files with generated files.}
23+
{--uninspiring : Disable inspirational quotes}
24+
';
2325

2426
/**
2527
* The console command description.

modules/backend/formwidgets/FileUpload.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ protected function getUploadMaxFilesize()
518518
{
519519
$size = ini_get('upload_max_filesize');
520520
if (preg_match('/^([\d\.]+)([KMG])$/i', $size, $match)) {
521-
$pos = array_search($match[2], ['K', 'M', 'G']);
521+
$pos = array_search(strtoupper($match[2]), ['K', 'M', 'G']);
522522
if ($pos !== false) {
523523
$size = $match[1] * pow(1024, $pos + 1);
524524
}

modules/backend/formwidgets/NestedForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class NestedForm extends FormWidgetBase
1818
protected $defaultAlias = 'nestedform';
1919

2020
/**
21-
* @var [] Form configuration
21+
* @var array Form configuration
2222
*/
2323
public $form;
2424

modules/backend/formwidgets/recordfinder/partials/_recordfinder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class="field-recordfinder loading-indicator-container size-input-text"
2525
<?php if ($value): ?>
2626
<button
2727
type="button"
28-
class="btn btn-default clear-record"
28+
class="btn clear-record"
2929
data-request="<?= $this->getEventHandler('onClearRecord') ?>"
3030
data-request-confirm="<?= e(trans('backend::lang.form.action_confirm')) ?>"
3131
data-request-success="var $locker = $('#<?= $field->getId() ?>'); $locker.val(''); $locker.trigger('change')"

modules/backend/formwidgets/repeater/assets/js/repeater.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@
144144
}
145145

146146
Repeater.prototype.onAddItemSuccess = function(ev) {
147-
this.togglePrompt()
148-
$(ev.target).closest('[data-field-name]').trigger('change.oc.formwidget')
147+
window.requestAnimationFrame(() => {
148+
this.togglePrompt();
149+
$(ev.target).closest('[data-field-name]').trigger('change.oc.formwidget')
150+
});
149151
}
150152

151153
Repeater.prototype.togglePrompt = function () {

0 commit comments

Comments
 (0)