Commit Graph

69 Commits

Author SHA1 Message Date
Luke Towers 4f0b237aad Use an embedded Form widget to process FileUpload properties
Fixes #2168, #3097. Related: https://github.com/rainlab/translate-plugin/pull/442
2019-04-17 18:48:32 -06:00
Rachasak Ragkamnerd 70cd444f8a Added support for 'cache' attribute to addJs() to disable CF RocketLoader (#4092)
Credit to @itpcc 

Due to CloudFlare Rocket Loader, CF will automatically try to optimize page loading speed by changing script type attribute. This breaks the script execution order and makes the user unable to upload the file(s) in the backend using "FileUpload" widget.

However, [CloudFlare allows adding "data-cfasync"](https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-specific-JavaScripts-) to prevent this. And it was used in the [commit #3841](https://github.com/octobercms/october/pull/3841/files).
2019-04-16 20:27:13 -06:00
Samuel Georges 5190c8177b Avoid terminating the app using exit() or die()
Refs #3783
Refs #3746
2019-03-29 07:10:07 +11:00
Luke Towers 3ff77120c6 Improved disabled support for balloon-selector and fileupload fields 2019-01-16 13:32:31 -06:00
Nathan van der Werf 8fd16d4db6
Merge branch 'develop' into feature/cleanup
# Conflicts:
#	modules/backend/formwidgets/FileUpload.php
2018-08-24 19:52:54 +02:00
Nathan van der Werf 0f0d108da0
Remove unused imports 2018-08-24 19:51:59 +02:00
Szabó Gergő e46eff8a26 Remove hard height constraint from previewing uploaded images (#3718)
Fixes #3698. Credit to @gergo85
2018-08-23 09:32:18 -06:00
Nathan van der Werf 123145fd54 Remove unnecessary parentheses 2018-08-15 18:49:52 +02:00
Nathan van der Werf 3a918ad200 Remove "null" assignments 2018-08-15 18:33:24 +02:00
Luke Towers 0086a47b80 Add attachOnUpload option to FileUpload formwidget
Fixes #3501
2018-06-04 16:22:23 -06:00
Luke Towers 422a99770c
Attach uploaded files directly to parent if exists
If the parent of the file attachment relationship already exists, then attach the file directly to it in this request instead of going through deferred bindings. Will continue to attach files through deferred binding if the parent relation doesn't exist.
2018-03-09 23:47:16 -06:00
Quezler cc17b679f1 Code dusting (#2826)
Code cleaning according to PSR-2 w/ exemptions (mostly dust).
2017-04-24 21:38:19 +10:00
Samuel Georges b841f9e066 {@inheritDoc} -> @inheritDoc 2017-03-16 06:26:14 +11:00
Samuel Georges 5f91c45f79 Implement disabled support for some form widgets
Recompile assets
Fixes #2749 (Media Finder)
Fixes #2750 (File upload)
Fixes #2751 (Rich Editor)
Refs #2724
2017-03-14 13:52:47 +11:00
Prasanth Darsan 6cc50b8ca8 Fixed error on saving attachment config when its put on pivot form of a relation 2016-06-28 23:17:27 +05:30
Samuel Georges ed6e01c2c5 File model is now abstract 2016-04-05 19:47:06 +10:00
Samuel Georges 23f4d40ef2 Merge common functionality in to FormModelWidget 2016-03-25 18:01:58 +11:00
Samuel Georges 1241f584d0 Merge remote-tracking branch 'remotes/origin/stable' into ui 2016-03-01 07:02:07 +11:00
Samuel Georges fd16f38b11 Implement file definitions (extensions + ignore files)
Block "unsafe" extensions from being uploaded to the Media manager
Fixes #1801
2016-02-29 18:12:26 +11:00
alekseybobkov a943708b99 UI updates 2016-02-19 22:12:41 -08:00
Samuel Georges 4db92fa8b5 Alt fix for #1585 2015-12-05 08:47:07 +11:00
BruNo Oliveira 8c051d4655 Add filetypes of FileUpload formwidgets in uppercase too 2015-11-06 08:56:32 -02:00
Samuel Georges 22252638a8 Because W3C 2015-10-16 17:50:53 +11:00
Samuel Georges 906a4e65c2 Prompt can now be used to define the button text for file multi
Minor update to checkbox markup
2015-08-28 04:39:29 +10:00
Samuel Georges b010732796 These methods should be protected, update client lang 2015-08-04 10:01:17 +10:00
Samuel Georges 8a12b2f37f Improve single image uploader 2015-06-30 15:27:26 +10:00
Samuel Georges bde07ef880 Fixes auto scaling image from breaking container in Firefox - Refs #1202 2015-06-27 11:41:42 +10:00
Samuel Georges 87e9996193 Add preview mode support to record finder 2015-06-25 11:05:53 +10:00
Samuel Georges c813318729 Added preview mode support to File upload widget
Widget also passes CSRF token
Switched to using a header instead of POST flag
2015-06-25 10:55:46 +10:00
Samuel Georges e6f70eafdd Translate prompt for FileUpload + MediaFinder
Remove redundant language key
Recompile assets
2015-06-20 22:21:18 +10:00
Samuel Georges c2c14e707f Added backend route for protected thumbs, Fixes #1218, thanks @jBOKA
Improved the FileUpload widget code to no longer rely on "pathOverride"
2015-06-20 11:27:03 +10:00
Samuel Georges 50e4840216 Create 'extensions' custom validator
FileUpload can now specify mime types
2015-06-20 10:12:14 +10:00
Samuel Georges 94ae0b7cbc Make prompt text configurable 2015-06-13 10:41:00 +10:00
Samuel Georges 6420027a6a Finish single file uploader
FileUpload now supports:
- optional 'useCaption' flag
- imageWidth and imageHeight are now optional
- default file uploader uses default file types
2015-06-10 22:13:24 +10:00
Samuel Georges f95af91ef1 Finish rebuilding multi file uploader
Create stub for single file uploader
2015-06-09 18:51:35 +10:00
Samuel Georges 887b959156 Rebuild image based UI for FileUpload form widget 2015-06-06 16:52:38 +10:00
Samuel Georges 9c166b18be Fixes #1091 2015-04-28 21:59:18 +10:00
Samuel Georges 87644166ad Adds internal download link for protected files 2015-04-25 12:53:54 +10:00
Samuel Georges cf1988eeca Fixes #1068 2015-04-13 21:51:22 +10:00
Samuel Georges 0a26827abd Refs #1064 - Throw a nicer error here 2015-04-12 19:58:28 +10:00
ebuster c15a61cfc8 Add missed Lang class using
Instead of message about my error I get message about system error in error message about my error.
2015-03-28 15:01:23 +03:00
Samuel Georges 398177b006 Full pivot support added to RelationController 2015-03-19 20:01:08 +11:00
Samuel Georges f8ae611ec9 Refactor form widgets to use new fillFromConfig() helper 2015-02-28 14:43:34 +11:00
Samuel Georges 85c47c4e01 public -> protected $defaultAlias 2015-02-28 12:43:53 +11:00
Samuel Georges c0839464fd Fileupload should detect the thumb extension 2015-02-20 22:12:24 +11:00
Samuel Georges 24f3168ce6 Check for empty arrays too 2015-02-14 21:40:49 +11:00
Samuel Georges 6bac3f9251 Fixes broken file uploads 2015-02-14 21:38:49 +11:00
Samuel Georges beb818efa5 Merge branch 'develop' into laravel5
Conflicts:
	modules/cms/classes/CmsCompoundObject.php
	modules/system/ServiceProvider.php
2015-02-04 19:35:55 +11:00
Samuel Georges 694a7dfb74 Uploader now supports defining acceptable file types 2015-01-31 15:31:46 +11:00
Samuel Georges b1b700368f Radical reorg of some classes 2015-01-28 11:49:54 +11:00