Commit af34a768 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

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'

Change-Id: Ib0a6203d6cee1b05968558c2142b7f6d10ffaae1
(cherry picked from commit 49798838)
parent cec8761d
......@@ -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);
......@@ -312,6 +312,7 @@ class ImageBrowser {
'filters' => array(
'artefacttype' => array('image', 'profileicon'),
'accept' => 'image/*',
return $element;
......@@ -100,7 +100,7 @@
<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 id="{$prefix}_userfile_maxuploadsize" class="file-description">
Supports Markdown
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