function showEditForm(id, title, image_url) {
$("input[name='quality_mark_id']").attr("value", id);
$("input[name='quality_mark_title']").attr("value", title);
$("#img_area").html("");
$("#edit_area").attr("style", "display:''");
};
function showAddForm() {
$("input[name='quality_mark_id']").attr("value", "");
$("input[name='quality_mark_title']").attr("value", "");
$("#img_area").html("");
$("#edit_area").attr("style", "display:''");
};
function cancel() {
$("#edit_area").attr("style", "display:none");
$("input[name='quality_mark_id']").attr("value", "");
$("input[name='quality_mark_title']").attr("value", "");
$("#img_area").html("");
};
EOT;
// added quality marks
/*translation:Quality marks*/
$quality_marks_text = "". elgg_echo("koolielu:quality_marks") ."
";
$quality_marks = get_data("SELECT * FROM {$CONFIG->dbprefix}koolielu_quality_marks;");
foreach ($quality_marks as $quality_mark) {
$qid = $quality_mark->ID;
$qtitle = $quality_mark->title;
$qimage_url = getImageFileURL($quality_mark->image, $quality_mark->user_guid, false);
$quality_marks_text .= "";
$quality_marks_text .= $qtitle;
/*translation:Edit*/
$quality_marks_text .= " ". elgg_echo('koolielu:edit') ." ";
$quality_marks_text .= elgg_view("output/confirmlink", array(
'href' => $CONFIG->wwwroot . "action/koolielu/delete_quality_mark?quality_mark=" . $qid,
'text' => elgg_echo('delete'),
'confirm' => elgg_echo('deleteconfirm'),
));
$quality_marks_text .= "
";
}
$bodytext .= $jscript;
$bodytext .= $quality_marks_text;
/*translation:Add new quality mark*/
$bodytext .= "