Commit 68707829 authored by Penny Leach's avatar Penny Leach
Browse files

resume: fixing [#565] - a js confirm before leaving resume to go to

profile
parent 8aae2a96
......@@ -290,6 +290,7 @@ $smarty = smarty(array(), array(), array(
$smarty->assign('profileform', $profileform);
$smarty->assign('resumeinstalled', record_exists('artefact_installed', 'name', 'resume'));
$smarty->display('artefact:internal:index.tpl');
?>
......@@ -4,6 +4,9 @@
{include file="columnleftstart.tpl"}
<div class="fr leftrightlink"><a href="profileicons.php" id="editprofileicons">{str tag="editprofileicons" section="artefact.internal"} &raquo;</a></div>
{if $resumeinstalled}
<div class="fr leftrightlink"><a href="{$WWWROOT}artefact/resume/" id="profilegotoresume">{str tag="profilegotoresume" section="artefact.resume"} &raquo;</a></div>
{/if}
<div style="position: relative;">
<div style="position: absolute; top: 3.5em; right: 0;"><img src="{$WWWROOT}thumb.php?type=profileicon&size=100x100&id={$USER->get('id')}" alt=""></div>
</div>
......
......@@ -171,6 +171,9 @@ $addstr = get_string('add');
$editstr = get_string('edit');
$delstr = get_string('delete');
$confirmdelstr = get_string('compositedeleteconfirm', 'artefact.resume');
$confirmeditprofilestr = get_string('confirmeditprofile', 'artefact.resume');
$wwwroot = get_config('wwwroot');
$mainform = pieform($form);
$smarty = smarty(array('tablerenderer'));
......@@ -215,6 +218,13 @@ function deleteComposite(type, id, artefact) {
return false;
}
function editprofilebutton() {
if (confirm('{$confirmeditprofilestr}')) {
document.location='{$wwwroot}artefact/internal';
}
return false;
}
EOF;
$compositeforms = array();
foreach (ArtefactTypeResumeComposite::get_composite_artefact_types() as $compositetype) {
......
......@@ -75,4 +75,6 @@ $string['academicskill'] = 'Academic Skills';
$string['workskill'] = 'Work Skills';
$string['goalandskillsaved'] = 'Saved successfully';
$string['resume'] = 'Résumé';
$string['confirmeditprofile'] = 'If you continue to edit your profile now, you will lose any unsaved information in this area';
$string['profilegotoresume'] = 'Edit My Résumé';
?>
......@@ -32,6 +32,6 @@
<td>{$mobilenumber}</td>
</tr>
<tr>
<td colspan="2"> <button onClick="document.location='{$WWWROOT}/artefact/internal/';">{str tag='editprofile' section='artefact.internal'}</button></td>
<td colspan="2"> <button onClick="return editprofilebutton();">{str tag='editprofile' section='artefact.internal'}</button></td>
</tr>
</table>
......@@ -945,6 +945,14 @@ table#installer {
font-weight: bold;
padding: 5px 20px 6px 45px;
}
.maincontent #profilegotoresume {
background: url(../images/btn_editprofileicons.gif) no-repeat;
width: 170px;
height: 24px;
color: #eef7d4;
font-weight: bold;
padding: 5px 20px 6px 35px;
}
.maincontent #backtoeditprofile {
background: url(../images/btn_editprofileicons.gif) no-repeat;
width: 170px;
......
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