all
This commit is contained in:
commit
34c92804f8
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"presets": ["@babel/preset-env"],
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"module-resolver", {
|
||||||
|
"root": ["."],
|
||||||
|
"alias": {
|
||||||
|
"helpers": "./tests/js/helpers"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
# EditorConfig is awesome: http://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
APP_NAME="October CMS"
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://localhost
|
||||||
|
APP_LOCALE=en
|
||||||
|
|
||||||
|
BAGISTO_URL=http://216.250.11.229/app/api/
|
||||||
|
|
||||||
|
ACTIVE_THEME=demo
|
||||||
|
BACKEND_URI=/admin
|
||||||
|
CMS_ROUTE_CACHE=false
|
||||||
|
CMS_ASSET_CACHE=false
|
||||||
|
LINK_POLICY=detect
|
||||||
|
DEFAULT_FILE_MASK=775
|
||||||
|
DEFAULT_FOLDER_MASK=775
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=database
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=
|
||||||
|
|
||||||
|
LOG_CHANNEL=single
|
||||||
|
BROADCAST_DRIVER=log
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_MAILER=log
|
||||||
|
MAIL_HOST=null
|
||||||
|
MAIL_PORT=null
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS=noreply@octobercms.tld
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
* text=auto
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Common
|
||||||
|
composer.phar
|
||||||
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
.env
|
||||||
|
.env.*.php
|
||||||
|
.env.php
|
||||||
|
auth.json
|
||||||
|
php_errors.log
|
||||||
|
nginx-error.log
|
||||||
|
nginx-access.log
|
||||||
|
nginx-ssl.access.log
|
||||||
|
nginx-ssl.error.log
|
||||||
|
php-errors.log
|
||||||
|
sftp-config.json
|
||||||
|
.ftpconfig
|
||||||
|
.vscode/
|
||||||
|
selenium.php
|
||||||
|
composer.lock
|
||||||
|
package-lock.json
|
||||||
|
/node_modules
|
||||||
|
_ide_helper.php
|
||||||
|
.phpunit.result.cache
|
||||||
|
nbproject
|
||||||
|
.phpstorm.meta.php
|
||||||
|
|
||||||
|
# Project
|
||||||
|
/bootstrap/compiled.php
|
||||||
|
/vendor
|
||||||
|
/modules
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
##
|
||||||
|
## You may need to uncomment the following line for some hosting environments,
|
||||||
|
## if you have installed to a subdirectory, enter the name here also.
|
||||||
|
##
|
||||||
|
# RewriteBase /
|
||||||
|
|
||||||
|
##
|
||||||
|
## Uncomment following lines to force HTTPS.
|
||||||
|
##
|
||||||
|
# RewriteCond %{HTTPS} off
|
||||||
|
# RewriteRule (.*) https://%{SERVER_NAME}/$1 [L,R=301]
|
||||||
|
|
||||||
|
##
|
||||||
|
## Uncomment to redirect trailing slashes in URLs.
|
||||||
|
##
|
||||||
|
# RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
# RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||||
|
|
||||||
|
##
|
||||||
|
## Uncomment to redirect /index.php/path to /path
|
||||||
|
##
|
||||||
|
# RewriteRule ^index\.php/(.*)$ /$1 [L,R=301]
|
||||||
|
|
||||||
|
##
|
||||||
|
## Handle Authorization Header
|
||||||
|
##
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
|
##
|
||||||
|
## Blocked folders
|
||||||
|
##
|
||||||
|
RewriteRule ^bootstrap/.* index.php [L,NC]
|
||||||
|
RewriteRule ^config/.* index.php [L,NC]
|
||||||
|
RewriteRule ^vendor/.* index.php [L,NC]
|
||||||
|
RewriteRule ^storage/cms/.* index.php [L,NC]
|
||||||
|
RewriteRule ^storage/logs/.* index.php [L,NC]
|
||||||
|
RewriteRule ^storage/framework/.* index.php [L,NC]
|
||||||
|
RewriteRule ^storage/temp/protected/.* index.php [L,NC]
|
||||||
|
RewriteRule ^storage/app/uploads/protected/.* index.php [L,NC]
|
||||||
|
|
||||||
|
##
|
||||||
|
## Allowed folders
|
||||||
|
##
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/.well-known/*
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/app/(assets|resources)/.*
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.*
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/storage/app/resources/.*
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/public/.*
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.*
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.*
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.*
|
||||||
|
RewriteRule !^index.php index.php [L,NC]
|
||||||
|
|
||||||
|
##
|
||||||
|
## Block all PHP files, except index
|
||||||
|
##
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} \.php$
|
||||||
|
RewriteRule !^index.php index.php [L,NC]
|
||||||
|
|
||||||
|
##
|
||||||
|
## Standard routes
|
||||||
|
##
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
|
||||||
|
</IfModule>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
View the changelog on the [October CMS website](https://octobercms.com/changelog)
|
||||||
|
|
@ -0,0 +1,305 @@
|
||||||
|
Copyright (c) 2013-2022 Responsiv Pty Ltd
|
||||||
|
|
||||||
|
This End User License Agreement (“EULA”) constitutes a binding agreement between you (the “Licensee”, “you” or “your”) and Responsiv Pty Ltd - ACN 159 492 823 (the “Company”, “we”, “us” or “our”) with respect to your use of the October CMS software (“Licensed Software” or “October CMS Software”). The Company and the Licensee are each individually referred to as “Party” and collectively as “Parties”.
|
||||||
|
|
||||||
|
Please carefully read the terms and conditions of this EULA before installing and using the Licensed Software. By using the Licensed Software, you represent that you have read this EULA, and you agree to be bound by all the terms and conditions of this EULA, including any other agreements and policies referenced in this EULA. If you do not agree with any provisions of this EULA, please do not install the October CMS Software.
|
||||||
|
|
||||||
|
The Company reserves the right to modify or discontinue the October CMS Software or any portion thereof, temporarily or permanently, with or without notice to you. The Company will not be under any obligation to support or update the Licensed Software, except as described in this EULA.
|
||||||
|
|
||||||
|
YOU AGREE THAT THE COMPANY SHALL NOT BE LIABLE TO YOU OR ANY THIRD PARTY IN THE EVENT THAT WE EXERCISE OUR RIGHT TO MODIFY OR DISCONTINUE THE LICENSED SOFTWARE OR ANY PORTION THEREOF.
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
This section outlines some of the key provisions covered in this EULA. Please note that this summary is provided for your convenience only, and it does not relieve you of your obligation to read the full EULA before installing/using the October CMS Software.
|
||||||
|
|
||||||
|
By proceeding to use the October CMS Software, you understand and agree that:
|
||||||
|
|
||||||
|
- You must be at least 18 years of age to enter into this EULA;
|
||||||
|
|
||||||
|
- You will only use the October CMS Software in compliance with applicable laws;
|
||||||
|
|
||||||
|
- October CMS Software licenses are only issued for Projects created through the website. To acquire/renew your Project licence, you need to sign in to your October CMS Account, and select/create the Project for which you wish to acquire/renew the licence;
|
||||||
|
|
||||||
|
- You will be responsible for paying the full License Fee prior to installing the October CMS Software;
|
||||||
|
|
||||||
|
- All License Fee Payments are non-refundable;
|
||||||
|
|
||||||
|
- Upon full payment of the License Fee, you will receive a License Key that allows you to install the Licensed Software to create a single production or non-production website and ancillary installations needed to support that single production or non-production website;
|
||||||
|
|
||||||
|
- Each new/renewed Project licence comes with one year of Updates. You may continue to use your expired Project license in perpetuity, but if you wish to continue receiving all the Updates, you will be required to keep your Project licence active by renewing it every year;
|
||||||
|
|
||||||
|
- Subject to the payment of full License Fee and compliance with this EULA, the Company and its third party licensors grant you a limited, non-exclusive, non-transferable, non-assignable, perpetual and worldwide license to install and/or use the October CMS Software;
|
||||||
|
|
||||||
|
- The Company and its licensors retain all rights, title and interest in the October CMS Software, Documentation and other similar proprietary materials made available to you;
|
||||||
|
|
||||||
|
- You will not sublicense, resell, distribute, or transfer the Licensed Software to any third party without the Company’s prior written consent;
|
||||||
|
|
||||||
|
- You will not remove, obscure or otherwise modify any copyright notices from the October CMS Software files or this EULA;
|
||||||
|
|
||||||
|
- You will not modify, disassemble, or reverse engineer any part of the October CMS Software;
|
||||||
|
|
||||||
|
- You will take all required steps to prevent unauthorised installation/use of the October CMS Software and prevent any breach of this EULA;
|
||||||
|
|
||||||
|
- The Company may terminate this EULA if you are in breach of any provision of this EULA or if we discontinue the October CMS Software;
|
||||||
|
|
||||||
|
- SUBJECT TO YOUR STATUTORY RIGHTS, THE COMPANY PROVIDES THE OCTOBER CMS SOFTWARE TO YOU “AS IS” AND “WITH ALL FAULTS”. THE COMPANY DOES NOT OFFER ANY WARRANTIES, WHETHER EXPRESS OR IMPLIED. IN NO EVENT WILL THE COMPANY’S AGGREGATE LIABILITY TO YOU FOR ANY CLAIMS CONNECTED WITH THIS EULA OR THE OCTOBER CMS SOFTWARE EXCEED THE AMOUNT ACTUALLY PAID BY YOU TO THE COMPANY FOR THE OCTOBER CMS SOFTWARE IN THE TWELVE MONTHS PRECEDING THE DATE WHEN THE CLAIM FIRST AROSE;
|
||||||
|
|
||||||
|
- This EULA shall be governed by and construed in accordance with the laws of the state of New South Wales, Australia, without giving effect to any principles of conflict of laws.
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [1. Definitions](#Definitions)
|
||||||
|
- [2. Authorisation](#Authorisation)
|
||||||
|
- [3. License Grant](#License-Grant)
|
||||||
|
- [4. License Purchase and Renewal](#License-Purchase-and-Renewal)
|
||||||
|
- [5. License Fees, Payments and Refunds](#License-Fees-Payments-and-Refunds)
|
||||||
|
- [6. Ownership](#Ownership)
|
||||||
|
- [7. Use and Restrictions](#Use-and-Restrictions)
|
||||||
|
- [8. Technical Support](#Technical-Support)
|
||||||
|
- [9. Termination](#Termination)
|
||||||
|
- [10. Statutory Consumer Rights](#Statutory-Consumer-Rights)
|
||||||
|
- [11. Disclaimer of Warranties](#Disclaimer-of-Warranties)
|
||||||
|
- [12. Limitation of Liability](#Limitation-of-Liability)
|
||||||
|
- [13. Waiver](#Waiver)
|
||||||
|
- [14. Indemnification](#Indemnification)
|
||||||
|
- [15. Compliance with the Laws](#Compliance-with-the-Laws)
|
||||||
|
- [16. Data Protection](#Data-Protection)
|
||||||
|
- [17. Delivery](#Delivery)
|
||||||
|
- [18. General](#General)
|
||||||
|
|
||||||
|
<a name="Definitions"></a>
|
||||||
|
## 1. Definitions
|
||||||
|
|
||||||
|
The following words shall have the meaning given hereunder whenever they appear in this EULA:
|
||||||
|
|
||||||
|
Term | Definition
|
||||||
|
---- | -----------
|
||||||
|
Account | refers to a user account registered on the Website by an individual or entity.
|
||||||
|
Active Term | means the period commencing from the date of License purchase/renewal until the License expiry date as specified on the Project page in your Account.
|
||||||
|
Documentation | means the current version of the documentation relating to the October CMS Software available at https://docs.octobercms.com or otherwise made available by the Company in electronic format. Documentation includes but is not limited to installation instructions, user guides and help documents regarding the use of the October CMS Software.
|
||||||
|
License Fee | means the fee payable by the Licensee for the use of the October CMS Software in accordance with the provisions of this EULA and any other applicable agreements referenced in this EULA.
|
||||||
|
License Key | means a unique string of characters provided by the Company that enables users to install the October CMS Software for a specific Project.
|
||||||
|
Modifications | means any changes to the original code or files of the October CMS Software by the Licensee or any third party. For the avoidance of any doubt, the term “Modifications” does not include any Updates furnished by the Company.
|
||||||
|
October CMS Software | refers to the collection of proprietary code and graphics in various file formats provided by the Company to the Licensee.
|
||||||
|
Project | means a collection of extensions and themes to be used in a single production website.
|
||||||
|
Updates | means all new releases of the October CMS Software, including but not limited to new features and fixes which are provided by the Company to a Licensee during the Active Term of the License.
|
||||||
|
The Website | refers to the Company website located at www.octobercms.com.
|
||||||
|
|
||||||
|
<a name="Authorisation"></a>
|
||||||
|
## 2. Authorisation
|
||||||
|
|
||||||
|
You must be at least 18 years of age and have the legal capacity to enter into this EULA. If you are accepting this EULA on behalf of a corporation, organisation, or other legal entity (‘corporate entity’), you warrant that you have the authority to enter into this EULA on behalf of such corporate entity and to bind the former to this EULA.
|
||||||
|
|
||||||
|
<a name="License-Grant"></a>
|
||||||
|
## 3. License Grant
|
||||||
|
|
||||||
|
Subject to your compliance with all the terms and conditions of this EULA and the payment of the full License Fee, the Company and its third party licensors grant you a limited, non-exclusive, non-transferable, non-assignable, perpetual and worldwide license to install and/or use the October CMS Software.
|
||||||
|
|
||||||
|
You shall be solely responsible for ensuring that all your authorised employees, contractors or other users of the Licensed Software comply with all the terms and conditions of this EULA, and any failure to comply with this EULA will be deemed as a breach of this EULA by you.
|
||||||
|
|
||||||
|
The Company and its third party licensors may make changes to the Licensed Software, which are provided to you through Updates. You will only receive all such Updates during the Active Term of your license. You will not have any right to receive Updates after the expiration of your license. Please note that if you terminate your Account, you will not be able to access your Projects and renew your license/receive any future Updates.
|
||||||
|
|
||||||
|
UNLESS EXPRESSLY PROVIDED IN THIS EULA, YOU MAY NOT COPY OR MODIFY THE OCTOBER CMS SOFTWARE.
|
||||||
|
|
||||||
|
<a name="License-Purchase-and-Renewal"></a>
|
||||||
|
## 4. License Purchase and Renewal
|
||||||
|
|
||||||
|
October CMS Software licenses are only issued for Projects created through the Website. To acquire a new Project licence or to renew an existing Project licence, you must sign in to your October CMS Account and select/create the Project for which you wish to acquire/renew the licence.
|
||||||
|
|
||||||
|
Upon full payment of the License Fee, you will receive a License Key that allows you to install the Licensed Software to create a single production or non-production website and ancillary installations needed to support that single production or non-production website.
|
||||||
|
|
||||||
|
Each new/renewed Project licence comes with one year of Updates starting from the date on which you pay the License Fee. You are not under any legal obligation to renew your Project licence, and you can continue to use your expired Project license for your website in perpetuity. Please note that expired Project licenses do not receive any Updates. If you wish to continue receiving all the Updates, you will be required to keep your Project licence active by renewing it every year.
|
||||||
|
|
||||||
|
By installing and using the October CMS Software, you assume full responsibility for your selection of the Licensed Software, its installation, and the results obtained from the use of the October CMS Software.
|
||||||
|
|
||||||
|
<a name="License-Fees-Payments-and-Refunds"></a>
|
||||||
|
## 5. License Fees, Payments and Refunds
|
||||||
|
|
||||||
|
The current License Fee for the October CMS Software is published on the Website, and the amount is specified in United States Dollars (USD). The License fee as specified on the Website does not include any taxes which shall be payable by the Licensee in addition to the License Fee.
|
||||||
|
|
||||||
|
The License fee becomes due and payable in full at the time the Licensee purchases a new Project license or renews an existing Project license.
|
||||||
|
|
||||||
|
All Project licenses are issued/renewed subject to the payment of the License Fee by the Licensee as outlined in Section 7 of our [Website Terms of Use](https://octobercms.com/help/terms/website#fees-payments-refunds-policy) and incorporated into this EULA by reference. The Company reserves the right to refuse issuance of a new Project license or renewal of an existing license until the Company receives the full payment.
|
||||||
|
|
||||||
|
To the extent permitted by law, all License Fee payments are non-refundable.
|
||||||
|
|
||||||
|
<a name="Ownership"></a>
|
||||||
|
## 6. Ownership
|
||||||
|
|
||||||
|
Nothing in this EULA constitutes the sale of October CMS Software to you. The Company and its licensors retain all rights, title and interest in the October CMS Software, Documentation and other similar proprietary materials made available to you (collectively “Proprietary Material”). All Proprietary Material is protected by copyright and other intellectual property laws of Australia and international conventions. You acknowledge that the October CMS Software may contain some open source software that is not owned by the Company and which shall be governed by its own license terms.
|
||||||
|
|
||||||
|
Except where authorised by the Company in writing, any use of the October CMS trademark, trade name, or logo is strictly prohibited. The Company reserves all rights that are not expressly granted in and to the Proprietary Material.
|
||||||
|
|
||||||
|
<a name="Use-and-Restrictions"></a>
|
||||||
|
## 7. Use and Restrictions
|
||||||
|
|
||||||
|
You hereby agree that:
|
||||||
|
|
||||||
|
1. A License Key may only be used to create a single production or non-production website as provided in Section 4 (License Purchase and Renewal) of this EULA. If you wish to create another website, you will need to create a new Project and acquire a new License for that Project;
|
||||||
|
|
||||||
|
2. Unless expressly provided otherwise in this EULA or other applicable agreements referenced herein, you will not sublicense, resell, distribute, or transfer the Licensed Software to any third party without the Company’s prior written consent;
|
||||||
|
|
||||||
|
3. You will not remove, obscure or otherwise modify any copyright notices from the October CMS Software files or this EULA;
|
||||||
|
|
||||||
|
4. You will not modify, disassemble, or reverse engineer any part of the October CMS Software;
|
||||||
|
|
||||||
|
5. You will take all required steps to prevent unauthorised installation/use of the October CMS Software and prevent any breach of this EULA;
|
||||||
|
|
||||||
|
6. You do not receive any rights, interests or titles in the “October CMS” trademark, trade name or service mark (“Marks”), and you will not use any of these Marks without our express consent.
|
||||||
|
|
||||||
|
<a name="Technical-Support"></a>
|
||||||
|
## 8. Technical Support
|
||||||
|
|
||||||
|
The Company does not offer any technical support except as described in our Premium Support Policy. The Company reserves the right to deny any and all technical support for any Modifications of the October CMS Software or in the event of any breach of this EULA.
|
||||||
|
|
||||||
|
<a name="Termination"></a>
|
||||||
|
## 9. Termination
|
||||||
|
|
||||||
|
This EULA shall remain effective until terminated by either Party as described below.
|
||||||
|
|
||||||
|
### 9.1 Termination by Licensee
|
||||||
|
|
||||||
|
You may terminate this EULA by uninstalling the October CMS Software and deleting all files and your Account. Please note that once you delete your Account, you will not be able to reactivate it to restore your Projects and access your License Key.
|
||||||
|
|
||||||
|
### 9.2 Termination by the Company
|
||||||
|
|
||||||
|
The Company may terminate this EULA if you are in breach of any provision of this EULA or if we discontinue the October CMS Software.
|
||||||
|
|
||||||
|
### 9.3 Survival
|
||||||
|
|
||||||
|
Section 11 (Disclaimer of Warranties), Section 12 (Limitation of Liability), Section 13 (Waiver), Section 14 (Indemnification) and other sections of this EULA that by their nature are intended to survive the termination of this EULA shall survive.
|
||||||
|
|
||||||
|
Unless expressly specified otherwise in this EULA, any termination of this EULA either by you or the Company does not create any obligation on the Company to issue a full or partial refund of the License Fee paid by you.
|
||||||
|
|
||||||
|
<a name="Statutory-Consumer-Rights"></a>
|
||||||
|
## 10. Statutory Consumer Rights
|
||||||
|
|
||||||
|
### 10.1 CONSUMERS IN AUSTRALIA
|
||||||
|
|
||||||
|
If you acquire the October CMS Software license as a “consumer”, nothing in this EULA will exclude, limit or modify any rights and guarantees conferred on you by legislation, including the Australian Consumer Law (ACL) in the Competition and Consumer Act 2010 (Cth) (‘Statutory Rights’). If the Company is in breach of any such Statutory Rights, then the Company’s liability shall be limited (at the Company’s option) to:
|
||||||
|
|
||||||
|
10.1.1 In case of products supplied to you, to resupplying, replacing or paying the cost of resupplying or replacing the product in respect of which the breach occurred;
|
||||||
|
|
||||||
|
10.1.2 In case of services supplied to you, to resupply the service or to pay the cost of resupplying the service in respect of which the breach occurred.
|
||||||
|
|
||||||
|
Unless expressly specified otherwise in this EULA, you agree that the Company’s liability for the October CMS Software is governed solely by this EULA and the Australian Consumer Law.
|
||||||
|
|
||||||
|
### 10.1 CONSUMERS OUTSIDE OF AUSTRALIA
|
||||||
|
|
||||||
|
If you are deemed a “consumer” by statutory law in your country of residence, you may enjoy some legal rights under your local law which prohibit the exclusions, modification or limitations of certain liabilities from applying to you, and where such prohibition exists in your country of residence, any such limitations or exclusions will only apply to you to the extent it is permitted by your local law.
|
||||||
|
|
||||||
|
You agree that apart from the application of your statutory consumer rights, the Company’s liability for the October CMS Software is governed solely by this EULA.
|
||||||
|
|
||||||
|
<a name="Disclaimer-of-Warranties"></a>
|
||||||
|
## 11. Disclaimer of Warranties
|
||||||
|
|
||||||
|
SUBJECT TO YOUR STATUTORY RIGHTS AS PROVIDED IN SECTION 10 ABOVE, THE COMPANY PROVIDES THE OCTOBER CMS SOFTWARE TO YOU “AS IS” AND “WITH ALL FAULTS”.
|
||||||
|
|
||||||
|
EXCLUDING ANY EXPRESS WARRANTIES OFFERED IN THIS EULA, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE COMPANY, ITS EMPLOYEES, DIRECTORS, CONTRACTORS, AFFILIATES (“THE COMPANY AND ITS OFFICERS”) DISCLAIM ANY EXPRESS OR IMPLIED WARRANTIES WITH RESPECT TO THE OCTOBER CMS SOFTWARE, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, RELIABILITY, COURSE OF PERFORMANCE OR USAGE IN TRADE. THE COMPANY DOES NOT WARRANT THAT THE OCTOBER CMS SOFTWARE: WILL MEET YOUR REQUIREMENTS; WILL BE UNINTERRUPTED, ERROR-FREE, OR SECURE; OR THAT THE COMPANY WILL BE ABLE TO RECTIFY ANY ERRORS, BUGS, SECURITY VULNERABILITIES. NO OBLIGATION, WARRANTIES OR LIABILITY SHALL ARISE OUT OF ANY TECHNICAL SUPPORT SERVICES PROVIDED BY THE COMPANY AND ITS OFFICERS IN CONNECTION WITH THE OCTOBER CMS SOFTWARE. NO VERBAL OR WRITTEN COMMUNICATION RECEIVED FROM THE COMPANY AND ITS OFFICERS, WHETHER MARKETING, PROMOTIONAL OR TECHNICAL SUPPORT, SHALL CREATE ANY WARRANTIES THAT ARE NOT EXPRESSLY PROVIDED IN THIS EULA.
|
||||||
|
|
||||||
|
ALTHOUGH THE COMPANY PERIODICALLY RELEASES UPDATES FOR THE OCTOBER CMS SOFTWARE THAT MAY INCLUDE FIXES FOR KNOWN VULNERABILITIES, YOU ACKNOWLEDGE AND AGREE THAT THERE MAY BE VULNERABILITIES THAT THE COMPANY HAS NOT YET IDENTIFIED AND THEREFORE CANNOT ADDRESS. YOU ACKNOWLEDGE AND AGREE THAT YOU ARE SOLELY RESPONSIBLE FOR TAKING ALL THE PRECAUTIONS AND SAFEGUARDS NECESSARY TO PROTECT YOUR WEBSITE AND DATA FROM ANY EXTERNAL ATTACKS, INCLUDING BUT NOT LIMITED TO KEEPING YOUR OCTOBER CMS SOFTWARE INSTALLATION CURRENT AND UP TO DATE.
|
||||||
|
|
||||||
|
SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT APPLY TO YOU.
|
||||||
|
|
||||||
|
<a name="Limitation-of-Liability"></a>
|
||||||
|
## 12. Limitation of Liability
|
||||||
|
|
||||||
|
IN NO EVENT SHALL THE COMPANY BE LIABLE TO YOU OR ANY THIRD-PARTY FOR ANY LOSS OF REVENUE, LOSS OF PROFITS (ACTUAL OR ANTICIPATED), LOSS OF SAVINGS (ACTUAL OR ANTICIPATED), LOSS OF OPPORTUNITY, LOSS OF REPUTATION, LOSS OF GOODWILL OR FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES RESULTING FROM THE INSTALLATION, USE OR INABILITY TO USE THE OCTOBER CMS SOFTWARE, WHETHER ARISING FROM ANY BREACH OF CONTRACT, NEGLIGENCE OR ANY OTHER THEORY OF LIABILITY, EVEN IF THE COMPANY WAS PREVIOUSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE LICENSEE SHALL BE SOLELY RESPONSIBLE FOR DETERMINING THE SUITABILITY OF THE LICENSED SOFTWARE AND ALL RISKS ASSOCIATED WITH ITS USE.
|
||||||
|
|
||||||
|
IN NO EVENT WILL THE COMPANY’S AGGREGATE LIABILITY TO YOU FOR ANY CLAIMS CONNECTED WITH THIS EULA OR THE OCTOBER CMS SOFTWARE, INCLUDING THOSE ARISING FROM ANY BREACH OF CONTRACT OR NEGLIGENCE, EXCEED THE AMOUNT ACTUALLY PAID BY YOU TO THE COMPANY FOR THE OCTOBER CMS SOFTWARE IN THE TWELVE MONTHS PRECEDING THE DATE WHEN THE CLAIM FIRST AROSE.
|
||||||
|
|
||||||
|
NOTWITHSTANDING ANYTHING TO THE FOREGOING, NOTHING IN THIS PROVISION SHALL LIMIT EITHER PARTY’S LIABILITY FOR ANY FRAUD OR LIABILITY THAT CANNOT BE LIMITED BY LAW.
|
||||||
|
|
||||||
|
<a name="Waiver"></a>
|
||||||
|
## 13. Waiver
|
||||||
|
|
||||||
|
YOU HEREBY RELEASE THE COMPANY AND ITS OFFICERS FROM ALL UNKNOWN RISKS ARISING OUT OF OR ASSOCIATED WITH THE USE OF THE OCTOBER CMS SOFTWARE. IF YOU ARE A RESIDENT IN THE STATE OF CALIFORNIA, U.S.A., YOU EXPRESSLY WAIVE CALIFORNIA CIVIL CODE SECTION 1542, OR OTHER SIMILAR LAW APPLICABLE TO YOU, WHICH STATES: “A GENERAL RELEASE DOES NOT EXTEND TO CLAIMS WHICH THE CREDITOR DOES NOT KNOW OR SUSPECT TO EXIST IN HIS OR HER FAVOR AT THE TIME OF EXECUTING THE RELEASE, WHICH IF KNOWN BY HIM OR HER MUST HAVE MATERIALLY AFFECTED HIS OR HER SETTLEMENT WITH THE DEBTOR OR RELEASED PARTY. ”
|
||||||
|
|
||||||
|
**YOU ACKNOWLEDGE AND AGREE THAT THE LIMITATION OF LIABILITY AND THE WAIVER SET FORTH ABOVE REFLECT A REASONABLE AND FAIR ALLOCATION OF RISK BETWEEN YOU AND THE COMPANY AND THAT THESE PROVISIONS FORM AN ESSENTIAL BASIS OF THE BARGAIN BETWEEN YOU AND THE COMPANY. THE COMPANY WOULD NOT BE ABLE TO PROVIDE THE OCTOBER CMS SOFTWARE TO YOU ON AN ECONOMICALLY REASONABLE BASIS WITHOUT THESE LIMITATIONS.**
|
||||||
|
|
||||||
|
<a name="Indemnification"></a>
|
||||||
|
## 14. Indemnification
|
||||||
|
|
||||||
|
14.1 The Company will defend or settle any claims against you that allege that the October CMS Software as supplied to you for installation and use in accordance with this EULA and Documentation infringes the intellectual property rights of a third party provided that:
|
||||||
|
|
||||||
|
14.1.1 You immediately notify the Company of any such claim that relates to this indemnity;
|
||||||
|
|
||||||
|
14.1.2 The Company has the sole right to control the defence or settlement of such claim; and
|
||||||
|
|
||||||
|
14.1.3 You provide the Company with all reasonable assistance in relation to the defence.
|
||||||
|
|
||||||
|
14.2 For any claims of infringement of intellectual property mentioned in Section 14.1, the Company reserves the right to:
|
||||||
|
|
||||||
|
14.2.1 Modify or replace the Licensed Software to make it non-infringing provided such modification or replacement does not substantively change the functionality of the Licensed Software; or
|
||||||
|
|
||||||
|
14.2.2 Acquire at its own expense the right for you to continue the use of the Licensed Software; or
|
||||||
|
|
||||||
|
14.2.3 Terminate the Project license and direct you to cease the use of the Licensed Software. In such cases, the Company will provide you with a full refund of the License Fees paid by you for the Licensed Software in the preceding 12 months. Please note that where the Company directs you to cease the use of the October CMS Software due to a third party claim of infringement, you are under a legal obligation to immediately cease such use.
|
||||||
|
|
||||||
|
Unless otherwise provided by law, this Section 14 sets out your exclusive remedies for any infringement of intellectual property claims made by a third party against you and nothing in this EULA will create any obligations on the Company to offer greater indemnity. The Company does not have any obligation to defend or indemnify any other third party.
|
||||||
|
|
||||||
|
14.3 The Company shall not have any obligation to indemnify you if:
|
||||||
|
|
||||||
|
14.3.1 The infringement arises out of any Modification of the October CMS Software;
|
||||||
|
|
||||||
|
14.3.2 The infringement arises from any combination, operation, or use of the Licensed Software with any other third party software;
|
||||||
|
|
||||||
|
14.3.3 The infringement arises from the use of the Licensed Software in breach of this EULA;
|
||||||
|
|
||||||
|
14.3.4 The infringement arises from the use of the Licensed Software after the Company has informed you to cease the use of the Licensed Software due to possible claims.
|
||||||
|
|
||||||
|
14.4 You will indemnify the Company against any third party claims, damages, losses and costs, including reasonable attorney fees arising from:
|
||||||
|
|
||||||
|
14.4.1 Your actions or omissions (actual or alleged), including without limitation, claims that your actions or omission infringe any third party’s intellectual property rights; or
|
||||||
|
|
||||||
|
14.4.2 Your violation of any applicable laws; or
|
||||||
|
|
||||||
|
14.4.3 Your breach of this EULA.
|
||||||
|
|
||||||
|
<a name="Compliance-with-the-Laws"></a>
|
||||||
|
## 15. Compliance with the Laws
|
||||||
|
|
||||||
|
You will only install/use the October CMS Software and fulfil all your obligations under this EULA in compliance with all applicable laws. You hereby confirm that neither you nor the corporate entity that you represent is subject or target of any government Sanctions, and your use of the October CMS Software would not result in violation of any Sanctions by the Company.
|
||||||
|
|
||||||
|
You further confirm that the Licensed Software will not be used by any individual or entity engaged in any of the following activities: (i) Terrorist activities; (ii) design, development or production of any weapons of mass destruction; or (iii) any other illegal activity.
|
||||||
|
|
||||||
|
<a name="Data-Protection"></a>
|
||||||
|
## 16. Data Protection
|
||||||
|
|
||||||
|
The Company only collects minimal personal data from the Licensee, as described in our Privacy Policy. The Company does not process any data on behalf of the Licensee, and the Licensee shall be solely responsible for compliance with applicable data protection laws for any data it controls or processes.
|
||||||
|
|
||||||
|
<a name="Delivery"></a>
|
||||||
|
## 17. Delivery
|
||||||
|
|
||||||
|
The Company will deliver the October CMS Software and this EULA to you by electronic download.
|
||||||
|
|
||||||
|
<a name="General"></a>
|
||||||
|
## 18. General
|
||||||
|
|
||||||
|
### 18.1 Amendments
|
||||||
|
|
||||||
|
The Company reserves the right to amend the terms and conditions of this EULA at any time and without giving any prior notice to you. You acknowledge that you are responsible for periodically reviewing this EULA to familiarise yourself with any changes. Your continued use of the October CMS Software after any changes to the EULA shall constitute your consent to such change. You can access the latest version of the EULA by visiting https://octobercms.com/eula
|
||||||
|
|
||||||
|
### 18.2 Assignment
|
||||||
|
|
||||||
|
You may not assign any rights and obligations under this EULA, in whole or in part, without an authorised Company representative's written consent. Any attempt to assign any rights and obligations without the Company's consent shall be void. The Company reserves the right to assign any of its rights and obligations under this EULA to a third party without requiring your consent.
|
||||||
|
|
||||||
|
### 18.3 Notices
|
||||||
|
|
||||||
|
You hereby consent to receive all notices and communication from the Company electronically.
|
||||||
|
|
||||||
|
All notices to the Company under this EULA shall be sent to:
|
||||||
|
|
||||||
|
PO Box 47<br />
|
||||||
|
Queanbeyan NSW 2620<br />
|
||||||
|
Australia
|
||||||
|
|
||||||
|
For any other questions relating to this EULA, please contact us at https://octobercms.com/contact
|
||||||
|
|
||||||
|
### 18.4 Governing Law and Jurisdiction
|
||||||
|
|
||||||
|
This EULA shall be governed by and construed in accordance with the laws of the state of New South Wales, Australia, without giving effect to any principles of conflict of laws. The parties hereby agree to submit to the non-exclusive jurisdiction of the courts of New South Wales to decide any matter arising out of these Terms. Both Parties hereby agree that the United Nations Convention on Contracts for the International Sale of Goods will not apply to this EULA.
|
||||||
|
|
||||||
|
### 18.5 Force Majeure
|
||||||
|
|
||||||
|
Neither Party will be liable to the other for any failure or delay in the performance of its obligations to the extent that such failure or delay is caused by any unforeseen events which are beyond the reasonable control of the obligated Party such as an act of God, strike, war, terrorism, epidemic, internet or telecommunication outage or other similar events, and the obligated Party is not able to avoid or remove the force measure by taking reasonable measures.
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://github.com/octobercms/october/blob/develop/themes/demo/assets/images/october.png?raw=true" alt="October" width="25%" height="25%" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
[October](https://octobercms.com) is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of frustration with existing systems. We feel building websites has become a convoluted and confusing process that leaves developers unsatisfied. We want to turn you around to the simpler side and get back to basics.
|
||||||
|
|
||||||
|
October's mission is to show the world that web development is not rocket science.
|
||||||
|
|
||||||
|
[](https://octobercms.com/)
|
||||||
|
[](https://docs.octobercms.com/)
|
||||||
|
[](https://octobercms.com/changelog)
|
||||||
|
[](./LICENSE.md)
|
||||||
|
|
||||||
|
> *Please note*: October is open source but it is not free software. A license with a small fee is required for each website you build with October CMS.
|
||||||
|
|
||||||
|
## Installing October
|
||||||
|
|
||||||
|
Instructions on how to install October can be found at the [installation guide](https://docs.octobercms.com/3.x/setup/installation.html).
|
||||||
|
|
||||||
|
### Quick Start Installation
|
||||||
|
|
||||||
|
If you have composer installed, run this in your terminal to install October CMS from command line. This will place the files in a directory named **myoctober**.
|
||||||
|
|
||||||
|
composer create-project october/october myoctober
|
||||||
|
|
||||||
|
If you plan on using a database, run this command inside the application directory.
|
||||||
|
|
||||||
|
php artisan october:install
|
||||||
|
|
||||||
|
## Learning October
|
||||||
|
|
||||||
|
The best place to learn October CMS is by [reading the documentation](https://docs.octobercms.com) or [following some tutorials](https://octobercms.com/support/articles/tutorials).
|
||||||
|
|
||||||
|
You may also watch this [introductory video](https://www.youtube.com/watch?v=yLZTOeOS7wI). Make sure to check out our [official YouTube channel](https://www.youtube.com/c/OctoberCMSOfficial). There is also the excellent video series by [Watch & Learn](https://watch-learn.com/series/making-websites-with-october-cms).
|
||||||
|
|
||||||
|
For code examples of building with October CMS, visit the [RainLab Plugin Suite](https://github.com/rainlab) or the [October Demos Repo](https://github.com/octoberdemos).
|
||||||
|
|
||||||
|
## Coding Standards
|
||||||
|
|
||||||
|
Please follow the following guides and code standards:
|
||||||
|
|
||||||
|
* [PSR 4 Coding Standards](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md)
|
||||||
|
* [PSR 2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
|
||||||
|
* [PSR 1 Coding Standards](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
|
||||||
|
|
||||||
|
## Security Vulnerabilities
|
||||||
|
|
||||||
|
Please review [our security policy](https://github.com/octobercms/october/security/policy) on how to report security vulnerabilities.
|
||||||
|
|
||||||
|
## Development Team
|
||||||
|
|
||||||
|
October CMS was created by [Alexey Bobkov](https://www.linkedin.com/in/alexey-bobkov-232ba02b/) and [Samuel Georges](https://www.linkedin.com/in/samuel-georges-0a964131/), who both continue to develop the platform.
|
||||||
|
|
||||||
|
## Foundation library
|
||||||
|
|
||||||
|
The CMS uses [Laravel](https://laravel.com) as a foundation PHP framework.
|
||||||
|
|
||||||
|
## Contact
|
||||||
|
|
||||||
|
For announcements and updates:
|
||||||
|
|
||||||
|
* [Contact Us Page](http://octoberdev.test/contact)
|
||||||
|
* [Follow us on Twitter](https://twitter.com/octobercms)
|
||||||
|
* [Like us on Facebook](https://facebook.com/octobercms)
|
||||||
|
|
||||||
|
To chat or hang out:
|
||||||
|
|
||||||
|
* [Join us on Slack](https://octobercms.slack.com)
|
||||||
|
* [Join us on Discord](https://discord.gg/gEKgwSZ)
|
||||||
|
* [Join us on Telegram](https://t.me/octoberchat)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The October CMS platform is licensed software, see [End User License Agreement](./LICENSE.md) (EULA) for more details.
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Security Policy
|
||||||
|
|
||||||
|
**PLEASE DO NOT DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).**
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
October CMS is an evergreen product, no one version is singled out for security fixes because there is no way to update just one version. Builds are continually released and security fixes will always be available in the latest build.
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
If you discover a security vulnerability within October CMS, please send an email to the team at hello@octobercms.com. All security vulnerabilities will be promptly addressed.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php namespace App;
|
||||||
|
|
||||||
|
use System\Classes\AppBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provider is an application level plugin, all registration methods are supported.
|
||||||
|
*/
|
||||||
|
class Provider extends AppBase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* register method, called when the app is first registered.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
parent::register();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* boot method, called right before the request route.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
uuid: 6947ff28-b660-47d7-9240-24ca6d58aeae
|
||||||
|
handle: Blog\Author
|
||||||
|
type: entry
|
||||||
|
name: Author
|
||||||
|
drafts: false
|
||||||
|
|
||||||
|
navigation:
|
||||||
|
parent: Blog\Post
|
||||||
|
icon: octo-icon-user
|
||||||
|
order: 200
|
||||||
|
|
||||||
|
fields:
|
||||||
|
avatar:
|
||||||
|
label: Avatar
|
||||||
|
type: mediafinder
|
||||||
|
mode: image
|
||||||
|
|
||||||
|
role:
|
||||||
|
label: Role
|
||||||
|
type: text
|
||||||
|
|
||||||
|
about:
|
||||||
|
label: About
|
||||||
|
type: textarea
|
||||||
|
|
||||||
|
_social_links:
|
||||||
|
type: mixin
|
||||||
|
label: Social Links
|
||||||
|
source: Fields\SocialLinks
|
||||||
|
tab: Social
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
uuid: b022a74b-15e6-4c6b-9eb9-17efc5103543
|
||||||
|
type: structure
|
||||||
|
handle: Blog\Category
|
||||||
|
name: Category
|
||||||
|
drafts: false
|
||||||
|
|
||||||
|
structure:
|
||||||
|
maxDepth: 1
|
||||||
|
|
||||||
|
navigation:
|
||||||
|
parent: Blog\Post
|
||||||
|
icon: octo-icon-list-ul
|
||||||
|
order: 150
|
||||||
|
|
||||||
|
fields:
|
||||||
|
description:
|
||||||
|
label: Description
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
uuid: 3328c303-7989-462e-b866-27e7037ba275
|
||||||
|
handle: Blog\Config
|
||||||
|
type: global
|
||||||
|
name: Blog Settings
|
||||||
|
|
||||||
|
navigation:
|
||||||
|
parent: Blog\Post
|
||||||
|
icon: octo-icon-cog
|
||||||
|
order: 200
|
||||||
|
|
||||||
|
fields:
|
||||||
|
blog_name:
|
||||||
|
label: Blog Name
|
||||||
|
tab: General
|
||||||
|
placeholder: Latest News
|
||||||
|
|
||||||
|
about_this_blog:
|
||||||
|
label: About This Blog
|
||||||
|
comment: Customize this section to tell your visitors a little bit about your publication, writers, content, or something else entirely. Totally up to you.
|
||||||
|
type: textarea
|
||||||
|
size: small
|
||||||
|
tab: General
|
||||||
|
|
||||||
|
_section1:
|
||||||
|
label: Social Links
|
||||||
|
type: section
|
||||||
|
tab: General
|
||||||
|
|
||||||
|
_social_links:
|
||||||
|
type: mixin
|
||||||
|
source: Fields\SocialLinks
|
||||||
|
tab: General
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
uuid: 4d7fd1e4-85f2-48f5-947e-92819fc8664b
|
||||||
|
handle: Blog\PostContent
|
||||||
|
type: mixin
|
||||||
|
name: Blog Post Content
|
||||||
|
|
||||||
|
fields:
|
||||||
|
banner:
|
||||||
|
tab: Manage
|
||||||
|
label: Banner
|
||||||
|
type: fileupload
|
||||||
|
mode: image
|
||||||
|
maxFiles: 1
|
||||||
|
|
||||||
|
author:
|
||||||
|
tab: Manage
|
||||||
|
label: Author
|
||||||
|
commentAbove: 'Select the author for this blog post'
|
||||||
|
type: entries
|
||||||
|
maxItems: 1
|
||||||
|
source: Blog\Author
|
||||||
|
|
||||||
|
categories:
|
||||||
|
tab: Manage
|
||||||
|
label: Categories
|
||||||
|
commentAbove: 'Select categories the blog post belongs to'
|
||||||
|
type: entries
|
||||||
|
source: Blog\Category
|
||||||
|
|
||||||
|
featured_text:
|
||||||
|
tab: Featured
|
||||||
|
label: Featured Text
|
||||||
|
type: textarea
|
||||||
|
size: small
|
||||||
|
|
||||||
|
gallery:
|
||||||
|
label: Gallery
|
||||||
|
type: fileupload
|
||||||
|
mode: image
|
||||||
|
span: adaptive
|
||||||
|
tab: Gallery
|
||||||
|
|
||||||
|
gallery_media:
|
||||||
|
label: Media
|
||||||
|
type: mediafinder
|
||||||
|
mode: image
|
||||||
|
span: adaptive
|
||||||
|
tab: Media
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
uuid: edcd102e-0525-4e4d-b07e-633ae6c18db6
|
||||||
|
handle: Blog\Post
|
||||||
|
type: stream
|
||||||
|
name: Post
|
||||||
|
drafts: true
|
||||||
|
|
||||||
|
primaryNavigation:
|
||||||
|
label: Blog
|
||||||
|
icon: octo-icon-file
|
||||||
|
iconSvg: modules/tailor/assets/images/blog-icon.svg
|
||||||
|
order: 95
|
||||||
|
|
||||||
|
navigation:
|
||||||
|
icon: octo-icon-pencil
|
||||||
|
order: 100
|
||||||
|
|
||||||
|
groups:
|
||||||
|
regular_post:
|
||||||
|
name: Regular Post
|
||||||
|
fields:
|
||||||
|
content:
|
||||||
|
tab: Edit
|
||||||
|
label: Content
|
||||||
|
type: richeditor
|
||||||
|
span: adaptive
|
||||||
|
|
||||||
|
_blog_post_content:
|
||||||
|
type: mixin
|
||||||
|
source: Blog\PostContent
|
||||||
|
|
||||||
|
markdown_post:
|
||||||
|
name: Markdown Post
|
||||||
|
fields:
|
||||||
|
content:
|
||||||
|
tab: Edit
|
||||||
|
label: Content
|
||||||
|
type: markdown
|
||||||
|
span: adaptive
|
||||||
|
|
||||||
|
_blog_post_content:
|
||||||
|
type: mixin
|
||||||
|
source: Blog\PostContent
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
uuid: ae2d2c25-3a0e-4765-8b36-d1666fc0e31f
|
||||||
|
name: Social Links
|
||||||
|
type: mixin
|
||||||
|
handle: Fields\SocialLinks
|
||||||
|
|
||||||
|
fields:
|
||||||
|
social_links:
|
||||||
|
type: repeater
|
||||||
|
prompt: Add Link
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
platform:
|
||||||
|
span: auto
|
||||||
|
label: Platform
|
||||||
|
type: dropdown
|
||||||
|
options:
|
||||||
|
facebook: Facebook
|
||||||
|
linkedin: LinkedIn
|
||||||
|
dribbble: Dribbble
|
||||||
|
twitter: Twitter
|
||||||
|
youtube: YouTube
|
||||||
|
|
||||||
|
url:
|
||||||
|
span: auto
|
||||||
|
label: Social Link
|
||||||
|
type: text
|
||||||
|
placeholder: "https://..."
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
uuid: 7b193500-ac0b-481f-a79c-2a362646364d
|
||||||
|
handle: BlockBuilder
|
||||||
|
type: mixin
|
||||||
|
name: Block Builder
|
||||||
|
|
||||||
|
fields:
|
||||||
|
blocks:
|
||||||
|
label: Blocks
|
||||||
|
type: repeater
|
||||||
|
displayMode: builder
|
||||||
|
span: adaptive
|
||||||
|
tab: Blocks
|
||||||
|
groups:
|
||||||
|
image_slice:
|
||||||
|
name: Image Slice
|
||||||
|
description: A large image with an angled slice.
|
||||||
|
icon: octo-icon-picture
|
||||||
|
fields:
|
||||||
|
_mixin:
|
||||||
|
type: mixin
|
||||||
|
source: Blocks\ImageSlice
|
||||||
|
|
||||||
|
paragraph_block:
|
||||||
|
name: Paragraph Block
|
||||||
|
description: Simple paragraph with image
|
||||||
|
icon: octo-icon-text-h1
|
||||||
|
fields:
|
||||||
|
_mixin:
|
||||||
|
type: mixin
|
||||||
|
source: Blocks\ParagraphBlock
|
||||||
|
|
||||||
|
detailed_block:
|
||||||
|
name: Detailed Block
|
||||||
|
description: Detailed paragraph with image and list
|
||||||
|
icon: octo-icon-diamond
|
||||||
|
fields:
|
||||||
|
_mixin:
|
||||||
|
type: mixin
|
||||||
|
source: Blocks\DetailedBlock
|
||||||
|
|
||||||
|
scoreboard_metrics:
|
||||||
|
name: Scoreboard Metrics
|
||||||
|
description: Show some impressive metrics about the business.
|
||||||
|
icon: icon-quote-right
|
||||||
|
fields:
|
||||||
|
_mixin:
|
||||||
|
type: mixin
|
||||||
|
source: Blocks\ScoreboardMetrics
|
||||||
|
|
||||||
|
team_leaders:
|
||||||
|
name: Team Leaders
|
||||||
|
description: Display the team members.
|
||||||
|
icon: octo-icon-comment
|
||||||
|
fields:
|
||||||
|
_mixin:
|
||||||
|
type: mixin
|
||||||
|
source: Blocks\TeamLeaders
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
uuid: da034c4f-0e24-4906-94b9-66b26c0549c9
|
||||||
|
name: Detailed Block
|
||||||
|
type: mixin
|
||||||
|
handle: Blocks\DetailedBlock
|
||||||
|
|
||||||
|
fields:
|
||||||
|
title:
|
||||||
|
label: Title
|
||||||
|
type: text
|
||||||
|
|
||||||
|
content:
|
||||||
|
label: Description
|
||||||
|
type: richeditor
|
||||||
|
size: small
|
||||||
|
|
||||||
|
list_items:
|
||||||
|
label: List Items
|
||||||
|
type: datatable
|
||||||
|
btnAddRowLabel: Add Item
|
||||||
|
btnDeleteRowLabel: Delete Item
|
||||||
|
columns:
|
||||||
|
text:
|
||||||
|
type: string
|
||||||
|
title: Text
|
||||||
|
|
||||||
|
button_text:
|
||||||
|
label: Button Text
|
||||||
|
span: auto
|
||||||
|
placeholder: Main call to action
|
||||||
|
|
||||||
|
button_url:
|
||||||
|
label: Button URL
|
||||||
|
span: auto
|
||||||
|
|
||||||
|
image:
|
||||||
|
label: Image
|
||||||
|
type: mediafinder
|
||||||
|
mode: image
|
||||||
|
maxItems: 1
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
uuid: 21aad99b-d3c6-4f5e-b271-15471c81e11b
|
||||||
|
name: Image Slice
|
||||||
|
type: mixin
|
||||||
|
handle: Blocks\ImageSlice
|
||||||
|
|
||||||
|
fields:
|
||||||
|
image:
|
||||||
|
label: Image
|
||||||
|
type: mediafinder
|
||||||
|
mode: image
|
||||||
|
maxItems: 1
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
uuid: 015fde4b-23d8-4ba3-8e78-9c6ebfb5fcf7
|
||||||
|
name: Paragraph Block
|
||||||
|
type: mixin
|
||||||
|
handle: Blocks\ParagraphBlock
|
||||||
|
|
||||||
|
fields:
|
||||||
|
title:
|
||||||
|
label: Title
|
||||||
|
type: text
|
||||||
|
|
||||||
|
content:
|
||||||
|
label: Description
|
||||||
|
type: richeditor
|
||||||
|
size: small
|
||||||
|
|
||||||
|
image:
|
||||||
|
label: Image
|
||||||
|
type: mediafinder
|
||||||
|
mode: image
|
||||||
|
maxItems: 1
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
uuid: 55615b16-120f-4be9-9429-6ae6dabc523c
|
||||||
|
name: Scoreboard Metrics
|
||||||
|
type: mixin
|
||||||
|
handle: Blocks\ScoreboardMetrics
|
||||||
|
|
||||||
|
fields:
|
||||||
|
metrics:
|
||||||
|
label: Metrics
|
||||||
|
type: repeater
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
number:
|
||||||
|
label: Number
|
||||||
|
type: number
|
||||||
|
span: row
|
||||||
|
spanClass: col-md-3
|
||||||
|
|
||||||
|
description:
|
||||||
|
label: Description
|
||||||
|
type: text
|
||||||
|
span: row
|
||||||
|
spanClass: col-md-9
|
||||||
|
|
||||||
|
icon:
|
||||||
|
label: Icon
|
||||||
|
type: radio
|
||||||
|
cssClass: inline-options
|
||||||
|
options:
|
||||||
|
notepad: Notepad
|
||||||
|
shield: Shield
|
||||||
|
basket: Basket
|
||||||
|
briefcase: Briefcase
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
uuid: 8c4041cf-f16d-46f8-86be-9372a266ae6d
|
||||||
|
name: Team Leaders
|
||||||
|
type: mixin
|
||||||
|
handle: Blocks\TeamLeaders
|
||||||
|
|
||||||
|
fields:
|
||||||
|
members:
|
||||||
|
label: Members
|
||||||
|
type: repeater
|
||||||
|
itemsExpanded: false
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
title:
|
||||||
|
label: Title
|
||||||
|
span: left
|
||||||
|
|
||||||
|
role:
|
||||||
|
label: Role
|
||||||
|
span: right
|
||||||
|
|
||||||
|
description:
|
||||||
|
label: Description
|
||||||
|
type: textarea
|
||||||
|
size: tiny
|
||||||
|
|
||||||
|
avatar:
|
||||||
|
label: Image
|
||||||
|
type: mediafinder
|
||||||
|
mode: image
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
_social_links:
|
||||||
|
label: Social Links
|
||||||
|
type: mixin
|
||||||
|
source: Fields\SocialLinks
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
uuid: a63fabaf-7c0b-4c74-b36f-7abf1a3ad1c1
|
||||||
|
handle: LandingPage
|
||||||
|
type: single
|
||||||
|
name: Landing Page
|
||||||
|
drafts: true
|
||||||
|
|
||||||
|
navigation:
|
||||||
|
icon: icon-rocket
|
||||||
|
|
||||||
|
fields:
|
||||||
|
block_builder:
|
||||||
|
type: mixin
|
||||||
|
source: BlockBuilder
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
uuid: 6743a1c3-3e57-4cfa-a886-e0c0a277fd71
|
||||||
|
handle: Site\Sitemap
|
||||||
|
type: structure
|
||||||
|
name: Sitemap
|
||||||
|
drafts: false
|
||||||
|
pagefinder: false
|
||||||
|
|
||||||
|
structure:
|
||||||
|
maxDepth: 1
|
||||||
|
|
||||||
|
navigation:
|
||||||
|
parent: settings
|
||||||
|
icon: icon-sitemap
|
||||||
|
description: Specify pages to appear in the sitemap for your website.
|
||||||
|
category: CATEGORY_CMS
|
||||||
|
|
||||||
|
fields:
|
||||||
|
reference:
|
||||||
|
label: Reference
|
||||||
|
type: pagefinder
|
||||||
|
|
||||||
|
priority:
|
||||||
|
label: Priority
|
||||||
|
commentAbove: The priority of this URL relative to other URLs on your site.
|
||||||
|
type: radio
|
||||||
|
inlineOptions: true
|
||||||
|
options:
|
||||||
|
'0.1': '0.1'
|
||||||
|
'0.2': '0.2'
|
||||||
|
'0.3': '0.3'
|
||||||
|
'0.4': '0.4'
|
||||||
|
'0.5': '0.5'
|
||||||
|
'0.6': '0.6'
|
||||||
|
'0.7': '0.7'
|
||||||
|
'0.8': '0.8'
|
||||||
|
'0.9': '0.9'
|
||||||
|
'1.0': '1.0'
|
||||||
|
|
||||||
|
changefreq:
|
||||||
|
commentAbove: How frequently the page is likely to change.
|
||||||
|
label: Change Frequency
|
||||||
|
type: radio
|
||||||
|
inlineOptions: true
|
||||||
|
options:
|
||||||
|
always: Always
|
||||||
|
hourly: Hourly
|
||||||
|
daily: Daily
|
||||||
|
weekly: Weekly
|
||||||
|
monthly: Monthly
|
||||||
|
yearly: Yearly
|
||||||
|
never: Never
|
||||||
|
|
||||||
|
nesting:
|
||||||
|
label: Include nested items
|
||||||
|
shortLabel: Nesting
|
||||||
|
comment: Nested items could be generated dynamically by supported page references.
|
||||||
|
type: checkbox
|
||||||
|
|
||||||
|
replace:
|
||||||
|
label: Replace this item with its generated children
|
||||||
|
comment: Use this checkbox to push generated menu items to the same level with this item. This item itself will be hidden.
|
||||||
|
type: checkbox
|
||||||
|
column: false
|
||||||
|
scope: false
|
||||||
|
trigger:
|
||||||
|
action: disable|empty
|
||||||
|
field: nesting
|
||||||
|
condition: unchecked
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
uuid: 339b11b7-69ad-43c4-9be1-6953e7738827
|
||||||
|
handle: Wiki\Article
|
||||||
|
type: structure
|
||||||
|
name: Article
|
||||||
|
drafts: true
|
||||||
|
|
||||||
|
structure:
|
||||||
|
maxDepth: 3
|
||||||
|
|
||||||
|
navigation:
|
||||||
|
icon: icon-wikipedia-w
|
||||||
|
|
||||||
|
fields:
|
||||||
|
content:
|
||||||
|
label: Content
|
||||||
|
tab: Edit
|
||||||
|
type: richeditor
|
||||||
|
span: adaptive
|
||||||
|
|
||||||
|
banner:
|
||||||
|
label: Banner
|
||||||
|
type: fileupload
|
||||||
|
mode: image
|
||||||
|
maxFiles: 1
|
||||||
|
|
||||||
|
show_in_toc:
|
||||||
|
label: Show in TOC
|
||||||
|
comment: Include this article in the table of contents
|
||||||
|
type: checkbox
|
||||||
|
|
||||||
|
summary_text:
|
||||||
|
label: Summary Text
|
||||||
|
type: textarea
|
||||||
|
size: small
|
||||||
|
|
||||||
|
gallery:
|
||||||
|
label: Gallery
|
||||||
|
type: fileupload
|
||||||
|
mode: image
|
||||||
|
|
||||||
|
external_links:
|
||||||
|
label: External Links
|
||||||
|
tab: Links
|
||||||
|
type: repeater
|
||||||
|
form:
|
||||||
|
fields:
|
||||||
|
link_text:
|
||||||
|
label: Link Text
|
||||||
|
span: auto
|
||||||
|
|
||||||
|
link_url:
|
||||||
|
label: Link URL
|
||||||
|
span: auto
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/bootstrap/autoload.php';
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Artisan Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When we run the console application, the current CLI command will be
|
||||||
|
| executed in this console and the response sent back to a terminal
|
||||||
|
| or another output device for the developers. Here goes nothing!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||||
|
|
||||||
|
$status = $kernel->handle(
|
||||||
|
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||||
|
new Symfony\Component\Console\Output\ConsoleOutput
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Shutdown The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once Artisan has finished running. We will fire off the shutdown events
|
||||||
|
| so that any final work may be done by the application before we shut
|
||||||
|
| down the process. This is the last thing to happen to the request.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel->terminate($input, $status);
|
||||||
|
|
||||||
|
exit($status);
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Create The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The first thing we will do is create a new Laravel application instance
|
||||||
|
| which serves as the "glue" for all the components of Laravel, and is
|
||||||
|
| the IoC container for the system binding all of the various parts.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = new October\Rain\Foundation\Application(
|
||||||
|
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Bind Important Interfaces
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, we need to bind some important interfaces into the container so
|
||||||
|
| we will be able to resolve them when needed. The kernels serve the
|
||||||
|
| incoming requests to this application from both the web and CLI.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Http\Kernel::class,
|
||||||
|
October\Rain\Foundation\Http\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Console\Kernel::class,
|
||||||
|
October\Rain\Foundation\Console\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||||
|
October\Rain\Foundation\Exception\Handler::class
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Return The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This script returns the application instance. The instance is given to
|
||||||
|
| the calling script so we can separate the building of the instances
|
||||||
|
| from the actual running of the application and sending responses.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
return $app;
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register Core Helpers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| We cannot rely on Composer's load order when calculating the weight of
|
||||||
|
| each package. This line ensures that the core global helpers are
|
||||||
|
| always given priority one status.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$helperPath = __DIR__ . '/../vendor/october/rain/src/Support/helpers.php';
|
||||||
|
|
||||||
|
if (!file_exists($helperPath)) {
|
||||||
|
echo 'Missing vendor files, try running "composer install" to install October CMS' . PHP_EOL;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
require $helperPath;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader for
|
||||||
|
| this application. We just need to utilize it! We'll simply require it
|
||||||
|
| into the script here so we don't need to manually load our classes.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Include The Compiled Class File
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| To dramatically increase your application's performance, you may use a
|
||||||
|
| compiled class file which contains all of the classes commonly used
|
||||||
|
| by a request. The Artisan "optimize" is used to create this file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$compiledPath = __DIR__ . '/../storage/framework/compiled.php';
|
||||||
|
|
||||||
|
if (file_exists($compiledPath)) {
|
||||||
|
require $compiledPath;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"name": "october/october",
|
||||||
|
"description": "Built using October CMS: The Laravel-Based CMS Engineered For Simplicity",
|
||||||
|
"type": "project",
|
||||||
|
"homepage": "https://octobercms.com",
|
||||||
|
"license": "proprietary",
|
||||||
|
"require": {
|
||||||
|
"php": "^8.0.2",
|
||||||
|
"october/rain": "^3.3",
|
||||||
|
"laravel/framework": "^9.0",
|
||||||
|
"october/all": "^3.3",
|
||||||
|
"rainlab/pages-plugin": "^1.5",
|
||||||
|
"rainlab/builder-plugin": "^1.2.5",
|
||||||
|
"blakejones/magicforms-plugin": "^1.6",
|
||||||
|
"rainlab/translate-plugin": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^8.5|^9.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"post-root-package-install": [
|
||||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"php artisan key:generate --ansi"
|
||||||
|
],
|
||||||
|
"post-autoload-dump": [
|
||||||
|
"System\\Console\\ComposerScript::postAutoloadDump"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"System\\Console\\ComposerScript::postUpdateCmd"
|
||||||
|
],
|
||||||
|
"pre-package-uninstall": [
|
||||||
|
"System\\Console\\ComposerScript::prePackageUninstall"
|
||||||
|
],
|
||||||
|
"test": [
|
||||||
|
"phpunit --stop-on-failure"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"preferred-install": "dist",
|
||||||
|
"allow-plugins": {
|
||||||
|
"composer/installers": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app",
|
||||||
|
"System\\Console\\": "modules/system/console"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"repositories": {
|
||||||
|
"octobercms": {
|
||||||
|
"type": "composer",
|
||||||
|
"url": "https://gateway.octobercms.com",
|
||||||
|
"only": ["october/*", "*-plugin", "*-theme"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,161 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value is the name of your application. This value is used when the
|
||||||
|
| framework needs to place the application's name in a notification or
|
||||||
|
| any other location as required by the application or its packages.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'name' => env('APP_NAME', 'October CMS'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Environment
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the "environment" your application is currently
|
||||||
|
| running in. This may determine how you prefer to configure various
|
||||||
|
| services the application utilizes. Set this in your ".env" file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Debug Mode
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When your application is in debug mode, detailed error messages with
|
||||||
|
| stack traces will be shown on every error that occurs within your
|
||||||
|
| application. If disabled, a simple generic error page is shown.
|
||||||
|
|
|
||||||
|
| You can create a CMS page with route "/error" to set the contents
|
||||||
|
| of this page. Otherwise a default error page is shown.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'debug' => (bool) env('APP_DEBUG', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This URL is used by the console to properly generate URLs when using
|
||||||
|
| the Artisan command line tool. You should set this to the root of
|
||||||
|
| your application so that it is used when running Artisan tasks.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
|
'asset_url' => env('ASSET_URL'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Locale Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The application locale determines the default locale that will be used
|
||||||
|
| by the translation service provider. You are free to set this value
|
||||||
|
| to any of the locales which will be supported by the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'locale' => env('APP_LOCALE', 'en'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Fallback Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The fallback locale determines the locale to use when the current one
|
||||||
|
| is not available. You may change the value to correspond to any of
|
||||||
|
| the language folders that are provided through your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This key is used by the Illuminate encrypter service and should be set
|
||||||
|
| to a random, 32 character string, otherwise these encrypted strings
|
||||||
|
| will not be safe. Please do this before deploying an application!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
|
'cipher' => 'AES-256-CBC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Autoloaded Service Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The service providers listed here will be automatically loaded on the
|
||||||
|
| request to your application. Feel free to add your own services to
|
||||||
|
| this array to grant expanded functionality to your applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => array_merge(include(base_path('modules/system/providers.php')), [
|
||||||
|
|
||||||
|
// Core Service Provider
|
||||||
|
System\ServiceProvider::class,
|
||||||
|
|
||||||
|
// Package Service Providers...
|
||||||
|
// Illuminate\Html\HtmlServiceProvider::class, // Example
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Aliases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This array of class aliases will be registered when this application
|
||||||
|
| is started. However, feel free to register as many as you wish as
|
||||||
|
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'aliases' => array_merge(include(base_path('modules/system/aliases.php')), [
|
||||||
|
|
||||||
|
// 'Str' => Illuminate\Support\Str::class, // Example
|
||||||
|
|
||||||
|
]),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default timezone for your application, which
|
||||||
|
| will be used by the PHP date and date-time functions. We have gone
|
||||||
|
| ahead and set this to a sensible default for you out of the box.
|
||||||
|
|
|
||||||
|
|-------------------------------- WARNING! --------------------------------
|
||||||
|
|
|
||||||
|
| Before you change this value, consider carefully if that is actually
|
||||||
|
| what you want to do. It is highly recommended that this is always set
|
||||||
|
| to UTC (as your server & DB timezone should be as well) and instead
|
||||||
|
| you can use backend.timezone or cms.timezone to set the default
|
||||||
|
| timezone used to display dates & times.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'UTC',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,197 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Backend URI prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specifies the URL name used for accessing backend pages.
|
||||||
|
| For example: admin -> http://localhost/admin
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'uri' => env('BACKEND_URI', 'admin'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Backend Skin
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specifies the backend skin class to use.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'skin' => Backend\Skins\Standard::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Branding
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The default backend customization settings. These values are all optional
|
||||||
|
| and remember to set the enabled value to true. Supported values:
|
||||||
|
|
|
||||||
|
| - menu_mode: inline, text, tile, collapse, icons, left
|
||||||
|
| - color_mode: light, dark, auto
|
||||||
|
| - color_palette: default, classic, oxford, console, valentino, punch
|
||||||
|
| - login_background_type: color, wallpaper
|
||||||
|
| - login_background_wallpaper_size: auto, cover
|
||||||
|
| - login_image_type: autumn_images, custom
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'brand' => [
|
||||||
|
'enabled' => false,
|
||||||
|
'app_name' => env('APP_NAME', 'October CMS'),
|
||||||
|
'tagline' => 'Administration Panel',
|
||||||
|
'menu_mode' => 'icons',
|
||||||
|
'color_mode' => 'light',
|
||||||
|
'color_palette' => 'default',
|
||||||
|
'logo_path' => '~/app/assets/images/dagdan_logo.png',
|
||||||
|
'favicon_path' => '~/app/assets/images/favicon.png',
|
||||||
|
'menu_logo_path' => '~/app/assets/images/menu_logo.png',
|
||||||
|
'dashboard_icon_path' => '~/app/assets/images/dashboard_icon.png',
|
||||||
|
'stylesheet_path' => '~/app/assets/less/styles.less',
|
||||||
|
'login_background_type' => 'color',
|
||||||
|
'login_background_color' => '#fef6eb',
|
||||||
|
'login_background_wallpaper_size' => 'auto',
|
||||||
|
'login_image_type' => 'autumn_images',
|
||||||
|
'login_custom_image' => '~/app/assets/images/loginimage.png',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Turbo Router
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Enhance the backend experience using PJAX (push state and AJAX) so when
|
||||||
|
| you click a link, the page is automatically swapped client-side without
|
||||||
|
| the cost of a full page load.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'turbo_router' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Force HTTPS security
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Use this setting to force a secure protocol when accessing any backend
|
||||||
|
| pages, including the authentication pages. This is usually handled by
|
||||||
|
| web server config, but can be handled by the app for added security.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'force_secure' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Remember Login
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Define live duration of backend sessions:
|
||||||
|
|
|
||||||
|
| true - session never expires (cookie expiration in 5 years)
|
||||||
|
|
|
||||||
|
| false - session has a limited time (see session.lifetime)
|
||||||
|
|
|
||||||
|
| null - the form login displays a checkbox that allow user to choose
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'force_remember' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Force Single Session
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Use this setting to prevent concurrent sessions. When enabled, backend
|
||||||
|
| users cannot sign in to multiple devices at the same time. When a new
|
||||||
|
| sign in occurs, all other sessions for that user are invalidated.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'force_single_session' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Force Mail Setting
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Use this setting to remove the option to configure the mail settings
|
||||||
|
| via the backend. This can be used in developer environments to prevent
|
||||||
|
| accidentally sending mail via the configured database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'force_mail_setting' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Policy
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specify the password policy for backend administrators.
|
||||||
|
|
|
||||||
|
| min_length - Password minimum length between 4 - 128 chars
|
||||||
|
| require_uppercase - Require at least one uppercase letter (A–Z)
|
||||||
|
| require_lowercase - Require at least one lowercase letter (a–z)
|
||||||
|
| require_number - Require at least one number
|
||||||
|
| require_nonalpha - Require at least one non-alphanumeric character
|
||||||
|
| expire_days - Enable password expiration after number of days (@todo)
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password_policy' => [
|
||||||
|
'min_length' => 4,
|
||||||
|
'require_uppercase' => false,
|
||||||
|
'require_lowercase' => false,
|
||||||
|
'require_number' => false,
|
||||||
|
'require_nonalpha' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Avatar
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The default avatar used for backend accounts that have no avatar defined.
|
||||||
|
|
|
||||||
|
| local - Use a local default image of a user
|
||||||
|
| gravatar - Use the Gravatar service to generate a unique image
|
||||||
|
| <url> - Specify a custom URL to a default avatar
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default_avatar' => 'gravatar',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Backend Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This acts as the default setting for a backend user's locale. This can
|
||||||
|
| be changed by the user at any time using the backend preferences.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'locale' => env('APP_LOCALE', 'en'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Backend Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This acts as the default setting for a backend user's timezone. This can
|
||||||
|
| be changed by the user at any time using the backend preferences. All
|
||||||
|
| dates displayed in the backend will be converted to this timezone.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'UTC',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Broadcaster
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default broadcaster that will be used by the
|
||||||
|
| framework when an event needs to be broadcast. You may set this to
|
||||||
|
| any of the connections defined in the "connections" array below.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('BROADCASTING_DEFAULT', 'pusher'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Broadcast Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the broadcast connections that will be used
|
||||||
|
| to broadcast events to other systems or over websockets. Samples of
|
||||||
|
| each available type of connection are provided inside this array.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'pusher' => [
|
||||||
|
'driver' => 'pusher',
|
||||||
|
'key' => env('PUSHER_KEY'),
|
||||||
|
'secret' => env('PUSHER_SECRET'),
|
||||||
|
'app_id' => env('PUSHER_APP_ID'),
|
||||||
|
'options' => [
|
||||||
|
'cluster' => 'eu',
|
||||||
|
'encrypted' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
],
|
||||||
|
|
||||||
|
'log' => [
|
||||||
|
'driver' => 'log',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default cache connection that gets used while
|
||||||
|
| using this caching library. This connection is used when another is
|
||||||
|
| not explicitly specified when executing a given caching function.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('CACHE_DRIVER', 'file'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Stores
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the cache "stores" for your application as
|
||||||
|
| well as their drivers. You may even define multiple stores for the
|
||||||
|
| same cache driver to group types of items stored in your caches.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'stores' => [
|
||||||
|
|
||||||
|
'apc' => [
|
||||||
|
'driver' => 'apc',
|
||||||
|
],
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'driver' => 'array',
|
||||||
|
'serialize' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'table' => 'cache',
|
||||||
|
'connection' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'file' => [
|
||||||
|
'driver' => 'file',
|
||||||
|
'path' => storage_path('framework/cache/data'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'memcached' => [
|
||||||
|
'driver' => 'memcached',
|
||||||
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||||
|
'sasl' => [
|
||||||
|
env('MEMCACHED_USERNAME'),
|
||||||
|
env('MEMCACHED_PASSWORD'),
|
||||||
|
],
|
||||||
|
'options' => [
|
||||||
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||||
|
],
|
||||||
|
'servers' => [
|
||||||
|
[
|
||||||
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MEMCACHED_PORT', 11211),
|
||||||
|
'weight' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'cache',
|
||||||
|
],
|
||||||
|
|
||||||
|
'dynamodb' => [
|
||||||
|
'driver' => 'dynamodb',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||||
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Key Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||||
|
| be other applications utilizing the same cache. So, we'll specify a
|
||||||
|
| value to get prefixed to all our keys so we can avoid collisions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'october'), '_').'_cache_'),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,220 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Specifies the default CMS theme.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This parameter value can be overridden by the CMS back-end settings.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'active_theme' => env('ACTIVE_THEME', 'demo'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Themes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Globally forces all themes to store template changes in the database,
|
||||||
|
| instead of the file system. If this feature is enabled, changes will
|
||||||
|
| not be stored in the file system.
|
||||||
|
|
|
||||||
|
| false - All theme templates are sourced from the filesystem.
|
||||||
|
| true - Source theme templates from the database with fallback to the filesystem.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'database_templates' => env('CMS_DB_TEMPLATES', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Template Strictness
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When enabled, an error is thrown when a component, variable, or attribute
|
||||||
|
| used does not exist. When disabled, a null value is returned instead.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'strict_variables' => env('CMS_STRICT_VARIABLES', false),
|
||||||
|
|
||||||
|
'strict_components' => env('CMS_STRICT_COMPONENTS', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Frontend Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This acts as the default setting for a frontend user's timezone used when
|
||||||
|
| converting dates from the system setting, typically set to UTC.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'UTC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Template Caching
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specifies the number of minutes the CMS object cache lives. After the interval
|
||||||
|
| is expired item are re-cached. Note that items are re-cached automatically when
|
||||||
|
| the corresponding template file is modified.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'template_cache_ttl' => 1440,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Twig Cache
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Store a temporary cache of parsed Twig templates in the local filesystem.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enable_twig_cache' => env('CMS_TWIG_CACHE', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Determines if the routing caching is enabled.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If the caching is enabled, the page URL map is saved in the cache. If a page
|
||||||
|
| URL was changed on the disk, the old URL value could be still saved in the cache.
|
||||||
|
| To update the cache the clear:cache command should be used. It is recommended
|
||||||
|
| to disable the caching during the development, and enable it in the production mode.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enable_route_cache' => env('CMS_ROUTE_CACHE', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Time to live for the URL map.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The URL map used in the CMS page routing process. By default
|
||||||
|
| the map is updated every time when a page is saved in the backend or when the
|
||||||
|
| interval, in minutes, specified with the url_cache_ttl parameter expires.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'url_cache_ttl' => 60,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Determines if the asset caching is enabled.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If the caching is enabled, combined assets are cached. If a asset file
|
||||||
|
| is changed on the disk, the old file contents could be still saved in the cache.
|
||||||
|
| To update the cache the clear cache command should be used. It is recommended
|
||||||
|
| to disable the caching during the development, and enable it in the production mode.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enable_asset_cache' => env('CMS_ASSET_CACHE', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Determines if the asset minification is enabled.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If the minification is enabled, combined assets are compressed (minified).
|
||||||
|
| It is recommended to disable the minification during development, and
|
||||||
|
| enable it in production mode.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enable_asset_minify' => env('CMS_ASSET_MINIFY', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Check Import Timestamps When Combining Assets
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If deep hashing is enabled, the combiner cache will be reset when a change
|
||||||
|
| is detected on imported files, in addition to those referenced directly.
|
||||||
|
| This will cause slower page performance. If set to null, deep hashing
|
||||||
|
| is used when debug mode (app.debug) is enabled.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enable_asset_deep_hashing' => env('CMS_ASSET_DEEP_HASHING', null),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Site Redirect Policy
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Controls the behavior when the root URL is opened without a matched site.
|
||||||
|
|
|
||||||
|
| detect - detect the site based on the browser language
|
||||||
|
| primary - use the primary site
|
||||||
|
| <site_id> - use a specific site identifier (id)
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redirect_policy' => env('CMS_REDIRECT_POLICY', 'detect'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Force Bytecode Invalidation
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using Opcache with opcache.validate_timestamps set to 0 or APC
|
||||||
|
| with apc.stat set to 0 and Twig cache enabled, clearing the template
|
||||||
|
| cache won't update the cache, set to true to get around this.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'force_bytecode_invalidation' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Safe Mode
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If safe mode is enabled, the PHP code section is disabled in the CMS
|
||||||
|
| for security reasons. If set to null, safe mode is enabled when
|
||||||
|
| debug mode (app.debug) is disabled.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'safe_mode' => env('CMS_SAFE_MODE', null),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| V1 Security Policy
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using safe mode configuration, the Twig sandbox becomes very strict and
|
||||||
|
| uses an allow-list to protect calling unapproved methods. Instead, you may
|
||||||
|
| use V1, which is a more relaxed policy that uses a block-list, it blocks
|
||||||
|
| most of the unsecure methods but is not as secure as an allow-list.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'security_policy_v1' => env('CMS_SECURITY_POLICY_V1', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| V1 Exception Policy
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When debug mode is off, throwing exceptions in AJAX will display a generic
|
||||||
|
| message, except for specific exception types such as ApplicationException
|
||||||
|
| and ValidationException (allow-list). Instead, you may use V1, which is
|
||||||
|
| a more relaxed policy that allows all messages and blocks common exception
|
||||||
|
| types (block-list) but may still leak information in rare cases.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'exception_policy_v1' => env('CMS_EXCEPTION_POLICY_V1', false),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,158 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| PDO Fetch Style
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default, database results will be returned as instances of the PHP
|
||||||
|
| stdClass object; however, you may desire to retrieve records in an
|
||||||
|
| array format for simplicity. Here you can tweak the fetch style.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fetch' => PDO::FETCH_CLASS,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Database Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which of the database connections below you wish
|
||||||
|
| to use as your default connection for all database work. Of course
|
||||||
|
| you may use many connections at once using the Database library.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here are each of the database connections setup for your application.
|
||||||
|
| Of course, examples of configuring each database platform that is
|
||||||
|
| supported by Laravel is shown below to make development simple.
|
||||||
|
|
|
||||||
|
|
|
||||||
|
| All database work in Laravel is done through the PHP PDO facilities
|
||||||
|
| so make sure you have the driver for your particular database of
|
||||||
|
| choice installed on your machine before you begin development.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sqlite' => [
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
|
'prefix' => '',
|
||||||
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
|
],
|
||||||
|
|
||||||
|
'mysql' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'database'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => 'utf8mb4',
|
||||||
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => 'InnoDB',
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'pgsql' => [
|
||||||
|
'driver' => 'pgsql',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '5432'),
|
||||||
|
'database' => env('DB_DATABASE', 'database'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'schema' => 'public',
|
||||||
|
'sslmode' => env('DB_SSLMODE', 'prefer'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqlsrv' => [
|
||||||
|
'driver' => 'sqlsrv',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
|
'port' => env('DB_PORT', '1433'),
|
||||||
|
'database' => env('DB_DATABASE', 'database'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Repository Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This table keeps track of all the migrations that have already run for
|
||||||
|
| your application. Using this information, we can determine which of
|
||||||
|
| the migrations on disk have not actually be run in the databases.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'migrations' => 'migrations',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Redis Databases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
|
| provides a richer set of commands than a typical key-value systems
|
||||||
|
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
|
||||||
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||||
|
|
||||||
|
'options' => [
|
||||||
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||||
|
'prefix' => env('REDIS_PREFIX', 'october_database_'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'default' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'password' => env('REDIS_PASSWORD'),
|
||||||
|
'port' => env('REDIS_PORT', 6379),
|
||||||
|
'database' => env('REDIS_DB', '0'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'cache' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'password' => env('REDIS_PASSWORD'),
|
||||||
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_CACHE_DB', '1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default filesystem disk that should be used
|
||||||
|
| by the framework. A "local" driver, as well as a variety of cloud
|
||||||
|
| based drivers are available for your choosing. Just store away!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('FILESYSTEM_DRIVER', 'local'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Filesystem Disks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||||
|
| may even configure multiple disks of the same driver. Defaults have
|
||||||
|
| been setup for each driver as an example of the required options.
|
||||||
|
|
|
||||||
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'disks' => [
|
||||||
|
|
||||||
|
'local' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app'),
|
||||||
|
'throw' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'uploads' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/uploads'),
|
||||||
|
'url' => '/storage/app/uploads',
|
||||||
|
'visibility' => 'public',
|
||||||
|
'throw' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'media' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/media'),
|
||||||
|
'url' => '/storage/app/media',
|
||||||
|
'visibility' => 'public',
|
||||||
|
'throw' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'resources' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/resources'),
|
||||||
|
'url' => '/storage/app/resources',
|
||||||
|
'visibility' => 'public',
|
||||||
|
'throw' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
's3' => [
|
||||||
|
'driver' => 's3',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION'),
|
||||||
|
'bucket' => env('AWS_BUCKET'),
|
||||||
|
'url' => env('AWS_URL'),
|
||||||
|
'endpoint' => env('AWS_ENDPOINT'),
|
||||||
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||||
|
'throw' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Hash Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default hash driver that will be used to hash
|
||||||
|
| passwords for your application. By default, the bcrypt algorithm is
|
||||||
|
| used; however, you remain free to modify this option if you wish.
|
||||||
|
|
|
||||||
|
| Supported: "bcrypt", "argon", "argon2id"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'bcrypt',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Bcrypt Options
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the configuration options that should be used when
|
||||||
|
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||||
|
| to control the amount of time it takes to hash the given password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'bcrypt' => [
|
||||||
|
'rounds' => env('BCRYPT_ROUNDS', 10),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Argon Options
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the configuration options that should be used when
|
||||||
|
| passwords are hashed using the Argon algorithm. These will allow you
|
||||||
|
| to control the amount of time it takes to hash the given password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'argon' => [
|
||||||
|
'memory' => 1024,
|
||||||
|
'threads' => 2,
|
||||||
|
'time' => 2,
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option defines the default log channel that gets used when writing
|
||||||
|
| messages to the logs. The name specified in this option should match
|
||||||
|
| one of the channels defined in the "channels" configuration array.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('LOG_CHANNEL', 'stack'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Channels
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the log channels for your application. Out of
|
||||||
|
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||||
|
| you a variety of powerful log handlers / formatters to utilize.
|
||||||
|
|
|
||||||
|
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||||
|
| "errorlog", "monolog",
|
||||||
|
| "custom", "stack"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'channels' => [
|
||||||
|
|
||||||
|
'stack' => [
|
||||||
|
'driver' => 'stack',
|
||||||
|
'channels' => ['daily'],
|
||||||
|
'ignore_exceptions' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'single' => [
|
||||||
|
'driver' => 'single',
|
||||||
|
'path' => storage_path('logs/system.log'),
|
||||||
|
'level' => 'debug'
|
||||||
|
],
|
||||||
|
|
||||||
|
'daily' => [
|
||||||
|
'driver' => 'daily',
|
||||||
|
'path' => storage_path('logs/system.log'),
|
||||||
|
'level' => 'debug',
|
||||||
|
'days' => 14
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'driver' => 'slack',
|
||||||
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
|
'username' => 'October CMS Log',
|
||||||
|
'emoji' => ':boom:',
|
||||||
|
'level' => 'critical',
|
||||||
|
],
|
||||||
|
|
||||||
|
'papertrail' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => 'debug',
|
||||||
|
'handler' => Monolog\Handler\SyslogUdpHandler::class,
|
||||||
|
'handler_with' => [
|
||||||
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'stderr' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'handler' => Monolog\Handler\StreamHandler::class,
|
||||||
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||||
|
'with' => [
|
||||||
|
'stream' => 'php://stderr',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'syslog' => [
|
||||||
|
'driver' => 'syslog',
|
||||||
|
'level' => 'debug',
|
||||||
|
],
|
||||||
|
|
||||||
|
'errorlog' => [
|
||||||
|
'driver' => 'errorlog',
|
||||||
|
'level' => 'debug',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Mailer
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default mailer that is used to send any email
|
||||||
|
| messages sent by your application. Alternative mailers may be setup
|
||||||
|
| and used as needed; however, this mailer will be used by default.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('MAIL_MAILER', 'smtp'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mailer Configurations
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure all of the mailers used by your application plus
|
||||||
|
| their respective settings. Several examples have been configured for
|
||||||
|
| you and you are free to add your own as your application requires.
|
||||||
|
|
|
||||||
|
| Laravel supports a variety of mail "transport" drivers to be used while
|
||||||
|
| sending an e-mail. You will specify which one you are using for your
|
||||||
|
| mailers below. You are free to add additional mailers as required.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "sendmail", "mailgun", "ses",
|
||||||
|
| "postmark", "log", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mailers' => [
|
||||||
|
'smtp' => [
|
||||||
|
'transport' => 'smtp',
|
||||||
|
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||||
|
'port' => env('MAIL_PORT', 587),
|
||||||
|
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||||
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
'timeout' => null,
|
||||||
|
'auth_mode' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'transport' => 'ses',
|
||||||
|
],
|
||||||
|
|
||||||
|
'mailgun' => [
|
||||||
|
'transport' => 'mailgun',
|
||||||
|
],
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'transport' => 'postmark',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sendmail' => [
|
||||||
|
'transport' => 'sendmail',
|
||||||
|
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'log' => [
|
||||||
|
'transport' => 'log',
|
||||||
|
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'transport' => 'array',
|
||||||
|
],
|
||||||
|
|
||||||
|
'failover' => [
|
||||||
|
'transport' => 'failover',
|
||||||
|
'mailers' => [
|
||||||
|
'smtp',
|
||||||
|
'log',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all e-mails sent by your application to be sent from
|
||||||
|
| the same address. Here, you may specify a name and address that is
|
||||||
|
| used globally for all e-mails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'noreply@example.tld'),
|
||||||
|
'name' => env('MAIL_FROM_NAME', 'October CMS'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Time to Live for Assets
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specifies the cache time-to-live, in minutes. The default value is 10.
|
||||||
|
| The cache invalidates automatically when Library items are added,
|
||||||
|
| updated or deleted.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'item_cache_ttl' => 10,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Automatically Rename Filenames
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When a media file is uploaded, automatically transform its filename to
|
||||||
|
| something consistent. The "slug" mode will slug the file name for all
|
||||||
|
| uploads.
|
||||||
|
|
|
||||||
|
| Supported: "null", "slug"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'auto_rename' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Ignored Files and Patterns
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The media manager wil ignore file names and patterns specified here
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'ignore_files' => ['.svn', '.git', '.DS_Store', '.AppleDouble'],
|
||||||
|
|
||||||
|
'ignore_patterns' => ['^\..*'],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Image Extensions
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| File extensions corresponding to the Image document type
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'image_extensions' => ['jpg', 'jpeg', 'bmp', 'png', 'webp', 'gif'],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Video Extensions
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| File extensions corresponding to the Video document type
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'video_extensions' => ['mp4', 'avi', 'mov', 'mpg', 'mpeg', 'mkv', 'webm'],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Audio Extensions
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| File extensions corresponding to the Audio document type
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'audio_extensions' => ['mp3', 'wav', 'wma', 'm4a', 'ogg'],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Queue Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The Laravel queue API supports a variety of back-ends via an unified
|
||||||
|
| API, giving you convenient access to each back-end using the same
|
||||||
|
| syntax for each one. Here you may set the default queue driver.
|
||||||
|
|
|
||||||
|
| Supported: "null", "sync", "database", "beanstalkd",
|
||||||
|
| "sqs", "iron", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('QUEUE_CONNECTION', 'sync'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Queue Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the connection information for each server that
|
||||||
|
| is used by your application. A default configuration has been added
|
||||||
|
| for each back-end shipped with Laravel. You are free to add more.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sync' => [
|
||||||
|
'driver' => 'sync',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'table' => 'jobs',
|
||||||
|
'queue' => 'default',
|
||||||
|
'retry_after' => 90,
|
||||||
|
],
|
||||||
|
|
||||||
|
'beanstalkd' => [
|
||||||
|
'driver' => 'beanstalkd',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'queue' => 'default',
|
||||||
|
'retry_after' => 90,
|
||||||
|
'block_for' => 0,
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqs' => [
|
||||||
|
'driver' => 'sqs',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||||
|
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
||||||
|
'suffix' => env('SQS_SUFFIX'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
'queue' => env('REDIS_QUEUE', 'default'),
|
||||||
|
'retry_after' => 90,
|
||||||
|
'block_for' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Failed Queue Jobs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These options configure the behavior of failed queue job logging so you
|
||||||
|
| can control which database and table are used to store the jobs that
|
||||||
|
| have failed. You may change them to any database / table you wish.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => [
|
||||||
|
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
|
||||||
|
'database' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
'table' => 'failed_jobs',
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Third Party Services
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This file is for storing the credentials for third party services such
|
||||||
|
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
|
||||||
|
| default location for this type of information, allowing packages
|
||||||
|
| to have a conventional place to find your various credentials.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mailgun' => [
|
||||||
|
'domain' => env('MAILGUN_DOMAIN'),
|
||||||
|
'secret' => env('MAILGUN_SECRET'),
|
||||||
|
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||||
|
'scheme' => 'https',
|
||||||
|
],
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'token' => env('POSTMARK_TOKEN'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,200 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default session "driver" that will be used on
|
||||||
|
| requests. By default, we will use the lightweight native driver but
|
||||||
|
| you may specify any of the other wonderful drivers provided here.
|
||||||
|
|
|
||||||
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
|
| "memcached", "redis", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('SESSION_DRIVER', 'file'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Lifetime
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the number of minutes that you wish the session
|
||||||
|
| to be allowed to remain idle for it is expired. If you want them
|
||||||
|
| to immediately expire when the browser closes, set it to zero.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lifetime' => env('SESSION_LIFETIME', 120),
|
||||||
|
|
||||||
|
'expire_on_close' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Encryption
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to easily specify that all of your session data
|
||||||
|
| should be encrypted before it is stored. All encryption will be run
|
||||||
|
| automatically by Laravel and you can use the Session like normal.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encrypt' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session File Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the native session driver, we need a location where session
|
||||||
|
| files may be stored. A default has been set for you but a different
|
||||||
|
| location may be specified. This is only needed for file sessions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files' => storage_path('framework/sessions'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" or "redis" session drivers, you may specify a
|
||||||
|
| connection that should be used to manage these sessions. This should
|
||||||
|
| correspond to a connection in your database configuration options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => env('SESSION_CONNECTION'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" session driver, you may specify the table we
|
||||||
|
| should use to manage the sessions. Of course, a sensible default is
|
||||||
|
| provided for you; however, you are free to change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => 'sessions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| While using one of the framework's cache driven session backends you may
|
||||||
|
| list a cache store that should be used for these sessions. This value
|
||||||
|
| must match with one of the application's configured cache "stores".
|
||||||
|
|
|
||||||
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'store' => env('SESSION_STORE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Sweeping Lottery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Some session drivers must manually sweep their storage location to get
|
||||||
|
| rid of old sessions from storage. Here are the chances that it will
|
||||||
|
| happen on a given request. By default, the odds are 2 out of 100.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lottery' => [2, 100],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the name of the cookie used to identify a session
|
||||||
|
| instance by ID. The name specified here will get used every time a
|
||||||
|
| new session cookie is created by the framework for every driver.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cookie' => env('SESSION_COOKIE', 'october_session'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The session cookie path determines the path for which the cookie will
|
||||||
|
| be regarded as available. Typically, this will be the root path of
|
||||||
|
| your application, but you are free to change this when necessary.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => '/',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the domain of the cookie used to identify a session
|
||||||
|
| in your application. This will determine which domains the cookie is
|
||||||
|
| available to in your application. A sensible default has been set.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => env('SESSION_DOMAIN'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTP Access Only
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will prevent JavaScript from accessing the
|
||||||
|
| value of the cookie and the cookie will only be accessible through
|
||||||
|
| the HTTP protocol. You are free to modify this option if needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'http_only' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTPS Only Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By setting this option to true, session cookies will only be sent back
|
||||||
|
| to the server if the browser has a HTTPS connection. This will keep
|
||||||
|
| the cookie from being sent to you if it can not be done securely.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Same-Site Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines how your cookies behave when cross-site requests
|
||||||
|
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||||
|
| do not enable this as other CSRF protection services are in place.
|
||||||
|
|
|
||||||
|
| In the strict mode, the cookie is not sent with any cross-site usage
|
||||||
|
| even if the user follows a link to another website. Lax cookies are
|
||||||
|
| only sent with a top-level get request.
|
||||||
|
|
|
||||||
|
| Supported: "lax", "strict"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'same_site' => 'lax',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,181 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Load Specified Modules
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specify which modules should be registered when using the application.
|
||||||
|
|
|
||||||
|
| LOAD_MODULES="System,Backend,Editor,Cms,Media"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'load_modules' => env('LOAD_MODULES'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Disable Specified Plugins
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specify plugin codes which will always be disabled in the application.
|
||||||
|
|
|
||||||
|
| DISABLE_PLUGINS="October.Demo,RainLab.Blog"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'disable_plugins' => env('DISABLE_PLUGINS'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Link Policy
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Controls how URL links are generated throughout the application.
|
||||||
|
|
|
||||||
|
| detect - detect hostname and use the current schema
|
||||||
|
| secure - detect hostname and force HTTPS schema
|
||||||
|
| insecure - detect hostname and force HTTP schema
|
||||||
|
| force - force hostname and schema using app.url config value
|
||||||
|
|
|
||||||
|
| By default most links use their fully qualified URLs or reference their
|
||||||
|
| CDN location. In some cases you may prefer relative links where possible
|
||||||
|
| if so, set the relative_links value to true.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'link_policy' => env('LINK_POLICY', 'detect'),
|
||||||
|
|
||||||
|
'relative_links' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| System Paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specify location to core system paths. Local paths are relative if they
|
||||||
|
| do not have a leading slash. URLs can be relative to the base application
|
||||||
|
| URL or you can specify a full path URL.
|
||||||
|
|
|
||||||
|
| PLUGINS_PATH="plugins"
|
||||||
|
| PLUGINS_ASSET_URL="/plugins"
|
||||||
|
|
|
||||||
|
| THEMES_PATH="/absolute/path/to/themes"
|
||||||
|
| THEMES_ASSET_URL="http://localhost/themes"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'plugins_path' => env('PLUGINS_PATH'),
|
||||||
|
|
||||||
|
'plugins_asset_url' => env('PLUGINS_ASSET_URL'),
|
||||||
|
|
||||||
|
'themes_path' => env('THEMES_PATH'),
|
||||||
|
|
||||||
|
'themes_asset_url' => env('THEMES_ASSET_URL'),
|
||||||
|
|
||||||
|
'storage_path' => env('STORAGE_PATH'),
|
||||||
|
|
||||||
|
'cache_path' => env('CACHE_PATH'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Permission Masks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Specifies a default file and folder permission as a string (eg: "755") for
|
||||||
|
| created files and directories in the system paths. It is recommended
|
||||||
|
| to use file as "644" and folder as "755".
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default_mask' => [
|
||||||
|
'file' => env('DEFAULT_FILE_MASK'),
|
||||||
|
'folder' => env('DEFAULT_FOLDER_MASK'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cross Site Request Forgery (CSRF) Protection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If the CSRF protection is enabled, all "postback" & AJAX requests are
|
||||||
|
| checked for a valid security token.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enable_csrf_protection' => env('ENABLE_CSRF', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Convert Line Endings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Determines if October CMS should convert line endings from the Windows
|
||||||
|
| style \r\n to the Unix style \n.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'convert_line_endings' => env('CONVERT_LINE_ENDINGS', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cookie Encryption
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| October CMS encrypts/decrypts cookies by default. You can specify cookies
|
||||||
|
| that should not be encrypted or decrypted here. This is useful, for
|
||||||
|
| example, when you want to pass data from frontend to server side backend
|
||||||
|
| via cookies, and vice versa.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'unencrypt_cookies' => env('UNENCRYPT_COOKIES', [
|
||||||
|
// 'my_cookie',
|
||||||
|
]),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Automatically Mirror to Public Directory
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Performed after a composer update.
|
||||||
|
|
|
||||||
|
| true - automatically mirror asset to the public directory
|
||||||
|
| false - never mirror assets to public directory
|
||||||
|
| null - only mirror assets when debug mode is OFF (in production)
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'auto_mirror_public' => env('AUTO_MIRROR_PUBLIC', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Automatically Rollback Plugins
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Attempt to automatically reverse database migrations for a plugin when
|
||||||
|
| they are uninstalled using composer. This is disabled by default
|
||||||
|
| to prevent data loss.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'auto_rollback_plugins' => env('AUTO_ROLLBACK_PLUGINS', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Directory Restriction
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Restricts loading backend template and config files to within the base
|
||||||
|
| directory of the application. For example, when using the symlink option
|
||||||
|
| in composer for local packages.
|
||||||
|
|
|
||||||
|
| Warning: This should never be disabled in production for security reasons.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'restrict_base_dir' => env('RESTRICT_BASE_DIR', true),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| View Storage Paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Most templating systems load templates from disk. Here you may specify
|
||||||
|
| an array of paths that should be checked for your views. Of course
|
||||||
|
| the usual Laravel view path has already been registered for you.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
app_path('views'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Compiled View Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines where all the compiled Blade templates will be
|
||||||
|
| stored for your application. Typically, this is within the storage
|
||||||
|
| directory. However, as usual, you are free to change this value.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'compiled' => env(
|
||||||
|
'VIEW_COMPILED_PATH',
|
||||||
|
realpath(storage_path('framework/views'))
|
||||||
|
),
|
||||||
|
|
||||||
|
];
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* October - The PHP platform that gets back to basics.
|
||||||
|
*
|
||||||
|
* @package october/october
|
||||||
|
* @author Alexey Bobkov, Samuel Georges
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register composer
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a generated class loader for the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/bootstrap/autoload.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Load framework
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This bootstraps the framework and loads up this application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Process request
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Execute the request and send the response back to the client.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel = $app->make(\Illuminate\Contracts\Http\Kernel::class);
|
||||||
|
|
||||||
|
$response = $kernel->handle(
|
||||||
|
$request = Illuminate\Http\Request::capture()
|
||||||
|
);
|
||||||
|
|
||||||
|
$response->send();
|
||||||
|
|
||||||
|
$kernel->terminate($request, $response);
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"name": "octobercms",
|
||||||
|
"homepage": "https://octobercms.com/",
|
||||||
|
"description": "October CMS is a self-hosted CMS platform based on the Laravel PHP Framework.",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "npm run development",
|
||||||
|
"development": "mix",
|
||||||
|
"watch": "mix watch",
|
||||||
|
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
||||||
|
"hot": "mix watch --hot",
|
||||||
|
"prod": "npm run production",
|
||||||
|
"production": "mix --production"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"babel-plugin-module-resolver": "^4.1.0",
|
||||||
|
"laravel-mix": "^6.0.39",
|
||||||
|
"less": "^4.1.2",
|
||||||
|
"less-loader": "^10.2.0",
|
||||||
|
"sass": "^1.45.0",
|
||||||
|
"sass-loader": "^12.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@popperjs/core": "^2.11.5",
|
||||||
|
"bluebird": "^3.7.2",
|
||||||
|
"bootstrap": "^5.3.0-alpha3",
|
||||||
|
"bootstrap-icons": "^1.10",
|
||||||
|
"dropzone": "^6.0.0-beta.2",
|
||||||
|
"jquery": "^3.6.0",
|
||||||
|
"js-cookie": "^3.0.1",
|
||||||
|
"popper.js": "^1.16.1",
|
||||||
|
"sortablejs": "^1.15.0",
|
||||||
|
"vue": "^2.6.14",
|
||||||
|
"vue-router": "^3.5.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset name="October CMS">
|
||||||
|
<description>The coding standard for October CMS.</description>
|
||||||
|
<rule ref="PSR2">
|
||||||
|
<!--
|
||||||
|
Exceptions to the PSR-2 guidelines as per our Developer Guide:
|
||||||
|
https://octobercms.com/help/guidelines/developer#psr-exceptions
|
||||||
|
-->
|
||||||
|
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
|
||||||
|
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace" />
|
||||||
|
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" />
|
||||||
|
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction"/>
|
||||||
|
<exclude name="Generic.Files.LineLength"/>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
|
||||||
|
<!-- Migration files and tests do not need a namespace defined -->
|
||||||
|
<exclude-pattern>*/database/migrations/*\.php</exclude-pattern>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
<file>app/</file>
|
||||||
|
<file>config/</file>
|
||||||
|
<file>modules/</file>
|
||||||
|
<file>plugins/october/demo/</file>
|
||||||
|
|
||||||
|
<!-- Ignore vendor files -->
|
||||||
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||||
|
|
||||||
|
<!-- Ignore tests -->
|
||||||
|
<exclude-pattern>*/modules/*/tests/*</exclude-pattern>
|
||||||
|
|
||||||
|
<!-- Ignore views -->
|
||||||
|
<exclude-pattern>*/modules/*/views/*</exclude-pattern>
|
||||||
|
|
||||||
|
<!-- Ignore backend UI -->
|
||||||
|
<exclude-pattern>*/modules/*/elements/*</exclude-pattern>
|
||||||
|
|
||||||
|
<!-- Ignore controllers, layouts -->
|
||||||
|
<exclude-pattern>*/modules/*/layouts/*</exclude-pattern>
|
||||||
|
<exclude-pattern>*/modules/*/controllers/*/*</exclude-pattern>
|
||||||
|
|
||||||
|
<!-- Ignore partial views -->
|
||||||
|
<exclude-pattern>*/modules/**/_*</exclude-pattern>
|
||||||
|
</ruleset>
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
bootstrap="modules/system/tests/bootstrap.php"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="October CMS Test Suite">
|
||||||
|
<directory>./modules/*/tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing" />
|
||||||
|
<env name="APP_LOCALE" value="en" />
|
||||||
|
<env name="CACHE_DRIVER" value="array" />
|
||||||
|
<env name="SESSION_DRIVER" value="array" />
|
||||||
|
<env name="ACTIVE_THEME" value="test" />
|
||||||
|
<env name="CONVERT_LINE_ENDINGS" value="true" />
|
||||||
|
<env name="CMS_SAFE_MODE" value="false" />
|
||||||
|
<env name="CMS_ROUTE_CACHE" value="true" />
|
||||||
|
<env name="CMS_TWIG_CACHE" value="false" />
|
||||||
|
<env name="PLUGINS_PATH" value="modules/system/tests/fixtures/plugins" />
|
||||||
|
<env name="THEMES_PATH" value="modules/cms/tests/fixtures/themes" />
|
||||||
|
<env name="ENABLE_CSRF" value="false" />
|
||||||
|
<env name="DB_CONNECTION" value="sqlite" />
|
||||||
|
<env name="DB_DATABASE" value=":memory:" />
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a bug report for Magic Forms
|
||||||
|
|
||||||
|
---
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Use issues to report errors / bugs only.
|
||||||
|
|
||||||
|
Do you have questions?
|
||||||
|
* Read the docs: https://skydiver.github.io/october-plugin-forms/docs/introduction/
|
||||||
|
* Start a discussion: https://github.com/blakej115/magic-forms/discussions
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Ask a question
|
||||||
|
url: https://github.com/blakej115/magic-forms/discussions
|
||||||
|
about: Ask questions and discuss with other community members
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# MIT license
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BlakeJones\MagicForms;
|
||||||
|
|
||||||
|
use Backend, Lang, Validator;
|
||||||
|
use System\Classes\PluginBase;
|
||||||
|
use System\Classes\SettingsManager;
|
||||||
|
use BlakeJones\MagicForms\Classes\BackendHelpers;
|
||||||
|
use BlakeJones\MagicForms\Classes\GDPR;
|
||||||
|
use BlakeJones\MagicForms\Classes\ReCaptchaValidator;
|
||||||
|
use BlakeJones\MagicForms\Classes\UnreadRecords;
|
||||||
|
use BlakeJones\MagicForms\Models\Settings;
|
||||||
|
|
||||||
|
class Plugin extends PluginBase {
|
||||||
|
|
||||||
|
public function pluginDetails() {
|
||||||
|
return [
|
||||||
|
'name' => 'blakejones.magicforms::lang.plugin.name',
|
||||||
|
'description' => 'blakejones.magicforms::lang.plugin.description',
|
||||||
|
'author' => 'Martin M. (Forked by Blake Jones)',
|
||||||
|
'icon' => 'icon-bolt',
|
||||||
|
'homepage' => 'https://github.com/blakej115/magic-forms'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerNavigation() {
|
||||||
|
if(Settings::get('global_hide_button', false)) { return; }
|
||||||
|
return [
|
||||||
|
'forms' => [
|
||||||
|
'label' => 'blakejones.magicforms::lang.menu.label',
|
||||||
|
'icon' => 'icon-bolt',
|
||||||
|
'iconSvg' => 'plugins/blakejones/magicforms/assets/imgs/icon.svg',
|
||||||
|
'url' => BackendHelpers::getBackendURL(['blakejones.magicforms.access_records' => 'blakejones/magicforms/records', 'blakejones.magicforms.access_exports' => 'blakejones/magicforms/exports'], 'blakejones.magicforms.access_records'),
|
||||||
|
'permissions' => ['blakejones.magicforms.*'],
|
||||||
|
'sideMenu' => [
|
||||||
|
'records' => [
|
||||||
|
'label' => 'blakejones.magicforms::lang.menu.records.label',
|
||||||
|
'icon' => 'icon-database',
|
||||||
|
'url' => Backend::url('blakejones/magicforms/records'),
|
||||||
|
'permissions' => ['blakejones.magicforms.access_records'],
|
||||||
|
'counter' => UnreadRecords::getTotal(),
|
||||||
|
'counterLabel' => 'Un-Read Messages'
|
||||||
|
],
|
||||||
|
'exports' => [
|
||||||
|
'label' => 'blakejones.magicforms::lang.menu.exports.label',
|
||||||
|
'icon' => 'icon-download',
|
||||||
|
'url' => Backend::url('blakejones/magicforms/exports'),
|
||||||
|
'permissions' => ['blakejones.magicforms.access_exports']
|
||||||
|
],
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerSettings() {
|
||||||
|
return [
|
||||||
|
'config' => [
|
||||||
|
'label' => 'blakejones.magicforms::lang.menu.label',
|
||||||
|
'description' => 'blakejones.magicforms::lang.menu.settings',
|
||||||
|
'category' => SettingsManager::CATEGORY_CMS,
|
||||||
|
'icon' => 'icon-bolt',
|
||||||
|
'class' => 'BlakeJones\MagicForms\Models\Settings',
|
||||||
|
'permissions' => ['blakejones.magicforms.access_settings'],
|
||||||
|
'order' => 500
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerPermissions() {
|
||||||
|
return [
|
||||||
|
'blakejones.magicforms.access_settings' => ['tab' => 'blakejones.magicforms::lang.permissions.tab', 'label' => 'blakejones.magicforms::lang.permissions.access_settings'],
|
||||||
|
'blakejones.magicforms.access_records' => ['tab' => 'blakejones.magicforms::lang.permissions.tab', 'label' => 'blakejones.magicforms::lang.permissions.access_records'],
|
||||||
|
'blakejones.magicforms.access_exports' => ['tab' => 'blakejones.magicforms::lang.permissions.tab', 'label' => 'blakejones.magicforms::lang.permissions.access_exports'],
|
||||||
|
'blakejones.magicforms.gdpr_cleanup' => ['tab' => 'blakejones.magicforms::lang.permissions.tab', 'label' => 'blakejones.magicforms::lang.permissions.gdpr_cleanup'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerComponents() {
|
||||||
|
return [
|
||||||
|
'BlakeJones\MagicForms\Components\GenericForm' => 'genericForm',
|
||||||
|
'BlakeJones\MagicForms\Components\UploadForm' => 'uploadForm',
|
||||||
|
'BlakeJones\MagicForms\Components\EmptyForm' => 'emptyForm',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerMailTemplates() {
|
||||||
|
return [
|
||||||
|
'blakejones.magicforms::mail.notification' => Lang::get('blakejones.magicforms::lang.mails.form_notification.description'),
|
||||||
|
'blakejones.magicforms::mail.autoresponse' => Lang::get('blakejones.magicforms::lang.mails.form_autoresponse.description'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function register() {
|
||||||
|
$this->app->resolving('validator', function($validator) {
|
||||||
|
Validator::extend('recaptcha', 'BlakeJones\MagicForms\Classes\ReCaptchaValidator@validateReCaptcha');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function registerSchedule($schedule) {
|
||||||
|
$schedule->call(function () {
|
||||||
|
$records = GDPR::cleanRecords();
|
||||||
|
})->daily();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
# Magic Forms for October CMS v3
|
||||||
|
Create easy (and almost magic) AJAX forms.
|
||||||
|
|
||||||
|
# Support for October CMS v3 (Forked)
|
||||||
|
The original version of this plugin was [abandoned](https://github.com/skydiver/october-plugin-forms/discussions/267). This is an actively maintained fork of the [original plugin](https://octobercms.com/plugin/martin-forms) that supports October CMS v3.
|
||||||
|
|
||||||
|
## Why Magic Forms?
|
||||||
|
Almost everyday we do forms for our clients, personal projects, etc
|
||||||
|
|
||||||
|
Sometimes we need to add or remove fields, change validations, store data and at some point, this can be boring and repetitive.
|
||||||
|
|
||||||
|
So, the objective was to find a way to just put the HTML elements on the page, skip the repetitive task of coding and (with some kind of magic) store this data on a database or send by mail.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
* Create any type of form: contact, feedback, registration, uploads, etc
|
||||||
|
* Write only HTML
|
||||||
|
* Don't code forms logic
|
||||||
|
* Laravel validation
|
||||||
|
* Custom validation errors
|
||||||
|
* Use multiple forms on same page
|
||||||
|
* Store on database
|
||||||
|
* Export data in CSV
|
||||||
|
* Access database records from backend
|
||||||
|
* Send mail notifications to multiple recipients
|
||||||
|
* Auto-response email on form submit
|
||||||
|
* reCAPTCHA validation
|
||||||
|
* Support for Translate plugin
|
||||||
|
* Inline errors with fields (read documentation for more info)
|
||||||
|
* AJAX file uploads (BETA, available since v1.3.0)
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
New documentation coming soon. For now, you may reference the old documentation:
|
||||||
|
|
||||||
|
> https://skydiver.github.io/october-plugin-forms/docs/introduction/
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
.files-container ul { padding:0; list-style:none; }
|
||||||
|
|
||||||
|
.record-table { width:100%; border-collapse:collapse; box-shadow:5px 5px 10px #AAA; }
|
||||||
|
.record-table td { padding:10px; border:solid 1px #D4D8DA; }
|
||||||
|
.record-label { width:20%; background-color:#ECF0F1; text-align:right; }
|
||||||
|
.record-value { width:80%; background-color:#F9F9F9; }
|
||||||
|
.record-value ul { margin:0; }
|
||||||
|
.record-metadata { font-size:0.8em; color:#888; font-weight:bold; }
|
||||||
|
|
@ -0,0 +1,704 @@
|
||||||
|
.responsiv-uploader-fileupload:after {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object {
|
||||||
|
border-radius: 3px;
|
||||||
|
position: relative;
|
||||||
|
outline: none;
|
||||||
|
overflow: hidden;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object .icon-container {
|
||||||
|
display: table;
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object .icon-container i {
|
||||||
|
color: #95a5a6;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object .icon-container div {
|
||||||
|
display: table-cell;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object .icon-container.image > div.icon-wrapper {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object h4 {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #2b3e50;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
line-height: 150%;
|
||||||
|
margin: 15px 0 5px 0;
|
||||||
|
padding-right: 0;
|
||||||
|
transition: padding 0.1s;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object h4 a {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
display: none;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object p.size,
|
||||||
|
.responsiv-uploader-fileupload .upload-object p.error {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #95a5a6;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object p.size strong,
|
||||||
|
.responsiv-uploader-fileupload .upload-object p.error strong {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object p.error {
|
||||||
|
display: none;
|
||||||
|
color: #ab2a1c;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object .info h4 a,
|
||||||
|
.responsiv-uploader-fileupload .upload-object .meta a.upload-remove-button {
|
||||||
|
color: #2b3e50;
|
||||||
|
display: none;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 16px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object .icon-container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object .icon-container:after {
|
||||||
|
background-image: url('../../../../../modules/system/assets/ui/images/loader-transparent.svg');
|
||||||
|
position: absolute;
|
||||||
|
content: ' ';
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -20px;
|
||||||
|
margin-left: -20px;
|
||||||
|
display: block;
|
||||||
|
background-size: 40px 40px;
|
||||||
|
background-position: 50% 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-success .icon-container {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-success .icon-container:after {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-loading .icon-container {
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-loading .icon-container:after {
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-success {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-success .progress-bar {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-success:hover h4 a,
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-success:hover .meta .upload-remove-button {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error .progress-bar {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error .icon-container {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error .icon-container > img,
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error .icon-container > i {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error .info h4 {
|
||||||
|
color: #ab2a1c;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error p.error {
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error .info .upload-remove-button,
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-error .meta .upload-remove-button {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.is-preview .upload-button,
|
||||||
|
.responsiv-uploader-fileupload.is-preview .upload-remove-button {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-success h4 a,
|
||||||
|
.responsiv-uploader-fileupload .upload-object.is-success .meta .upload-remove-button {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-moz-keyframes spin {
|
||||||
|
0% {
|
||||||
|
-moz-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-moz-transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-webkit-keyframes spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-o-keyframes spin {
|
||||||
|
0% {
|
||||||
|
-o-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-o-transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-ms-keyframes spin {
|
||||||
|
0% {
|
||||||
|
-ms-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-ms-transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes spin {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-button,
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object {
|
||||||
|
margin: 0 10px 10px 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #ecf0f1;
|
||||||
|
width: 260px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .progress-bar {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .progress-bar .upload-progress {
|
||||||
|
float: left;
|
||||||
|
width: 0%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 5px;
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #5fb6f5;
|
||||||
|
box-shadow: none;
|
||||||
|
transition: width .6s ease;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .icon-container {
|
||||||
|
border-right: 1px solid #f6f8f9;
|
||||||
|
float: left;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 75px;
|
||||||
|
height: 75px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .icon-container i {
|
||||||
|
font-size: 35px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .icon-container.image img {
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .info {
|
||||||
|
margin-left: 90px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .info h4 {
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .info h4 a {
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object .meta {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: 0 15px 0 90px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object.upload-placeholder {
|
||||||
|
height: 75px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object.upload-placeholder:after {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover {
|
||||||
|
background: #4da7e8 !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover i,
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover p.size,
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover p.error,
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover .upload-remove-button {
|
||||||
|
color: #ecf0f1;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover h4 {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover .icon-container {
|
||||||
|
border-right-color: #4da7e8 !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover.is-error {
|
||||||
|
background: #ab2a1c !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object:hover h4 {
|
||||||
|
padding-right: 35px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object.is-error h4 {
|
||||||
|
padding-right: 35px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object.is-error .info p.size {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object.is-error .info p.error {
|
||||||
|
padding-bottom: 11px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi.is-preview .upload-files-container {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
@media (max-width: 1280px) {
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object {
|
||||||
|
width: 230px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-files-container {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi .upload-object {
|
||||||
|
margin-right: 0;
|
||||||
|
display: block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single.is-populated .upload-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-button {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
border: 2px dotted rgba(0, 0, 0, 0.1);
|
||||||
|
position: relative;
|
||||||
|
outline: none;
|
||||||
|
min-height: 100px;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-button .upload-button-icon {
|
||||||
|
position: absolute;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-top: -11px;
|
||||||
|
margin-left: -11px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-button .upload-button-icon:before {
|
||||||
|
content: "+";
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
font-size: 22px;
|
||||||
|
height: 22px;
|
||||||
|
width: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
color: rgba(0, 0, 0, 0.1);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-button:hover {
|
||||||
|
border: 2px dotted rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-button:hover .upload-button-icon:before {
|
||||||
|
color: #5cb85c;
|
||||||
|
color: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-button:focus {
|
||||||
|
border: 2px solid rgba(0, 0, 0, 0.3);
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-button:focus .upload-button-icon:before {
|
||||||
|
color: #5cb85c;
|
||||||
|
color: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object {
|
||||||
|
padding-bottom: 66px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object .icon-container {
|
||||||
|
border: 1px solid #f6f8f9;
|
||||||
|
background: rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object .icon-container.image img {
|
||||||
|
border-radius: 3px;
|
||||||
|
display: block;
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
min-height: 100px;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object .progress-bar {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object .progress-bar .upload-progress {
|
||||||
|
float: left;
|
||||||
|
width: 0%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 5px;
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #5fb6f5;
|
||||||
|
box-shadow: none;
|
||||||
|
transition: width .6s ease;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object .info {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
height: 66px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object .meta {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 65px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: 0 15px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object:hover h4 {
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object.is-error h4 {
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object.is-error .info p.size {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object.is-error .info p.error {
|
||||||
|
padding-bottom: 11px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.responsiv-uploader-fileupload.style-image-single .upload-object h4 {
|
||||||
|
padding-right: 20px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-button {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-files-container {
|
||||||
|
border: 1px solid #eeeeee;
|
||||||
|
border-radius: 3px;
|
||||||
|
border-bottom: none;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi.is-populated .upload-files-container {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #eeeeee;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:nth-child(even) {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .icon-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 5px;
|
||||||
|
width: 35px;
|
||||||
|
padding: 11px 7px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .info {
|
||||||
|
margin-left: 35px;
|
||||||
|
margin-right: 15%;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .info h4,
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .info p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 11px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .info h4 {
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .info h4 a {
|
||||||
|
padding: 10px 0;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .info p.size {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 15%;
|
||||||
|
display: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .info p.error {
|
||||||
|
color: #ab2a1c;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .progress-bar {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||||
|
position: absolute;
|
||||||
|
top: 18px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .progress-bar .upload-progress {
|
||||||
|
float: left;
|
||||||
|
width: 0%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 5px;
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #5fb6f5;
|
||||||
|
box-shadow: none;
|
||||||
|
transition: width .6s ease;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .meta {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
margin-right: 15px;
|
||||||
|
width: 15%;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .meta .upload-remove-button {
|
||||||
|
position: absolute;
|
||||||
|
top: -9px;
|
||||||
|
right: 0;
|
||||||
|
bottom: auto;
|
||||||
|
line-height: 150%;
|
||||||
|
padding: 10px 0;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object .icon-container:after {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-left: -10px;
|
||||||
|
background-size: 20px 20px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object.is-success .info p.size {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover {
|
||||||
|
background: #4da7e8 !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover i,
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover p.size,
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover p.error,
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover .upload-remove-button {
|
||||||
|
color: #ecf0f1;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover h4 {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover .icon-container {
|
||||||
|
border-right-color: #4da7e8 !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover.is-error {
|
||||||
|
background: #ab2a1c !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object:hover h4 {
|
||||||
|
padding-right: 35px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1199px) {
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .info {
|
||||||
|
margin-right: 20% !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .info p.size {
|
||||||
|
width: 20% !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .meta {
|
||||||
|
width: 20% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 991px) {
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .upload-object h4 {
|
||||||
|
padding-right: 35px !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .info {
|
||||||
|
margin-right: 25% !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .info p.size {
|
||||||
|
width: 25% !important;
|
||||||
|
padding-right: 35px !important;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi .meta {
|
||||||
|
width: 25% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single {
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #e0e0e0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
padding-right: 11px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -44px;
|
||||||
|
height: 88px;
|
||||||
|
right: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-empty-message {
|
||||||
|
padding: 10px 0 10px 11px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single.is-populated .upload-button,
|
||||||
|
.responsiv-uploader-fileupload.style-file-single.is-populated .upload-empty-message {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 8px 0 10px 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .icon-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 35px;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin: 8px 0 0 7px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .info {
|
||||||
|
margin-left: 54px;
|
||||||
|
margin-right: 15%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .info h4,
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .info p {
|
||||||
|
display: inline;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .info p.size {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .info p.size:before {
|
||||||
|
content: " - ";
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .info p.error {
|
||||||
|
color: #ab2a1c;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .progress-bar {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -2px;
|
||||||
|
right: 5px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .progress-bar .upload-progress {
|
||||||
|
float: left;
|
||||||
|
width: 0%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 5px;
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #5fb6f5;
|
||||||
|
box-shadow: none;
|
||||||
|
transition: width .6s ease;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .meta {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -44px;
|
||||||
|
height: 88px;
|
||||||
|
right: 0;
|
||||||
|
width: 15%;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .meta .upload-remove-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 0;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object .icon-container:after {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-left: -10px;
|
||||||
|
background-size: 20px 20px;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object.is-error .info p.size {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.responsiv-uploader-fileupload.style-file-single .upload-object.is-error .info p.error:before {
|
||||||
|
content: " - ";
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 64 64"
|
||||||
|
xml:space="preserve"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
id="svg2"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="noun_9594.svg"
|
||||||
|
width="64"
|
||||||
|
height="64"><metadata
|
||||||
|
id="metadata10"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs8"><linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient4168"><stop
|
||||||
|
id="stop4172"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#f89c3a;stop-opacity:1" /><stop
|
||||||
|
id="stop4170"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#fec503;stop-opacity:1" /></linearGradient><linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4168"
|
||||||
|
id="linearGradient4174"
|
||||||
|
x1="38.347958"
|
||||||
|
y1="1.3644062"
|
||||||
|
x2="36.229313"
|
||||||
|
y2="99.245766"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.63737476,0,0,0.63737476,7.0795147,0.12478476)" /></defs><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1863"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
id="namedview6"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="6.675088"
|
||||||
|
inkscape:cx="34.430274"
|
||||||
|
inkscape:cy="54.352813"
|
||||||
|
inkscape:window-x="57"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg2" /><path
|
||||||
|
d="m 26.660202,0.31923857 24.57674,0.062718 -15.93437,22.35342543 15.394221,0 -37.000145,41.051255 13.233628,-28.357774 -14.313925,0 z"
|
||||||
|
style="fill:url(#linearGradient4174);fill-opacity:1;stroke:#fe8f00;stroke-width:0.63737476;stroke-opacity:1"
|
||||||
|
id="path4"
|
||||||
|
inkscape:connector-curvature="0" /></svg>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
|
|
@ -0,0 +1,7 @@
|
||||||
|
$(window).on('ajaxInvalidField', function(event, fieldElement, fieldName, errorMsg, isFirst) {
|
||||||
|
$(fieldElement).closest('.form-group').addClass('has-error');
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('ajaxPromise', '[data-request]', function() {
|
||||||
|
$(this).closest('form').find('.form-group.has-error').removeClass('has-error');
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
var captchas = [];
|
||||||
|
|
||||||
|
var onloadCallback = function() {
|
||||||
|
jQuery('.g-recaptcha').each(function(index, el) {
|
||||||
|
captchas[el.id] = grecaptcha.render(el, $(el).data());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetReCaptcha(id) {
|
||||||
|
var widget = captchas[id];
|
||||||
|
grecaptcha.reset(widget);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,360 @@
|
||||||
|
/*
|
||||||
|
* File upload form field control
|
||||||
|
*
|
||||||
|
* Data attributes:
|
||||||
|
* - data-control="fileupload" - enables the file upload plugin
|
||||||
|
* - data-unique-id="XXX" - an optional identifier for multiple uploaders on the same page, this value will
|
||||||
|
* appear in the postback variable called X_OCTOBER_FILEUPLOAD
|
||||||
|
* - data-template - a Dropzone.js template to use for each item
|
||||||
|
*
|
||||||
|
* JavaScript API:
|
||||||
|
* $('div').fileUploader()
|
||||||
|
*
|
||||||
|
* Dependancies:
|
||||||
|
* - Dropzone.js
|
||||||
|
*/
|
||||||
|
+function ($) { "use strict";
|
||||||
|
|
||||||
|
// FILEUPLOAD CLASS DEFINITION
|
||||||
|
// ============================
|
||||||
|
|
||||||
|
var FileUpload = function (element, options) {
|
||||||
|
this.$el = $(element)
|
||||||
|
this.options = options || {}
|
||||||
|
|
||||||
|
this.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.init = function() {
|
||||||
|
if (this.options.isMulti === null) {
|
||||||
|
this.options.isMulti = this.$el.hasClass('is-multi')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.isPreview === null) {
|
||||||
|
this.options.isPreview = this.$el.hasClass('is-preview')
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$uploadButton = $('.upload-button', this.$el)
|
||||||
|
this.$filesContainer = $('.upload-files-container', this.$el)
|
||||||
|
this.uploaderOptions = {}
|
||||||
|
|
||||||
|
this.$el.on('click', '.upload-object.is-success', $.proxy(this.onClickSuccessObject, this))
|
||||||
|
this.$el.on('click', '.upload-object.is-error', $.proxy(this.onClickErrorObject, this))
|
||||||
|
|
||||||
|
// Stop here for preview mode
|
||||||
|
if (this.options.isPreview)
|
||||||
|
return
|
||||||
|
|
||||||
|
this.$el.on('click', '.upload-remove-button', $.proxy(this.onRemoveObject, this))
|
||||||
|
|
||||||
|
this.bindUploader()
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.dispose = function() {
|
||||||
|
|
||||||
|
this.$el.off('click', '.upload-object.is-success', $.proxy(this.onClickSuccessObject, this))
|
||||||
|
this.$el.off('click', '.upload-object.is-error', $.proxy(this.onClickErrorObject, this))
|
||||||
|
this.$el.off('click', '.upload-remove-button', $.proxy(this.onRemoveObject, this))
|
||||||
|
|
||||||
|
this.$el.removeData('oc.fileUpload')
|
||||||
|
|
||||||
|
this.$el = null
|
||||||
|
this.$uploadButton = null
|
||||||
|
this.$filesContainer = null
|
||||||
|
this.uploaderOptions = null
|
||||||
|
|
||||||
|
// In some cases options could contain callbacks,
|
||||||
|
// so it's better to clean them up too.
|
||||||
|
this.options = null
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Uploading
|
||||||
|
//
|
||||||
|
|
||||||
|
FileUpload.prototype.bindUploader = function() {
|
||||||
|
this.uploaderOptions = {
|
||||||
|
url: this.options.url,
|
||||||
|
paramName: this.options.paramName,
|
||||||
|
clickable: this.$uploadButton.get(0),
|
||||||
|
previewsContainer: this.$filesContainer.get(0),
|
||||||
|
maxFiles: !this.options.isMulti ? 1 : null,
|
||||||
|
headers: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.fileTypes) {
|
||||||
|
this.uploaderOptions.acceptedFiles = this.options.fileTypes
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.template) {
|
||||||
|
this.uploaderOptions.previewTemplate = $(this.options.template).html()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.uniqueId) {
|
||||||
|
this.uploaderOptions.headers['X-OCTOBER-FILEUPLOAD'] = this.options.uniqueId
|
||||||
|
}
|
||||||
|
|
||||||
|
this.uploaderOptions.thumbnailWidth = this.options.thumbnailWidth
|
||||||
|
? this.options.thumbnailWidth : null
|
||||||
|
|
||||||
|
this.uploaderOptions.thumbnailHeight = this.options.thumbnailHeight
|
||||||
|
? this.options.thumbnailHeight : null
|
||||||
|
|
||||||
|
this.uploaderOptions.resize = this.onResizeFileInfo
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add CSRF token to headers
|
||||||
|
*/
|
||||||
|
var token = $('meta[name="csrf-token"]').attr('content')
|
||||||
|
if (token) {
|
||||||
|
this.uploaderOptions.headers['X-CSRF-TOKEN'] = token
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dropzone = new Dropzone(this.$el.get(0), this.uploaderOptions)
|
||||||
|
this.dropzone.on('addedfile', $.proxy(this.onUploadAddedFile, this))
|
||||||
|
this.dropzone.on('sending', $.proxy(this.onUploadSending, this))
|
||||||
|
this.dropzone.on('success', $.proxy(this.onUploadSuccess, this))
|
||||||
|
this.dropzone.on('error', $.proxy(this.onUploadError, this))
|
||||||
|
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
|
this.dropzone.on("queuecomplete", function (file) {
|
||||||
|
if (this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) {
|
||||||
|
$.event.trigger({
|
||||||
|
uploader: _this,
|
||||||
|
type : "uploadfinished",
|
||||||
|
message : "Dropzone Files upload finished",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.dropzone.on("sending", function (file) {
|
||||||
|
$.event.trigger({
|
||||||
|
uploader: _this,
|
||||||
|
type : "uploadstarted",
|
||||||
|
message : "Dropzone File upload started",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.onResizeFileInfo = function(file) {
|
||||||
|
var info,
|
||||||
|
targetWidth,
|
||||||
|
targetHeight
|
||||||
|
|
||||||
|
if (!this.options.thumbnailWidth && !this.options.thumbnailWidth) {
|
||||||
|
targetWidth = targetHeight = 100
|
||||||
|
}
|
||||||
|
else if (this.options.thumbnailWidth) {
|
||||||
|
targetWidth = this.options.thumbnailWidth
|
||||||
|
targetHeight = this.options.thumbnailWidth * file.height / file.width
|
||||||
|
}
|
||||||
|
else if (this.options.thumbnailHeight) {
|
||||||
|
targetWidth = this.options.thumbnailHeight * file.height / file.width
|
||||||
|
targetHeight = this.options.thumbnailHeight
|
||||||
|
}
|
||||||
|
|
||||||
|
// drawImage(image, srcX, srcY, srcWidth, srcHeight, trgX, trgY, trgWidth, trgHeight) takes an image, clips it to
|
||||||
|
// the rectangle (srcX, srcY, srcWidth, srcHeight), scales it to dimensions (trgWidth, trgHeight), and draws it
|
||||||
|
// on the canvas at coordinates (trgX, trgY).
|
||||||
|
info = {
|
||||||
|
srcX: 0,
|
||||||
|
srcY: 0,
|
||||||
|
srcWidth: file.width,
|
||||||
|
srcHeight: file.height,
|
||||||
|
trgX: 0,
|
||||||
|
trgY: 0,
|
||||||
|
trgWidth: targetWidth,
|
||||||
|
trgHeight: targetHeight
|
||||||
|
}
|
||||||
|
|
||||||
|
return info
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.onUploadAddedFile = function(file) {
|
||||||
|
var $object = $(file.previewElement).data('dzFileObject', file)
|
||||||
|
|
||||||
|
// Remove any exisiting objects for single variety
|
||||||
|
if (!this.options.isMulti) {
|
||||||
|
this.removeFileFromElement($object.siblings())
|
||||||
|
}
|
||||||
|
|
||||||
|
this.evalIsPopulated()
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.onUploadSending = function(file, xhr, formData) {
|
||||||
|
this.addExtraFormData(formData)
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.onUploadSuccess = function(file, response) {
|
||||||
|
var $preview = $(file.previewElement),
|
||||||
|
$img = $('.image img', $preview)
|
||||||
|
|
||||||
|
$preview.addClass('is-success')
|
||||||
|
|
||||||
|
if (response.id) {
|
||||||
|
$preview.data('id', response.id)
|
||||||
|
$preview.data('path', response.path)
|
||||||
|
$('.upload-remove-button', $preview).data('request-data', { file_id: response.id })
|
||||||
|
$img.attr('src', response.thumb)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Trigger change event (Compatability with october.form.js)
|
||||||
|
*/
|
||||||
|
this.$el.closest('[data-field-name]').trigger('change.oc.formwidget')
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.onUploadError = function(file, error) {
|
||||||
|
var $preview = $(file.previewElement)
|
||||||
|
$preview.addClass('is-error')
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.addExtraFormData = function(formData) {
|
||||||
|
if (this.options.extraData) {
|
||||||
|
$.each(this.options.extraData, function (name, value) {
|
||||||
|
formData.append(name, value)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
var $form = this.$el.closest('form')
|
||||||
|
if ($form.length > 0) {
|
||||||
|
$.each($form.serializeArray(), function (index, field) {
|
||||||
|
formData.append(field.name, field.value)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.removeFileFromElement = function($element) {
|
||||||
|
var self = this
|
||||||
|
|
||||||
|
$element.each(function() {
|
||||||
|
var $el = $(this),
|
||||||
|
obj = $el.data('dzFileObject')
|
||||||
|
|
||||||
|
if (obj) {
|
||||||
|
self.dropzone.removeFile(obj)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$el.remove()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// User interaction
|
||||||
|
//
|
||||||
|
|
||||||
|
FileUpload.prototype.onRemoveObject = function(ev) {
|
||||||
|
var self = this,
|
||||||
|
$object = $(ev.target).closest('.upload-object')
|
||||||
|
|
||||||
|
$(ev.target)
|
||||||
|
.closest('.upload-remove-button')
|
||||||
|
.one('ajaxPromise', function(){
|
||||||
|
$object.addClass('is-loading')
|
||||||
|
})
|
||||||
|
.one('ajaxDone', function(){
|
||||||
|
self.removeFileFromElement($object)
|
||||||
|
self.evalIsPopulated()
|
||||||
|
})
|
||||||
|
.request()
|
||||||
|
|
||||||
|
ev.stopPropagation()
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.onClickSuccessObject = function(ev) {
|
||||||
|
// if ($(ev.target).closest('.meta').length) return
|
||||||
|
//
|
||||||
|
// var $target = $(ev.target).closest('.upload-object')
|
||||||
|
// window.open($target.data('path'))
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.prototype.onClickErrorObject = function(ev) {
|
||||||
|
var
|
||||||
|
self = this,
|
||||||
|
$object = $(ev.target).closest('.upload-object'),
|
||||||
|
errorMsg = $('[data-dz-errormessage]', $object).text()
|
||||||
|
|
||||||
|
alert(errorMsg)
|
||||||
|
|
||||||
|
this.removeFileFromElement($object)
|
||||||
|
self.evalIsPopulated()
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Helpers
|
||||||
|
//
|
||||||
|
|
||||||
|
FileUpload.prototype.evalIsPopulated = function() {
|
||||||
|
var isPopulated = !!$('.upload-object', this.$filesContainer).length
|
||||||
|
this.$el.toggleClass('is-populated', isPopulated)
|
||||||
|
|
||||||
|
// Reset maxFiles counter
|
||||||
|
if (!isPopulated) {
|
||||||
|
this.dropzone.removeAllFiles()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUpload.DEFAULTS = {
|
||||||
|
url: window.location,
|
||||||
|
uniqueId: null,
|
||||||
|
extraData: {},
|
||||||
|
paramName: 'file_data',
|
||||||
|
fileTypes: null,
|
||||||
|
template: null,
|
||||||
|
isMulti: null,
|
||||||
|
isPreview: null,
|
||||||
|
thumbnailWidth: 120,
|
||||||
|
thumbnailHeight: 120
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILEUPLOAD PLUGIN DEFINITION
|
||||||
|
// ============================
|
||||||
|
|
||||||
|
var old = $.fn.fileUploader
|
||||||
|
|
||||||
|
$.fn.fileUploader = function (option) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
var data = $this.data('oc.fileUpload')
|
||||||
|
var options = $.extend({}, FileUpload.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||||
|
if (!data) $this.data('oc.fileUpload', (data = new FileUpload(this, options)))
|
||||||
|
if (typeof option == 'string') data[option].call($this)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.fileUploader.Constructor = FileUpload
|
||||||
|
|
||||||
|
// FILEUPLOAD NO CONFLICT
|
||||||
|
// =================
|
||||||
|
|
||||||
|
$.fn.fileUploader.noConflict = function () {
|
||||||
|
$.fn.fileUpload = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILEUPLOAD DATA-API
|
||||||
|
// ===============
|
||||||
|
$(document).render(function () {
|
||||||
|
$('[data-control="fileupload"]').fileUploader()
|
||||||
|
})
|
||||||
|
|
||||||
|
}(window.jQuery);
|
||||||
|
|
||||||
|
|
||||||
|
var uploadDropZones = {};
|
||||||
|
|
||||||
|
$(document).on("uploadstarted", function(event) {
|
||||||
|
var frm = $(event.uploader.dropzone.element).parents('form');
|
||||||
|
frm.find(':submit').prop('disabled', true);
|
||||||
|
});
|
||||||
|
|
||||||
|
var martin;
|
||||||
|
$(document).on("uploadfinished", function(event) {
|
||||||
|
var frm = $(event.uploader.dropzone.element).parents('form');
|
||||||
|
frm.find(':submit').prop('disabled', false);
|
||||||
|
var dz = $(event.uploader.dropzone.element).data('unique-id');
|
||||||
|
uploadDropZones[dz] = event;
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,354 @@
|
||||||
|
.uploader-object-active() {
|
||||||
|
background: @uploader-object-active-bg !important;
|
||||||
|
|
||||||
|
i, p.size, p.error, .upload-remove-button {
|
||||||
|
color: #ecf0f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container {
|
||||||
|
border-right-color: @uploader-object-active-bg !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-error {
|
||||||
|
background: @uploader-object-error-bg !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploader-progress-bar() {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
height: @uploader-progress-bar-height;
|
||||||
|
background-color: @uploader-progress-bar-bg;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
|
||||||
|
|
||||||
|
.upload-progress {
|
||||||
|
float: left;
|
||||||
|
width: 0%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: @uploader-progress-bar-height;
|
||||||
|
color: @uploader-progress-bar-color;
|
||||||
|
background-color: #5fb6f5;
|
||||||
|
box-shadow: none;
|
||||||
|
transition: width .6s ease;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploader-block-button() {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
border: 2px dotted rgba(0,0,0,.1);
|
||||||
|
position: relative;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
.upload-button-icon {
|
||||||
|
position: absolute;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-top: -11px;
|
||||||
|
margin-left: -11px;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: "+";
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
font-size: 22px;
|
||||||
|
height: 22px;
|
||||||
|
width: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
color: rgba(0,0,0,.1);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border: 2px dotted rgba(0,0,0,.2);
|
||||||
|
|
||||||
|
.upload-button-icon:before {
|
||||||
|
color: #5cb85c;
|
||||||
|
color: rgba(0,0,0,.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border: 2px solid rgba(0,0,0,.3);
|
||||||
|
background: transparent;
|
||||||
|
|
||||||
|
.upload-button-icon:before {
|
||||||
|
color: #5cb85c;
|
||||||
|
color: rgba(0,0,0,.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploader-small-loader() {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-left: -10px;
|
||||||
|
background-size: 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploader-vertical-align() {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -44px;
|
||||||
|
height: 88px;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Shared
|
||||||
|
//
|
||||||
|
|
||||||
|
.responsiv-uploader-fileupload {
|
||||||
|
|
||||||
|
// Clearfix
|
||||||
|
&:after {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Uploaded item
|
||||||
|
//
|
||||||
|
|
||||||
|
.upload-object {
|
||||||
|
|
||||||
|
border-radius: 3px;
|
||||||
|
position: relative;
|
||||||
|
outline: none;
|
||||||
|
overflow: hidden;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container {
|
||||||
|
display: table;
|
||||||
|
opacity: .6;
|
||||||
|
|
||||||
|
i {
|
||||||
|
color: #95a5a6;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
display: table-cell;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container.image {
|
||||||
|
> div.icon-wrapper {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #2b3e50;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
line-height: 150%;
|
||||||
|
margin: 15px 0 5px 0;
|
||||||
|
padding-right: 0;
|
||||||
|
transition: padding 0.1s;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
a {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
display: none;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p.size, p.error {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #95a5a6;
|
||||||
|
strong { font-weight: 400; }
|
||||||
|
}
|
||||||
|
|
||||||
|
p.error {
|
||||||
|
display: none;
|
||||||
|
color: #ab2a1c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta {}
|
||||||
|
|
||||||
|
.info h4 a,
|
||||||
|
.meta a.upload-remove-button {
|
||||||
|
color: #2b3e50;
|
||||||
|
display: none;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 16px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Loading State
|
||||||
|
//
|
||||||
|
|
||||||
|
.upload-object {
|
||||||
|
.icon-container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container:after {
|
||||||
|
background-image: url('../../../../../modules/system/assets/ui/images/loader-transparent.svg');
|
||||||
|
position: absolute;
|
||||||
|
content: ' ';
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -20px;
|
||||||
|
margin-left: -20px;
|
||||||
|
display: block;
|
||||||
|
background-size: 40px 40px;
|
||||||
|
background-position: 50% 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-success {
|
||||||
|
.icon-container {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.icon-container:after {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-loading {
|
||||||
|
.icon-container {
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
.icon-container:after {
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Success state
|
||||||
|
//
|
||||||
|
|
||||||
|
.upload-object.is-success {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
h4 a,
|
||||||
|
.meta .upload-remove-button { display: block; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Error State
|
||||||
|
//
|
||||||
|
|
||||||
|
.upload-object.is-error {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity .3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container {
|
||||||
|
opacity: 1;
|
||||||
|
> img, > i {
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info h4 {
|
||||||
|
color: #ab2a1c;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.error {
|
||||||
|
display: block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info .upload-remove-button,
|
||||||
|
.meta .upload-remove-button {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Preview mode
|
||||||
|
//
|
||||||
|
|
||||||
|
&.is-preview {
|
||||||
|
.upload-button,
|
||||||
|
.upload-remove-button {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Media
|
||||||
|
//
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.responsiv-uploader-fileupload {
|
||||||
|
.upload-object.is-success {
|
||||||
|
h4 a,
|
||||||
|
.meta .upload-remove-button { display: block !important; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Spin animation
|
||||||
|
//
|
||||||
|
|
||||||
|
@-moz-keyframes spin {
|
||||||
|
0% { -moz-transform: rotate(0deg); }
|
||||||
|
100% { -moz-transform: rotate(359deg); }
|
||||||
|
}
|
||||||
|
@-webkit-keyframes spin {
|
||||||
|
0% { -webkit-transform: rotate(0deg); }
|
||||||
|
100% { -webkit-transform: rotate(359deg); }
|
||||||
|
}
|
||||||
|
@-o-keyframes spin {
|
||||||
|
0% { -o-transform: rotate(0deg); }
|
||||||
|
100% { -o-transform: rotate(359deg); }
|
||||||
|
}
|
||||||
|
@-ms-keyframes spin {
|
||||||
|
0% { -ms-transform: rotate(0deg); }
|
||||||
|
100% { -ms-transform: rotate(359deg); }
|
||||||
|
}
|
||||||
|
@keyframes spin {
|
||||||
|
0% { transform: rotate(0deg); }
|
||||||
|
100% { transform: rotate(359deg); }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,163 @@
|
||||||
|
//
|
||||||
|
// Multi File
|
||||||
|
//
|
||||||
|
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi {
|
||||||
|
.upload-button {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-files-container {
|
||||||
|
border: 1px solid @uploader-list-border-color;
|
||||||
|
border-radius: 3px;
|
||||||
|
border-bottom: none;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-populated .upload-files-container {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-object {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
border-bottom: 1px solid @uploader-list-border-color;
|
||||||
|
padding-left: 10px;
|
||||||
|
|
||||||
|
&:nth-child(even) {
|
||||||
|
background-color: @uploader-list-accent-bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 5px;
|
||||||
|
width: 35px;
|
||||||
|
padding: 11px 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-left: 35px;
|
||||||
|
margin-right: 15%;
|
||||||
|
|
||||||
|
h4, p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 11px 0;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
padding-right: 15px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
padding: 10px 0;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p.size {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 15%;
|
||||||
|
display: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.error {
|
||||||
|
color: #ab2a1c;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
.uploader-progress-bar();
|
||||||
|
position: absolute;
|
||||||
|
top: 18px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
margin-right: 15px;
|
||||||
|
width: 15%;
|
||||||
|
|
||||||
|
.upload-remove-button {
|
||||||
|
position: absolute;
|
||||||
|
top: -9px;
|
||||||
|
right: 0;
|
||||||
|
bottom: auto;
|
||||||
|
line-height: 150%;
|
||||||
|
padding: 10px 0;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container:after {
|
||||||
|
.uploader-small-loader();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Success
|
||||||
|
//
|
||||||
|
|
||||||
|
&.is-success {
|
||||||
|
.info p.size { display: block; }
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Hover
|
||||||
|
//
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.uploader-object-active();
|
||||||
|
h4 { padding-right: 35px; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Media
|
||||||
|
//
|
||||||
|
|
||||||
|
@media (max-width: @screen-md-max) {
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi {
|
||||||
|
.info {
|
||||||
|
margin-right: 20% !important;
|
||||||
|
p.size {
|
||||||
|
width: 20% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
width: 20% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: @screen-sm-max) {
|
||||||
|
.responsiv-uploader-fileupload.style-file-multi {
|
||||||
|
.upload-object {
|
||||||
|
h4 { padding-right: 35px !important; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-right: 25% !important;
|
||||||
|
p.size {
|
||||||
|
width: 25% !important;
|
||||||
|
padding-right: 35px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
width: 25% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
//
|
||||||
|
// Single File
|
||||||
|
//
|
||||||
|
|
||||||
|
.responsiv-uploader-fileupload.style-file-single {
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #e0e0e0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
padding-right: 11px;
|
||||||
|
|
||||||
|
.upload-button {
|
||||||
|
.uploader-vertical-align();
|
||||||
|
right: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-empty-message {
|
||||||
|
padding: 10px 0 10px 11px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-populated {
|
||||||
|
.upload-button,
|
||||||
|
.upload-empty-message {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-object {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 8px 0 10px 0;
|
||||||
|
|
||||||
|
.icon-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 35px;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin: 8px 0 0 7px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-left: 54px;
|
||||||
|
margin-right: 15%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
h4, p {
|
||||||
|
display: inline;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 150%;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.size {
|
||||||
|
font-weight: normal;
|
||||||
|
&:before {
|
||||||
|
content: " - ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p.error {
|
||||||
|
color: #ab2a1c;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
.uploader-progress-bar();
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -2px;
|
||||||
|
right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
.uploader-vertical-align();
|
||||||
|
right: 0;
|
||||||
|
width: 15%;
|
||||||
|
.upload-remove-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 0;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-top: -10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container:after {
|
||||||
|
.uploader-small-loader();
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-error {
|
||||||
|
.info {
|
||||||
|
p.size { display: none; }
|
||||||
|
p.error:before {
|
||||||
|
content: " - ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
//
|
||||||
|
// Multi Image
|
||||||
|
//
|
||||||
|
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi {
|
||||||
|
.upload-button,
|
||||||
|
.upload-object {
|
||||||
|
margin: 0 10px 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-object {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #ecf0f1;
|
||||||
|
width: 260px;
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
.uploader-progress-bar();
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-container {
|
||||||
|
border-right: 1px solid #f6f8f9;
|
||||||
|
float: left;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 75px;
|
||||||
|
height: 75px;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.image img {
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-left: 90px;
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
padding-right: 15px;
|
||||||
|
a {
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: 0 15px 0 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.upload-placeholder {
|
||||||
|
height: 75px;
|
||||||
|
background-color: transparent;
|
||||||
|
&:after { opacity: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.uploader-object-active();
|
||||||
|
h4 { padding-right: 35px; }
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-error {
|
||||||
|
h4 { padding-right: 35px; }
|
||||||
|
|
||||||
|
.info {
|
||||||
|
p.size { display: none; }
|
||||||
|
p.error { padding-bottom: 11px; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-preview {
|
||||||
|
.upload-files-container {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Media
|
||||||
|
//
|
||||||
|
|
||||||
|
@media (max-width: 1280px) {
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi {
|
||||||
|
.upload-object {
|
||||||
|
width: 230px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.responsiv-uploader-fileupload.style-image-multi {
|
||||||
|
.upload-button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-files-container {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-object {
|
||||||
|
margin-right: 0;
|
||||||
|
display: block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
//
|
||||||
|
// Single Image
|
||||||
|
//
|
||||||
|
|
||||||
|
.responsiv-uploader-fileupload.style-image-single {
|
||||||
|
&.is-populated {
|
||||||
|
.upload-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-button {
|
||||||
|
.uploader-block-button();
|
||||||
|
min-height: 100px;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-object {
|
||||||
|
padding-bottom: 66px;
|
||||||
|
|
||||||
|
.icon-container {
|
||||||
|
border: 1px solid #f6f8f9;
|
||||||
|
background: rgba(255,255,255,.5);
|
||||||
|
|
||||||
|
&.image img {
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
// Img responsive
|
||||||
|
display: block;
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
|
||||||
|
// This is needed when the image is very large and
|
||||||
|
// being processed by dropzone on the client-side
|
||||||
|
// the image has no height or width.
|
||||||
|
min-height: 100px;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
.uploader-progress-bar();
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
height: 66px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 65px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
h4 { padding-right: 20px; }
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-error {
|
||||||
|
h4 { padding-right: 20px; }
|
||||||
|
|
||||||
|
.info {
|
||||||
|
p.size { display: none; }
|
||||||
|
p.error { padding-bottom: 11px; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Media
|
||||||
|
//
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.responsiv-uploader-fileupload.style-image-single {
|
||||||
|
.upload-object {
|
||||||
|
h4 { padding-right: 20px !important; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
@uploader-progress-bar-height: 5px;
|
||||||
|
@uploader-progress-bar-color: #fff;
|
||||||
|
@uploader-progress-bar-bg: #f5f5f5;
|
||||||
|
@uploader-inactive-icon: #808b93;
|
||||||
|
@uploader-object-active-bg: #4da7e8;
|
||||||
|
@uploader-object-error-bg: #ab2a1c;
|
||||||
|
@uploader-list-accent-bg: #f5f5f5;
|
||||||
|
@uploader-list-border-color: #eeeeee;
|
||||||
|
@uploader-inline-button-color: #333333;
|
||||||
|
|
||||||
|
@screen-xs-max: 767px;
|
||||||
|
@screen-sm-max: 991px;
|
||||||
|
@screen-md-max: 1199px;
|
||||||
|
|
||||||
|
@import "uploader.base.less";
|
||||||
|
@import "uploader.imagemulti.less";
|
||||||
|
@import "uploader.imagesingle.less";
|
||||||
|
@import "uploader.filemulti.less";
|
||||||
|
@import "uploader.filesingle.less";
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,87 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BlakeJones\MagicForms\Classes;
|
||||||
|
|
||||||
|
use Backend, BackendAuth;
|
||||||
|
|
||||||
|
class BackendHelpers {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a Backend URL based on a matrix of URLS and permissions
|
||||||
|
*
|
||||||
|
* @param array $urls Matrix of permissions and URLs
|
||||||
|
* @param string $default Default URL
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getBackendURL(array $urls, string $default) :string {
|
||||||
|
$user = BackendAuth::getUser();
|
||||||
|
foreach ($urls as $permission => $URL) {
|
||||||
|
if ($user->hasAccess($permission)) {
|
||||||
|
return Backend::url($URL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Backend::url($urls[$default]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if Translator plugin is installed
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public static function isTranslatePlugin() :bool {
|
||||||
|
return class_exists('\RainLab\Translate\Classes\Translator') && class_exists('\RainLab\Translate\Models\Message') && class_exists('\RainLab\Translate\Models\Locale');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render an array|object as HTML list (UL > LI)
|
||||||
|
*
|
||||||
|
* @param mixed $data List items
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function array2ul($data) :string {
|
||||||
|
$return = '';
|
||||||
|
foreach ($data as $index => $item) {
|
||||||
|
if (!is_string($item)) {
|
||||||
|
$return .= '<li>' . htmlspecialchars($index, ENT_QUOTES) . '<ul>' . self::array2ul($item) . "</ul></li>";
|
||||||
|
} else {
|
||||||
|
$return .= '<li>';
|
||||||
|
if (is_object($data)) {
|
||||||
|
$return .= htmlspecialchars($index, ENT_QUOTES) . ' - ';
|
||||||
|
}
|
||||||
|
$return .= htmlspecialchars($item, ENT_QUOTES) .'</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anonymize an IPv4 address
|
||||||
|
* (credits: https://github.com/geertw/php-ip-anonymizer)
|
||||||
|
*
|
||||||
|
* @param string $address IPv4 address
|
||||||
|
*
|
||||||
|
* @return string Anonymized address
|
||||||
|
*/
|
||||||
|
public static function anonymizeIPv4(string $address) :string {
|
||||||
|
return inet_ntop(inet_pton($address) & inet_pton("255.255.255.0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract string from curly braces
|
||||||
|
*
|
||||||
|
* @param string $pattern Pattern to replace
|
||||||
|
* @param string $replacement Replacement string
|
||||||
|
* @param string $subject Strings to replace
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function replaceToken(string $pattern, string $replacement = null, string $subject) :string {
|
||||||
|
$pattern = '/{{\s*('.$pattern.')\s*}}/';
|
||||||
|
return preg_replace($pattern, $replacement, $subject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BlakeJones\MagicForms\Classes;
|
||||||
|
|
||||||
|
use Flash;
|
||||||
|
use Request;
|
||||||
|
use BlakeJones\MagicForms\Models\Record;
|
||||||
|
use BlakeJones\MagicForms\Models\Settings;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use October\Rain\Exception\ApplicationException;
|
||||||
|
use October\Rain\Exception\ValidationException;
|
||||||
|
|
||||||
|
class GDPR {
|
||||||
|
|
||||||
|
public static function cleanRecords() {
|
||||||
|
|
||||||
|
$gdpr_enable = Settings::get('gdpr_enable', false);
|
||||||
|
$gdpr_days = Settings::get('gdpr_days' , false);
|
||||||
|
|
||||||
|
if (!$gdpr_enable) {
|
||||||
|
Flash::error(e(trans('blakejones.magicforms::lang.classes.GDPR.alert_gdpr_disabled')));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($gdpr_enable && is_numeric($gdpr_days)) {
|
||||||
|
$days = Carbon::now()->subDays($gdpr_days);
|
||||||
|
$rows = Record::whereDate('created_at', '<', $days)->forceDelete();
|
||||||
|
return $rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
Flash::error(e(trans('blakejones.magicforms::lang.classes.GDPR.alert_invalid_gdpr')));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,308 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BlakeJones\MagicForms\Classes;
|
||||||
|
|
||||||
|
use Lang;
|
||||||
|
use Config;
|
||||||
|
use Request;
|
||||||
|
use Session;
|
||||||
|
use Redirect;
|
||||||
|
use Validator;
|
||||||
|
use AjaxException;
|
||||||
|
use Cms\Classes\ComponentBase;
|
||||||
|
use BlakeJones\MagicForms\Models\Record;
|
||||||
|
use BlakeJones\MagicForms\Models\Settings;
|
||||||
|
use BlakeJones\MagicForms\Classes\SendMail;
|
||||||
|
use Illuminate\Support\Facades\Event;
|
||||||
|
use BlakeJones\MagicForms\Classes\BackendHelpers;
|
||||||
|
use October\Rain\Exception\ValidationException;
|
||||||
|
|
||||||
|
abstract class MagicForm extends ComponentBase
|
||||||
|
{
|
||||||
|
|
||||||
|
use \BlakeJones\MagicForms\Classes\ReCaptcha;
|
||||||
|
use \BlakeJones\MagicForms\Classes\SharedProperties;
|
||||||
|
|
||||||
|
public function onRun() {
|
||||||
|
|
||||||
|
$this->page['recaptcha_enabled'] = $this->isReCaptchaEnabled();
|
||||||
|
$this->page['recaptcha_misconfigured'] = $this->isReCaptchaMisconfigured();
|
||||||
|
|
||||||
|
if ($this->isReCaptchaEnabled()) {
|
||||||
|
$this->loadReCaptcha();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->isReCaptchaMisconfigured()) {
|
||||||
|
$this->page['recaptcha_warn'] = Lang::get('blakejones.magicforms::lang.components.shared.recaptcha_warn');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->property('inline_errors') == 'display') {
|
||||||
|
$this->addJs('assets/js/inline-errors.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function settings() {
|
||||||
|
return [
|
||||||
|
'recaptcha_site_key' => Settings::get('recaptcha_site_key'),
|
||||||
|
'recaptcha_secret_key' => Settings::get('recaptcha_secret_key'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onFormSubmit() {
|
||||||
|
|
||||||
|
// FLASH PARTIAL
|
||||||
|
$flash_partial = $this->property('messages_partial', '@flash.htm');
|
||||||
|
|
||||||
|
// CSRF CHECK
|
||||||
|
if (Config::get('cms.enableCsrfProtection') && (Session::token() != post('_token'))) {
|
||||||
|
throw new AjaxException(['#' . $this->alias . '_forms_flash' => $this->renderPartial($flash_partial, [
|
||||||
|
'status' => 'error',
|
||||||
|
'type' => 'danger',
|
||||||
|
'content' => Lang::get('blakejones.magicforms::lang.components.shared.csrf_error'),
|
||||||
|
])]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOAD TRANSLATOR PLUGIN
|
||||||
|
if (BackendHelpers::isTranslatePlugin()) {
|
||||||
|
$translator = \RainLab\Translate\Classes\Translator::instance();
|
||||||
|
$translator->loadLocaleFromSession();
|
||||||
|
$locale = $translator->getLocale();
|
||||||
|
\RainLab\Translate\Models\Message::setContext($locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILTER ALLOWED FIELDS
|
||||||
|
$allow = $this->property('allowed_fields');
|
||||||
|
if (is_array($allow) && !empty($allow)) {
|
||||||
|
foreach ($allow as $field) {
|
||||||
|
$post[$field] = post($field);
|
||||||
|
}
|
||||||
|
if ($this->isReCaptchaEnabled()) {
|
||||||
|
$post['g-recaptcha-response'] = post('g-recaptcha-response');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$post = post();
|
||||||
|
}
|
||||||
|
|
||||||
|
// SANITIZE FORM DATA
|
||||||
|
if ($this->property('sanitize_data') == 'htmlspecialchars') {
|
||||||
|
$post = $this->array_map_recursive(function ($value) {
|
||||||
|
return htmlspecialchars($value, ENT_QUOTES);
|
||||||
|
}, $post);
|
||||||
|
}
|
||||||
|
|
||||||
|
// VALIDATION PARAMETERS
|
||||||
|
$rules = (array)$this->property('rules');
|
||||||
|
$msgs = (array)$this->property('rules_messages');
|
||||||
|
$custom_attributes = (array)$this->property('custom_attributes');
|
||||||
|
|
||||||
|
// TRANSLATE CUSTOM ERROR MESSAGES
|
||||||
|
if (BackendHelpers::isTranslatePlugin()) {
|
||||||
|
foreach ($msgs as $rule => $msg) {
|
||||||
|
$msgs[$rule] = \RainLab\Translate\Models\Message::trans($msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ADD reCAPTCHA VALIDATION
|
||||||
|
if ($this->isReCaptchaEnabled() && $this->property('recaptcha_size') != 'invisible') {
|
||||||
|
$rules['g-recaptcha-response'] = 'required';
|
||||||
|
}
|
||||||
|
|
||||||
|
// DO FORM VALIDATION
|
||||||
|
$validator = Validator::make($post, $rules, $msgs, $custom_attributes);
|
||||||
|
|
||||||
|
// NICE reCAPTCHA FIELD NAME
|
||||||
|
if ($this->isReCaptchaEnabled()) {
|
||||||
|
$fields_names = ['g-recaptcha-response' => 'reCAPTCHA'];
|
||||||
|
$validator->setAttributeNames(array_merge($fields_names, $custom_attributes));
|
||||||
|
}
|
||||||
|
|
||||||
|
// VALIDATE ALL + CAPTCHA EXISTS
|
||||||
|
if ($validator->fails()) {
|
||||||
|
|
||||||
|
// GET DEFAULT ERROR MESSAGE
|
||||||
|
$message = $this->property('messages_errors');
|
||||||
|
|
||||||
|
// LOOK FOR TRANSLATION
|
||||||
|
if (BackendHelpers::isTranslatePlugin()) {
|
||||||
|
$message = \RainLab\Translate\Models\Message::trans($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
// THROW ERRORS
|
||||||
|
if ($this->property('inline_errors') == 'display') {
|
||||||
|
throw new ValidationException($validator);
|
||||||
|
} else {
|
||||||
|
throw new AjaxException($this->_exceptionResponse($validator, [
|
||||||
|
'status' => 'error',
|
||||||
|
'type' => 'danger',
|
||||||
|
'title' => $message,
|
||||||
|
'list' => $validator->messages()->all(),
|
||||||
|
'errors' => json_encode($validator->messages()->messages()),
|
||||||
|
'jscript' => $this->property('js_on_error'),
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// IF FIRST VALIDATION IS OK, VALIDATE CAPTCHA vs GOOGLE
|
||||||
|
// (this prevents to resolve captcha after every form error)
|
||||||
|
if ($this->isReCaptchaEnabled()) {
|
||||||
|
|
||||||
|
// PREPARE RECAPTCHA VALIDATION
|
||||||
|
$rules = ['g-recaptcha-response' => 'recaptcha'];
|
||||||
|
$err_msg = ['g-recaptcha-response.recaptcha' => Lang::get('blakejones.magicforms::lang.validation.recaptcha_error')];
|
||||||
|
|
||||||
|
// DO SECOND VALIDATION
|
||||||
|
$validator = Validator::make($post, $rules, $err_msg);
|
||||||
|
|
||||||
|
// VALIDATE ALL + CAPTCHA EXISTS
|
||||||
|
if ($validator->fails()) {
|
||||||
|
|
||||||
|
// THROW ERRORS
|
||||||
|
if ($this->property('inline_errors') == 'display') {
|
||||||
|
throw new ValidationException($validator);
|
||||||
|
} else {
|
||||||
|
throw new AjaxException($this->_exceptionResponse($validator, [
|
||||||
|
'status' => 'error',
|
||||||
|
'type' => 'danger',
|
||||||
|
'content' => Lang::get('blakejones.magicforms::lang.validation.recaptcha_error'),
|
||||||
|
'errors' => json_encode($validator->messages()->messages()),
|
||||||
|
'jscript' => $this->property('js_on_error'),
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// REMOVE EXTRA FIELDS FROM STORED DATA
|
||||||
|
unset($post['_token'], $post['g-recaptcha-response'], $post['_session_key'], $post['_uploader']);
|
||||||
|
|
||||||
|
// FIRE BEFORE SAVE EVENT
|
||||||
|
Event::fire('blakejones.magicforms.beforeSaveRecord', [&$post, $this]);
|
||||||
|
|
||||||
|
if (count($custom_attributes)) {
|
||||||
|
$post = collect($post)->mapWithKeys(function ($val, $key) use ($custom_attributes) {
|
||||||
|
return [array_get($custom_attributes, $key, $key) => $val];
|
||||||
|
})->all();
|
||||||
|
}
|
||||||
|
|
||||||
|
$record = new Record;
|
||||||
|
$record->ip = $this->getIP();
|
||||||
|
$record->created_at = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
// SAVE RECORD TO DATABASE
|
||||||
|
if (! $this->property('skip_database')) {
|
||||||
|
$record->form_data = json_encode($post, JSON_UNESCAPED_UNICODE);
|
||||||
|
if ($this->property('group') != '') {
|
||||||
|
$record->group = $this->property('group');
|
||||||
|
}
|
||||||
|
$record->save(null, post('_session_key'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// SEND NOTIFICATION EMAIL
|
||||||
|
if ($this->property('mail_enabled')) {
|
||||||
|
SendMail::sendNotification($this->getProperties(), $post, $record, $record->files);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SEND AUTORESPONSE EMAIL
|
||||||
|
if ($this->property('mail_resp_enabled')) {
|
||||||
|
SendMail::sendAutoResponse($this->getProperties(), $post, $record);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIRE AFTER SAVE EVENT
|
||||||
|
Event::fire('blakejones.magicforms.afterSaveRecord', [&$post, $this, $record]);
|
||||||
|
|
||||||
|
// CHECK FOR REDIRECT
|
||||||
|
if ($this->property('redirect')) {
|
||||||
|
return Redirect::to($this->property('redirect'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// GET DEFAULT SUCCESS MESSAGE
|
||||||
|
$message = $this->property('messages_success');
|
||||||
|
|
||||||
|
// LOOK FOR TRANSLATION
|
||||||
|
if (BackendHelpers::isTranslatePlugin()) {
|
||||||
|
$message = \RainLab\Translate\Models\Message::trans($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
// DISPLAY SUCCESS MESSAGE
|
||||||
|
return ['#' . $this->alias . '_forms_flash' => $this->renderPartial($flash_partial, [
|
||||||
|
'status' => 'success',
|
||||||
|
'type' => 'success',
|
||||||
|
'content' => $message,
|
||||||
|
'jscript' => $this->prepareJavaScript(),
|
||||||
|
])];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function _exceptionResponse($validator, $params) {
|
||||||
|
|
||||||
|
// FLASH PARTIAL
|
||||||
|
$flash_partial = $this->property('messages_partial', '@flash.htm');
|
||||||
|
|
||||||
|
// EXCEPTION RESPONSE
|
||||||
|
$response = ['#' . $this->alias . '_forms_flash' => $this->renderPartial($flash_partial, $params)];
|
||||||
|
|
||||||
|
// INCLUDE ERROR FIELDS IF REQUIRED
|
||||||
|
if ($this->property('inline_errors') != 'disabled') {
|
||||||
|
$response['error_fields'] = $validator->messages();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function prepareJavaScript()
|
||||||
|
{
|
||||||
|
$code = false;
|
||||||
|
|
||||||
|
/* SUCCESS JS */
|
||||||
|
if ($this->property('js_on_success') != '') {
|
||||||
|
$code .= $this->property('js_on_success');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RECAPTCHA JS */
|
||||||
|
if ($this->isReCaptchaEnabled()) {
|
||||||
|
$code .= $this->renderPartial('@js/recaptcha.htm');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RESET FORM JS */
|
||||||
|
if ($this->property('reset_form')) {
|
||||||
|
$params = ['id' => '#' . $this->alias . '_forms_flash'];
|
||||||
|
$code .= $this->renderPartial('@js/reset-form.htm', $params);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* RESET UPLOAD FORM */
|
||||||
|
if ($this->property('reset_form') && $this->property('uploader_enable')) {
|
||||||
|
$params = ['id' => $this->alias];
|
||||||
|
$code .= $this->renderPartial('@js/reset-uploader.htm', $params);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $code;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getIP()
|
||||||
|
{
|
||||||
|
if ($this->property('anonymize_ip') == 'full') {
|
||||||
|
return '(Not stored)';
|
||||||
|
}
|
||||||
|
|
||||||
|
$ip = Request::getClientIp();
|
||||||
|
|
||||||
|
if ($this->property('anonymize_ip') == 'partial') {
|
||||||
|
return BackendHelpers::anonymizeIPv4($ip);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function array_map_recursive($callback, $array)
|
||||||
|
{
|
||||||
|
$func = function ($item) use (&$func, &$callback) {
|
||||||
|
return is_array($item) ? array_map($func, $item) : call_user_func($callback, $item);
|
||||||
|
};
|
||||||
|
|
||||||
|
return array_map($func, $array);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BlakeJones\MagicForms\Classes;
|
||||||
|
|
||||||
|
use Session;
|
||||||
|
use BlakeJones\MagicForms\Classes\BackendHelpers;
|
||||||
|
use BlakeJones\MagicForms\Models\Settings;
|
||||||
|
use RainLab\Translate\Classes\Translator;
|
||||||
|
|
||||||
|
trait ReCaptcha {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var RainLab\Translate\Classes\Translator Translator object.
|
||||||
|
*/
|
||||||
|
protected $translator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string The active locale code.
|
||||||
|
*/
|
||||||
|
public $activeLocale;
|
||||||
|
|
||||||
|
public function init() {
|
||||||
|
if (BackendHelpers::isTranslatePlugin()) {
|
||||||
|
$this->translator = Translator::instance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function isReCaptchaEnabled() {
|
||||||
|
return ($this->property('recaptcha_enabled') && Settings::get('recaptcha_site_key') != '' && Settings::get('recaptcha_secret_key') != '');
|
||||||
|
}
|
||||||
|
|
||||||
|
private function isReCaptchaMisconfigured() {
|
||||||
|
return ($this->property('recaptcha_enabled') && (Settings::get('recaptcha_site_key') == '' || Settings::get('recaptcha_secret_key') == ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getReCaptchaLang($lang='') {
|
||||||
|
if (BackendHelpers::isTranslatePlugin()) {
|
||||||
|
$lang = '&hl=' . $this->activeLocale = $this->translator->getLocale();
|
||||||
|
} else {
|
||||||
|
$lang = '&hl=' . $this->activeLocale = app()->getLocale();
|
||||||
|
}
|
||||||
|
return $lang;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function loadReCaptcha() {
|
||||||
|
$this->addJs('https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit'.$this->getReCaptchaLang(), ['async', 'defer']);
|
||||||
|
$this->addJs('assets/js/recaptcha.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BlakeJones\MagicForms\Classes;
|
||||||
|
|
||||||
|
use Request;
|
||||||
|
use BlakeJones\MagicForms\Models\Settings;
|
||||||
|
|
||||||
|
class ReCaptchaValidator {
|
||||||
|
|
||||||
|
public function validateReCaptcha($attribute, $value, $parameters) {
|
||||||
|
$secret_key = Settings::get('recaptcha_secret_key');
|
||||||
|
$recaptcha = post('g-recaptcha-response');
|
||||||
|
$ip = Request::getClientIp();
|
||||||
|
$URL = "https://www.google.com/recaptcha/api/siteverify?secret=$secret_key&response=$recaptcha&remoteip=$ip";
|
||||||
|
$response = json_decode(file_get_contents($URL), true);
|
||||||
|
return ($response['success'] == true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,146 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace BlakeJones\MagicForms\Classes;
|
||||||
|
|
||||||
|
use Mail;
|
||||||
|
use System\Models\MailTemplate;
|
||||||
|
use BlakeJones\MagicForms\Classes\BackendHelpers;
|
||||||
|
|
||||||
|
class SendMail {
|
||||||
|
|
||||||
|
public static function sendNotification($properties, $post, $record, $files) {
|
||||||
|
|
||||||
|
// CHECK IF THERE IS AT LEAST ONE MAIL ADDRESS
|
||||||
|
if (!isset($properties['mail_recipients'])) {
|
||||||
|
$properties['mail_recipients'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CHECK IF THERE IS AT LEAST ONE MAIL ADDRESS
|
||||||
|
if (!isset($properties['mail_bcc'])) {
|
||||||
|
$properties['mail_bcc'] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($properties['mail_recipients']) || is_array($properties['mail_bcc'])) {
|
||||||
|
|
||||||
|
// CUSTOM TEMPLATE
|
||||||
|
$template = isset($properties['mail_template']) && $properties['mail_template'] != '' && MailTemplate::findOrMakeTemplate($properties['mail_template']) ? $properties['mail_template'] : 'blakejones.magicforms::mail.notification';
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'id' => $record->id,
|
||||||
|
'data' => $post,
|
||||||
|
'ip' => $record->ip,
|
||||||
|
'date' => $record->created_at
|
||||||
|
];
|
||||||
|
|
||||||
|
// CHECK FOR CUSTOM SUBJECT
|
||||||
|
if (isset($properties['mail_subject'])) {
|
||||||
|
|
||||||
|
// set date format
|
||||||
|
$dateFormat = $properties['emails_date_format'] ?? 'Y-m-d';
|
||||||
|
|
||||||
|
// REPLACE RECORD TOKENS IN SUBJECT
|
||||||
|
$properties['mail_subject'] = BackendHelpers::replaceToken('record.id', $data['id'], $properties['mail_subject']);
|
||||||
|
$properties['mail_subject'] = BackendHelpers::replaceToken('record.ip', $data['ip'], $properties['mail_subject']);
|
||||||
|
$properties['mail_subject'] = BackendHelpers::replaceToken('record.date', date($dateFormat), $properties['mail_subject']);
|
||||||
|
|
||||||
|
// REPLACE FORM FIELDS TOKENS IN SUBJECT
|
||||||
|
foreach ($data['data'] as $key => $value) {
|
||||||
|
if (!is_array($value)) {
|
||||||
|
$properties['mail_subject'] = BackendHelpers::replaceToken('form.'.$key, $value, $properties['mail_subject']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SET CUSTOM SUBJECT
|
||||||
|
$data['subject'] = $properties['mail_subject'];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// SEND NOTIFICATION EMAIL
|
||||||
|
Mail::sendTo($properties['mail_recipients'], $template, $data, function ($message) use ($properties, $post, $files) {
|
||||||
|
|
||||||
|
// SEND BLIND CARBON COPY
|
||||||
|
if (isset($properties['mail_bcc']) && is_array($properties['mail_bcc'])) {
|
||||||
|
$message->bcc($properties['mail_bcc']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// USE CUSTOM SUBJECT
|
||||||
|
if (isset($properties['mail_subject'])) {
|
||||||
|
$message->subject($properties['mail_subject']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ADD REPLY TO ADDRESS
|
||||||
|
if (isset($properties['mail_replyto']) && isset($post[$properties['mail_replyto']])) {
|
||||||
|
$message->replyTo($post[$properties['mail_replyto']]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ADD UPLOADS
|
||||||
|
if (isset($properties['mail_uploads']) && $properties['mail_uploads'] && !empty($files)) {
|
||||||
|
foreach ($files as $file) {
|
||||||
|
$message->attach($file->getLocalPath(), ['as' => $file->getFilename()]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function sendAutoResponse($properties, $post, $record) {
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'id' => $record->id,
|
||||||
|
'data' => $post,
|
||||||
|
'ip' => $record->ip,
|
||||||
|
'date' => $record->created_at
|
||||||
|
];
|
||||||
|
|
||||||
|
// CHECK FOR CUSTOM SUBJECT
|
||||||
|
if (isset($properties['mail_resp_subject'])) {
|
||||||
|
|
||||||
|
// set date format
|
||||||
|
$dateFormat = $properties['emails_date_format'] ?? 'Y-m-d';
|
||||||
|
|
||||||
|
// REPLACE RECORD TOKENS IN SUBJECT
|
||||||
|
$properties['mail_resp_subject'] = BackendHelpers::replaceToken('record.id', $data['id'], $properties['mail_resp_subject']);
|
||||||
|
$properties['mail_resp_subject'] = BackendHelpers::replaceToken('record.ip', $data['ip'], $properties['mail_resp_subject']);
|
||||||
|
$properties['mail_resp_subject'] = BackendHelpers::replaceToken('record.date', date($dateFormat), $properties['mail_resp_subject']);
|
||||||
|
|
||||||
|
// REPLACE FORM FIELDS TOKENS IN SUBJECT
|
||||||
|
foreach ($data['data'] as $key => $value) {
|
||||||
|
if (!is_array($value)) {
|
||||||
|
$properties['mail_resp_subject'] = BackendHelpers::replaceToken('form.'.$key, $value, $properties['mail_resp_subject']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = isset($properties['mail_resp_field']) ? $properties['mail_resp_field'] : null;
|
||||||
|
$to = isset($post[$response]) ? $post[$response] : null;
|
||||||
|
$from = isset($properties['mail_resp_from']) ? $properties['mail_resp_from'] : null;
|
||||||
|
$subject = isset($properties['mail_resp_subject']) ? $properties['mail_resp_subject'] : null;
|
||||||
|
|
||||||
|
if (filter_var($to, FILTER_VALIDATE_EMAIL) && filter_var($from, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
|
||||||
|
// CUSTOM TEMPLATE
|
||||||
|
$template = isset($properties['mail_resp_template']) && $properties['mail_resp_template'] != '' && MailTemplate::findOrMakeTemplate($properties['mail_resp_template']) ? $properties['mail_resp_template'] : 'blakejones.magicforms::mail.autoresponse';
|
||||||
|
|
||||||
|
Mail::sendTo($to, $template, [
|
||||||
|
'id' => $record->id,
|
||||||
|
'data' => $post,
|
||||||
|
'ip' => $record->ip,
|
||||||
|
'date' => $record->created_at
|
||||||
|
], function ($message) use ($from, $subject) {
|
||||||
|
$message->from($from);
|
||||||
|
if (isset($subject)) {
|
||||||
|
$message->subject($subject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue