Commit b8aad278 authored by Jono Mingard's avatar Jono Mingard
Browse files

Fixed labels in file browser (Bug #1259756)



Added labels to Edit and Delete buttons, Create folder input. Fixed labels
in License info not being linked to their inputs correctly.

Change-Id: I3d44845c270dbbaf9158b4e58bed6353ae412cfc
Signed-off-by: default avatarJono Mingard <jonom@catalyst.net.nz>
parent 7fcee345
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
{/if} {/if}
{$licenseform|safe} {$licenseform|safe}
<div class="uploadform"> <div class="uploadform">
<label>{if $config.simpleupload}{str tag='uploadfile' section='artefact.file'}{else}{str tag='File' section='artefact.file'}{/if}</label> <label for="{$prefix}_userfile">{if $config.simpleupload}{str tag='uploadfile' section='artefact.file'}{else}{str tag='File' section='artefact.file'}{/if}</label>
<span id="{$prefix}_userfile_container"><input type="file" class="file" id="{$prefix}_userfile" name="userfile[]" multiple size="20" /></span> <span id="{$prefix}_userfile_container"><input type="file" class="file" id="{$prefix}_userfile" name="userfile[]" multiple size="20" /></span>
<span id="{$prefix}_userfile_maxuploadsize">({str tag=maxuploadsize section=artefact.file} {$maxuploadsize})</span> <span id="{$prefix}_userfile_maxuploadsize">({str tag=maxuploadsize section=artefact.file} {$maxuploadsize})</span>
{if $config.uploadagreement}<script>setNodeAttribute('{$prefix}_userfile', 'disabled', true);</script>{/if} {if $config.uploadagreement}<script>setNodeAttribute('{$prefix}_userfile', 'disabled', true);</script>{/if}
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
{if $config.createfolder} {if $config.createfolder}
<div id="createfolder"{if $uploaddisabled} class="hidden"{/if}><div id="{$prefix}_createfolder_messages" class="createfolder-message"></div> <div id="createfolder"{if $uploaddisabled} class="hidden"{/if}><div id="{$prefix}_createfolder_messages" class="createfolder-message"></div>
<label for="{$prefix}_createfolder_name" class="accessible-hidden">{str tag=createfolder section=artefact.file}</label>
<input type="text" class="text" name="{$prefix}_createfolder_name" id="{$prefix}_createfolder_name" size="40" /> <input type="text" class="text" name="{$prefix}_createfolder_name" id="{$prefix}_createfolder_name" size="40" />
<input type="submit" class="submit" name="{$prefix}_createfolder" id="{$prefix}_createfolder" value="{str tag=createfolder section=artefact.file}" /></div> <input type="submit" class="submit" name="{$prefix}_createfolder" id="{$prefix}_createfolder" value="{str tag=createfolder section=artefact.file}" /></div>
{/if} {/if}
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
<span class="dull">{str tag=Submitted section=view}</span> <span class="dull">{str tag=Submitted section=view}</span>
{elseif !isset($file->can_edit) || $file->can_edit != 0} {elseif !isset($file->can_edit) || $file->can_edit != 0}
{if $file->artefacttype == 'archive'}<a href="{$WWWROOT}artefact/file/extract.php?file={$file->id}"><img src="{theme_url filename="images/btn_extract.png"}" alt="{str tag=Unzip section=artefact.file}"/></a>{/if} {if $file->artefacttype == 'archive'}<a href="{$WWWROOT}artefact/file/extract.php?file={$file->id}"><img src="{theme_url filename="images/btn_extract.png"}" alt="{str tag=Unzip section=artefact.file}"/></a>{/if}
<input type="image" src="{theme_url filename="images/btn_edit.png"}" name="{$prefix}_edit[{$file->id}]" value="" title="{str tag=edit}"/> <input type="image" src="{theme_url filename="images/btn_edit.png"}" name="{$prefix}_edit[{$file->id}]" value="" title="{str tag=edit}" alt="{str tag=edit}" />
<input type="image" src="{theme_url filename="images/btn_deleteremove.png"}" name="{$prefix}_delete[{$file->id}]" value="" title="{str tag=delete}"/> <input type="image" src="{theme_url filename="images/btn_deleteremove.png"}" name="{$prefix}_delete[{$file->id}]" value="" title="{str tag=delete}" alt="{str tag=delete}" />
{/if} {/if}
{/if} {/if}
{if $selectable && ($file->artefacttype != 'folder' || $selectfolders) && $publishable && !$file->isparent} {if $selectable && ($file->artefacttype != 'folder' || $selectfolders) && $publishable && !$file->isparent}
......
...@@ -241,6 +241,10 @@ function license_form_files($prefix, $prefix2=null) { ...@@ -241,6 +241,10 @@ function license_form_files($prefix, $prefix2=null) {
'id="' . $prefix . '_' . $prefix . '_', 'id="' . $prefix . '_' . $prefix . '_',
'id="' . $prefix . '_', 'id="' . $prefix . '_',
$html); $html);
$html = str_replace(
'for="' . $prefix . '_' . $prefix . '_',
'for="' . $prefix . '_',
$html);
return $html; return $html;
} }
......
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