docbrown/app/views/comments
Alex bc8c126497
Validate file uploads client-side (#6737)
* JavaScript MVP

- First round of linting
- Use for testing

* Add some default UI error handling

* Add file validation to updating profile image

* Add type validation and fix size bug

* Refactor and add file validation to article cover

* Add file validation to body images

* Add accept field to profile image form

* Add parseInt to maxFileSizeMb

* Add accept and max-file-size-mb to article images

* Change parseInt to Number

* Add file validations to podcast form

* Add accept image to podcasts

* Add file validation and accept field to org form

* Use appendChild for error message

* Add file validation to comment form

* Add JS Docs comments

* Remove redundant format check

* Add documentation to override default values

* Update documention (spelling, formatting, etc.)

* Update max-file-size-mb to 25

* Bump default max file size for images to 25

* Change appendChild to append

* Refactor remove error message

* Refactor JS, remove console logs, update error msg

* Remove video from permitted file types

* Update error messaging

* Update docs for funciton params...oops 🙈

* Fix file size check logic

- Allow for 0 maxFileSizeMb
- Use JSON.parse() for permittedFileTypes to get an Array

* Add specs

* Change blackbox to black box

* Remove wait_for_javascript

* Remove comments from spec
2020-03-24 09:21:49 +01:00
..
_comment.html.erb Hide comment feature (#4944) 2019-12-10 15:09:47 -05:00
_comment_date.erb Show localized date/time on hover for articles/comments (#2722) 2019-05-09 11:05:17 -04:00
_comment_proper.html.erb Fixe html_safe issues from comment domain (#6422) 2020-03-03 15:38:15 -05:00
_form.html.erb Validate file uploads client-side (#6737) 2020-03-24 09:21:49 +01:00
_liquid.html.erb Fixe html_safe issues from comment domain (#6422) 2020-03-03 15:38:15 -05:00
_login_cta_comment.html.erb Fix linting issues in app/views/comments (#1853) [ci skip] 2019-02-25 13:03:31 -05:00
delete_confirm.html.erb Fixe html_safe issues from comment domain (#6422) 2020-03-03 15:38:15 -05:00
deleted_commentable_comment.html.erb Allow comments without a commentable to be edited and destroyed (#5945) 2020-02-25 13:45:50 -05:00
edit.html.erb Allow comments without a commentable to be edited and destroyed (#5945) 2020-02-25 13:45:50 -05:00
index.html.erb Fixe html_safe issues from comment domain (#6422) 2020-03-03 15:38:15 -05:00
index.json.jbuilder Initial commit 2018-02-28 16:11:08 -05:00
new.html.erb Fix linting issues in app/views/comments (#1853) [ci skip] 2019-02-25 13:03:31 -05:00
settings.html.erb Finalize UI for all types of notification settings (#3164) 2019-06-14 18:28:38 -04:00