Add toolbars with Back button - refs BT#14028

pull/2458/head
Angel Fernando Quiroz Campos 8 years ago
parent 8847c8b7d2
commit ec9998d5f0
  1. 22
      main/glossary/index.php
  2. 38
      main/notebook/index.php

@ -98,7 +98,16 @@ switch ($action) {
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);
$content = $form->returnForm();
$content = Display::toolbarAction(
'add_glossary',
[
Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
api_get_self().'?'.api_get_cidreq()
)
]
);
$content .= $form->returnForm();
}
break;
case 'edit_glossary':
@ -176,7 +185,16 @@ switch ($action) {
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);
$content = $form->returnForm();
$content = Display::toolbarAction(
'edit_glossary',
[
Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
api_get_self().'?'.api_get_cidreq()
)
]
);
$content .= $form->returnForm();
}
}
break;

@ -107,16 +107,15 @@ if ($action === 'addnote') {
Security::clear_token();
NotebookManager::display_notes();
} else {
echo '<div class="actions">';
echo '<a href="index.php">'.
Display::return_icon(
'back.png',
get_lang('BackToNotesList'),
'',
ICON_SIZE_MEDIUM
).
'</a>';
echo '</div>';
echo Display::toolbarAction(
'add_glossary',
[
Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
api_get_self().'?'.api_get_cidreq()
)
]
);
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);
@ -171,16 +170,15 @@ if ($action === 'addnote') {
Security::clear_token();
NotebookManager::display_notes();
} else {
echo '<div class="actions">';
echo '<a href="index.php">'.
Display::return_icon(
'back.png',
get_lang('BackToNotesList'),
'',
ICON_SIZE_MEDIUM
).
'</a>';
echo '</div>';
echo Display::toolbarAction(
'add_glossary',
[
Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
api_get_self().'?'.api_get_cidreq()
)
]
);
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);

Loading…
Cancel
Save