Commit ef291048 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Replace missing help for blogpost attachments

parent a33ba34a
<h3>Browse My Files</h3> <h3>Attach Files</h3>
<p>If you wish to attach a file currently stored within your files area to your Blog posting, you can Browse your repository for the required file(s)</p> <p>If you wish to attach a file currently stored within your files area to your Blog posting, you can Browse your repository for the required file(s)</p>
<p>Navigate through your file folder structures and Attach the required file(s). The &#8216;blogfiles&#8217; folder contains those files already attached to Blog postings.</p> <p>Navigate through your file folder structures and Select the required file(s).</p>
<p>You can also upload new files from your computer. They will be placed in your files area and attached to your post at the same time.</p>
...@@ -128,6 +128,7 @@ $form = pieform(array( ...@@ -128,6 +128,7 @@ $form = pieform(array(
'highlight' => $highlight, 'highlight' => $highlight,
'browse' => $browse, 'browse' => $browse,
'page' => get_config('wwwroot') . 'artefact/blog/post.php?' . ($blogpost ? ('id=' . $blogpost) : ('blog=' . $blog)) . '&browse=1', 'page' => get_config('wwwroot') . 'artefact/blog/post.php?' . ($blogpost ? ('id=' . $blogpost) : ('blog=' . $blog)) . '&browse=1',
'browsehelp' => 'browsemyfiles',
'config' => array( 'config' => array(
'upload' => true, 'upload' => true,
'uploadagreement' => get_config_plugin('artefact', 'file', 'uploadagreement'), 'uploadagreement' => get_config_plugin('artefact', 'file', 'uploadagreement'),
......
...@@ -55,7 +55,6 @@ function pieform_element_filebrowser(Pieform $form, $element) { ...@@ -55,7 +55,6 @@ function pieform_element_filebrowser(Pieform $form, $element) {
$smarty->assign('browse', (int) $element['browse']); $smarty->assign('browse', (int) $element['browse']);
} }
$config = array_map('intval', $element['config']); $config = array_map('intval', $element['config']);
$smarty->assign('config', $config);
if ($config['select']) { if ($config['select']) {
$selected = $element['selectlistcallback'](); $selected = $element['selectlistcallback']();
$smarty->assign('selectedlist', $selected); $smarty->assign('selectedlist', $selected);
...@@ -69,6 +68,13 @@ function pieform_element_filebrowser(Pieform $form, $element) { ...@@ -69,6 +68,13 @@ function pieform_element_filebrowser(Pieform $form, $element) {
$smarty->assign('agreementtext', get_string('uploadcopyrightdefaultcontent', 'install')); $smarty->assign('agreementtext', get_string('uploadcopyrightdefaultcontent', 'install'));
} }
} }
if ($element['browsehelp']) {
$config['plugintype'] = $form->get_property('plugintype');
$config['pluginname'] = $form->get_property('pluginname');
$config['browsehelp'] = $element['browsehelp'];
}
$smarty->assign('config', $config);
$filedata = ArtefactTypeFileBase::get_my_files_data($folder, $userid, $group, $institution); $filedata = ArtefactTypeFileBase::get_my_files_data($folder, $userid, $group, $institution);
$smarty->assign('filelist', $filedata); $smarty->assign('filelist', $filedata);
......
...@@ -332,13 +332,13 @@ function FileBrowser(idprefix, folderid, config, globalconfig) { ...@@ -332,13 +332,13 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
connect(self.id + '_open_upload_browse', 'onclick', function (e) { connect(self.id + '_open_upload_browse', 'onclick', function (e) {
e.stop(); e.stop();
removeElementClass(self.id + '_upload_browse', 'hidden'); removeElementClass(self.id + '_upload_browse', 'hidden');
addElementClass(this, 'hidden'); addElementClass(self.id + '_open_upload_browse_container', 'hidden');
return false; return false;
}); });
connect(self.id + '_close_upload_browse', 'onclick', function (e) { connect(self.id + '_close_upload_browse', 'onclick', function (e) {
e.stop(); e.stop();
addElementClass(self.id + '_upload_browse', 'hidden'); addElementClass(self.id + '_upload_browse', 'hidden');
removeElementClass(self.id + '_open_upload_browse', 'hidden'); removeElementClass(self.id + '_open_upload_browse_container', 'hidden');
return false; return false;
}); });
forEach(getElementsByTagAndClassName('button', 'unselect', self.id + '_selectlist'), function (elem) { forEach(getElementsByTagAndClassName('button', 'unselect', self.id + '_selectlist'), function (elem) {
......
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
<input type="hidden" name="{$prefix}_foldername" id="{$prefix}_foldername" value="{$foldername}" /> <input type="hidden" name="{$prefix}_foldername" id="{$prefix}_foldername" value="{$foldername}" />
{if $config.select && !$browse} {if $config.select && !$browse}
<input type="submit" class="buttondk" id="{$prefix}_open_upload_browse" name="browse" value="{if $config.selectone}{str tag=selectafile section=artefact.file}{else}{str tag=addafile section=artefact.file}{/if}" /> <div id="{$prefix}_open_upload_browse_container">
<input type="submit" class="buttondk" id="{$prefix}_open_upload_browse" name="browse" value="{if $config.selectone}{str tag=selectafile section=artefact.file}{else}{str tag=addafile section=artefact.file}{/if}" />{if $config.browsehelp}{contextualhelp plugintype=$config.plugintype pluginname=$config.pluginname section=$config.browsehelp}{/if}
</div>
{/if} {/if}
<div id="{$prefix}_upload_browse" class="upload_browse{if $config.select} select{if !$browse} hidden{/if}{/if}"> <div id="{$prefix}_upload_browse" class="upload_browse{if $config.select} select{if !$browse} hidden{/if}{/if}">
......
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