Skip to content

Commit

Permalink
Merge branch 'develop' into 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers committed Jul 7, 2023
2 parents c93db01 + 57a9807 commit 90b0df8
Show file tree
Hide file tree
Showing 43 changed files with 808 additions and 486 deletions.
43 changes: 43 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
APP_NAME="Winter CMS"
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_LOCALE=en

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=root
DB_PASSWORD=

CACHE_DRIVER=file

SESSION_DRIVER=file

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

QUEUE_CONNECTION=sync

MAIL_MAILER=log
MAIL_LOG_CHANNEL=null
MAIL_HOST=null
MAIL_PORT=null
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=noreply@example.com
MAIL_FROM_NAME="${APP_NAME}"

ROUTES_CACHE=false
ASSET_CACHE=false
LINK_POLICY=detect
ENABLE_CSRF=true
DATABASE_TEMPLATES=false

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
"dms/phpunit-arraysubset-asserts": "^0.1.0|^0.2.1"
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate"
],
Expand Down
4 changes: 3 additions & 1 deletion modules/backend/console/CreateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class CreateController extends BaseScaffoldCommand
{plugin : The name of the plugin. <info>(eg: Winter.Blog)</info>}
{controller : The name of the controller to generate. <info>(eg: Posts)</info>}
{--force : Overwrite existing files with generated files.}
{--model= : Defines the model name to use. If not provided, the singular name of the controller is used.}';
{--model= : Defines the model name to use. If not provided, the singular name of the controller is used.}
{--uninspiring : Disable inspirational quotes}
';

/**
* @var string The console command description.
Expand Down
4 changes: 3 additions & 1 deletion modules/backend/console/CreateFormWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class CreateFormWidget extends BaseScaffoldCommand
protected $signature = 'create:formwidget
{plugin : The name of the plugin. <info>(eg: Winter.Blog)</info>}
{widget : The name of the form widget to generate. <info>(eg: PostList)</info>}
{--force : Overwrite existing files with generated files.}';
{--force : Overwrite existing files with generated files.}
{--uninspiring : Disable inspirational quotes}
';

/**
* The console command description.
Expand Down
4 changes: 3 additions & 1 deletion modules/backend/console/CreateReportWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class CreateReportWidget extends BaseScaffoldCommand
protected $signature = 'create:reportwidget
{plugin : The name of the plugin. <info>(eg: Winter.Blog)</info>}
{widget : The name of the report widget to generate. <info>(eg: PostViews)</info>}
{--force : Overwrite existing files with generated files.}';
{--force : Overwrite existing files with generated files.}
{--uninspiring : Disable inspirational quotes}
';

/**
* The console command description.
Expand Down
2 changes: 1 addition & 1 deletion modules/backend/formwidgets/FileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ protected function getUploadMaxFilesize()
{
$size = ini_get('upload_max_filesize');
if (preg_match('/^([\d\.]+)([KMG])$/i', $size, $match)) {
$pos = array_search($match[2], ['K', 'M', 'G']);
$pos = array_search(strtoupper($match[2]), ['K', 'M', 'G']);
if ($pos !== false) {
$size = $match[1] * pow(1024, $pos + 1);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/backend/formwidgets/NestedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NestedForm extends FormWidgetBase
protected $defaultAlias = 'nestedform';

/**
* @var [] Form configuration
* @var array Form configuration
*/
public $form;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class="field-recordfinder loading-indicator-container size-input-text"
<?php if ($value): ?>
<button
type="button"
class="btn btn-default clear-record"
class="btn clear-record"
data-request="<?= $this->getEventHandler('onClearRecord') ?>"
data-request-confirm="<?= e(trans('backend::lang.form.action_confirm')) ?>"
data-request-success="var $locker = $('#<?= $field->getId() ?>'); $locker.val(''); $locker.trigger('change')"
Expand Down
6 changes: 4 additions & 2 deletions modules/backend/formwidgets/repeater/assets/js/repeater.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@
}

Repeater.prototype.onAddItemSuccess = function(ev) {
this.togglePrompt()
$(ev.target).closest('[data-field-name]').trigger('change.oc.formwidget')
window.requestAnimationFrame(() => {
this.togglePrompt();
$(ev.target).closest('[data-field-name]').trigger('change.oc.formwidget')
});
}

Repeater.prototype.togglePrompt = function () {
Expand Down
Loading

0 comments on commit 90b0df8

Please sign in to comment.