Commit f56c49a1 authored by Nigel McNie's avatar Nigel McNie
Browse files

The resume composites were broken when editing a resume (although they were...

The resume composites were broken when editing a resume (although they were working in the views). Fixed.
parent a61813e0
......@@ -458,7 +458,7 @@ abstract class ArtefactTypeResumeComposite extends ArtefactTypeResume {
}
public function render_self($options) {
$suffix = substr(md5(microtime()), 0, 4);
$suffix = '_' . substr(md5(microtime()), 0, 4);
$smarty = smarty();
$smarty->assign('hidetitle', true);
$smarty->assign('suffix', $suffix);
......@@ -468,23 +468,23 @@ abstract class ArtefactTypeResumeComposite extends ArtefactTypeResume {
'javascript' =>
$this->get_showhide_composite_js()
."
var {$type}list_{$suffix} = new TableRenderer(
'{$type}list_{$suffix}',
var {$type}list{$suffix} = new TableRenderer(
'{$type}list{$suffix}',
'" . get_config('wwwroot') . "artefact/resume/composite.json.php',
[
" . call_static_method(generate_artefact_class_name($type), 'get_tablerenderer_js') ."
]
);
{$type}list_{$suffix}.type = '{$type}';
{$type}list_{$suffix}.statevars.push('type');
{$type}list{$suffix}.type = '{$type}';
{$type}list{$suffix}.statevars.push('type');
" .
(( array_key_exists('viewid', $options))
? "{$type}list_{$suffix}.view = " . $options['viewid'] . ";
{$type}list_{$suffix}.statevars.push('view');"
? "{$type}list{$suffix}.view = " . $options['viewid'] . ";
{$type}list{$suffix}.statevars.push('view');"
: ""
) . "
{$type}list_{$suffix}.updateOnLoad();
{$type}list{$suffix}.updateOnLoad();
");
return $content;
}
......
......@@ -3,7 +3,7 @@
{contextualhelp plugintype='artefact' pluginname='resume' section='addbook'}
{/if}
</h3>{/if}
<table id="booklist_{$suffix}" class="tablerenderer hidden resumefour">
<table id="booklist{$suffix}" class="tablerenderer hidden resumefour">
<thead>
<tr>
<th class="resumedate">{str tag='date' section='artefact.resume'}</th>
......
......@@ -3,7 +3,7 @@
{contextualhelp plugintype='artefact' pluginname='resume' section='addcertification'}
{/if}
</h3>{/if}
<table id="certificationlist_{$suffix}" class="tablerenderer hidden resumefour">
<table id="certificationlist{$suffix}" class="tablerenderer hidden resumefour">
<thead>
<tr>
<th class="resumedate">{str tag='date' section='artefact.resume'}</th>
......
......@@ -3,7 +3,7 @@
{contextualhelp plugintype='artefact' pluginname='resume' section='addeducationhistory'}
{/if}
</h3>{/if}
<table id="educationhistorylist_{$suffix}" class="tablerenderer hidden resumefive">
<table id="educationhistorylist{$suffix}" class="tablerenderer hidden resumefive">
<thead>
<tr>
<th class="resumedate">{str tag='startdate' section='artefact.resume'}</th>
......
......@@ -3,7 +3,7 @@
{contextualhelp plugintype='artefact' pluginname='resume' section='addemploymenthistory'}
{/if}
</h3>{/if}
<table id="employmenthistorylist_{$suffix}" class="tablerenderer hidden resumefive">
<table id="employmenthistorylist{$suffix}" class="tablerenderer hidden resumefive">
<thead>
<tr>
<th class="resumedate">{str tag='startdate' section='artefact.resume'}</th>
......
......@@ -3,7 +3,7 @@
{contextualhelp plugintype='artefact' pluginname='resume' section='addmembership'}
{/if}
</h3>{/if}
<table id="membershiplist_{$suffix}" class="tablerenderer hidden resumefive">
<table id="membershiplist{$suffix}" class="tablerenderer hidden resumefive">
<thead>
<tr>
<th class="resumedate">{str tag='startdate' section='artefact.resume'}</th>
......
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