Commit 49798838 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon

Bug 1794724: Make input capture default to implementation-specific state

The specification for this attribute has been
changing and is not using the 'camera' value anymore

1. Have the same response in both the image button
in the tinymce editor (text block) and the image block
when selecting the image to upload.
2. Dont assign a value to capture attribute since
'The missing value default is the implementation-specific state'

behatnotneeded
Change-Id: Ib0a6203d6cee1b05968558c2142b7f6d10ffaae1
parent 33f5ef39
......@@ -214,6 +214,7 @@ function pieform_element_filebrowser(Pieform $form, $element) {
$smarty->assign('folderparams', $params);
// Add mobile media-capture form tags when users are on mobile or tablet
if ($SESSION->get('mobile') || $SESSION->get('tablet')) {
$supportedmediatypes = array('image/*');
......@@ -223,7 +224,7 @@ function pieform_element_filebrowser(Pieform $form, $element) {
if (in_array($type, $supportedmediatypes)) {
switch ($type) {
case 'image/*':
$smarty->assign('capturedevice', 'camera');
$smarty->assign('capturedevice', true);
break;
}
}
......
......@@ -312,6 +312,7 @@ class ImageBrowser {
'filters' => array(
'artefacttype' => array('image', 'profileicon'),
),
'accept' => 'image/*',
);
return $element;
}
......
......@@ -100,7 +100,7 @@
</label>
<span id="{$prefix}_userfile_container">
<input type="file" class="file" {$accepts|safe} {if $capturedevice} capture="{$capturedevice}"{/if} id="{$prefix}_userfile" name="userfile[]" multiple />
<input type="file" class="file" {$accepts|safe} {if $capturedevice} capture{/if} id="{$prefix}_userfile" name="userfile[]" multiple />
</span>
<span id="{$prefix}_userfile_maxuploadsize" class="file-description">
......
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