Fix linting issues in app/views/videos (#1907) [ci skip]

This commit is contained in:
Glenn Carremans 2019-03-01 18:11:51 +01:00 committed by Mac Siri
parent 58f68b6602
commit e56cc57d8f
2 changed files with 23 additions and 17 deletions

View file

@ -7,6 +7,13 @@ linters:
SpaceInHtmlTag:
exclude:
- '**/app/views/pages/_editor_guide_text.html.erb'
AllowedScriptType:
enabled: true
allowed_types:
- 'text/javascript'
- 'text/x-tmpl'
allow_blank: true
disallow_inline_scripts: false
Rubocop:
enabled: true
rubocop_config:

View file

@ -1,27 +1,26 @@
<style>
form.upload-form{
background:#fdf9f3;
form.upload-form {
background: #fdf9f3;
max-width: 590px;
margin:20px auto;
margin: 20px auto;
padding: 40px 10px;
border: 2px solid #4e57ef;
box-shadow: 4px 5px 0px #4e57ef;
}
</style>
<center style="margin-top:200px">
<%= stylesheet_link_tag 's3_direct_upload', media: 'all' %>
<%= stylesheet_link_tag "s3_direct_upload", media: "all" %>
<h1>🎥 Upload Video File 🙌</h1>
<%= s3_uploader_form callback_url: "/videos",
callback_method: "POST",
callback_param: "article[video]",
key: "video-upload__#{SecureRandom.hex}",
key_starts_with: "video-upload__",
acl: "public-read",
max_file_size: (current_user.has_role?(:super_admin) ? 20000 : 6000).megabytes,
id: "s3-uploader",
class: "upload-form",
data: {:key => :val} do %>
callback_method: "POST",
callback_param: "article[video]",
key: "video-upload__#{SecureRandom.hex}",
key_starts_with: "video-upload__",
acl: "public-read",
max_file_size: (current_user.has_role?(:super_admin) ? 20000 : 6000).megabytes,
id: "s3-uploader",
class: "upload-form",
data: { key: :val } do %>
<%= file_field_tag :file %>
<script id="template-upload" type="text/x-tmpl">
<div id="file-{%=o.unique_id%}" class="upload">
@ -38,11 +37,11 @@
</div>
</center>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<%= javascript_include_tag 's3_direct_upload' %>
<%= javascript_include_tag "s3_direct_upload" %>
<script>
setTimeout(function(){
setTimeout(function () {
$("#s3-uploader").S3Uploader({
additional_data: {authenticity_token:"<%= form_authenticity_token %>"}
additional_data: {authenticity_token: "<%= form_authenticity_token %>"}
})
}, 1000)
</script>