Commit b8c24d79 authored by Dimiter's avatar Dimiter Committed by chr.fritsch

Issue #2696853 by Dimiter: Media upload box problems

parent 110304b6
......@@ -19,6 +19,22 @@
background-size: cover;
}
.dropzone .dz-preview.dz-file-preview .dz-image, .dropzone .dz-preview .dz-image {
.dropzone .dz-preview.dz-file-preview .dz-image,
.dropzone .dz-preview .dz-image {
border-radius: 0;
}
\ No newline at end of file
}
.dropzone {
margin: .5em;
background: #f5f5f2;
border: 3px dashed hsla(0, 0%, 42%, 0.65);
border-radius: 5px;
}
.dropzone.dz-drag-hover {
border: dashed #40b6ff;
}
.dropzone.dz-started {
padding: 16px;
}
......@@ -54,6 +54,9 @@ function template_preprocess_dropzonejs(&$variables) {
$variables['attributes']['class'] = (array) $element['#attributes']['class'];
}
$variables['dropzone_description'] = $element['#dropzone_description'];
$variables['or_text'] = t('or');
$variables['select_files_button_text'] = t('Select files');
$variables['uploaded_files'] = $element['uploaded_files'];
}
......
......@@ -5,12 +5,23 @@
*
* Available variables:
* - attributes: A list of HTML attributes for the element.
* - dropzone_description: A message to be displayed in the dropzone field.
* - or_text: A translatable string of the word 'or'.
* - select_files_button_text: The text shown on the 'Select files' button.
* - children: Optional additional rendered elements.
* - uploaded_files: Hidden element that holds uploaded files.
*
* @see template_preprocess_dropzonejs()
*/
#}
<div{{ attributes }}></div>
<div{{ attributes }}>
<div class="dz-message">
<p>{{ dropzone_description }}</p>
<p>{{ or_text }}</p>
<a href="#" onclick="event.preventDefault();"
class="button">{{ select_files_button_text }}</a>
</div>
</div>
{{ uploaded_files }}
{{ children }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment