Adding confirmation when deleting an element - career - promotion

skala
Julio Montoya 14 years ago
parent d24ca065f1
commit 3e2dfb5cac
  1. 4
      main/admin/career_dashboard.php
  2. 2
      main/admin/careers.php
  3. 2
      main/admin/promotions.php

@ -74,6 +74,7 @@ foreach($career_array as $career_id => $data) {
$career = $data['name'];
$promotions = $data['promotions'];
$career = Display::url($career,'careers.php?action=edit&id='.$career_id);
$career = Display::tag('h3',$career);
echo '<tr><td style="background-color:#eee" colspan="3">'.$career.'</td></tr>';
foreach($promotions as $promotion_id => $promotion) {
$promotion_name = $promotion['name'];
@ -87,7 +88,8 @@ foreach($career_array as $career_id => $data) {
$rowspan = 'rowspan="'.$count.'"';
}
echo '<td '.$rowspan.'>';
echo $promotion_url;
//echo $promotion_url;
echo Display::tag('h4',$promotion_url);
echo '</td>';
echo '</tr>';

@ -60,7 +60,7 @@ $extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
return \'<a href="?action=edit&id=\'+options.rowId+\'"><img src="../img/edit.gif" title="'.get_lang('Edit').'"></a> <a href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/delete.gif"></a>\';
return \'<a href="?action=edit&id=\'+options.rowId+\'"><img src="../img/edit.gif" title="'.get_lang('Edit').'"></a> <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/delete.gif"></a>\';
}';
?>
<script>

@ -56,7 +56,7 @@ $extra_params['autowidth'] = 'true'; //use the width of the parent
$extra_params['height'] = 'auto'; //use the width of the parent
//With this function we can add actions to the jgrid
$action_links = 'function action_formatter (cellvalue, options, rowObject) {
return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'"><img title="'.get_lang('AddSession').'" src="../img/addd.gif"></a> <a href="?action=edit&id=\'+options.rowId+\'"><img src="../img/edit.gif" title="'.get_lang('Edit').'"></a> <a href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/delete.gif"></a>\';
return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'"><img title="'.get_lang('AddSession').'" src="../img/addd.gif"></a> <a href="?action=edit&id=\'+options.rowId+\'"><img src="../img/edit.gif" title="'.get_lang('Edit').'"></a> <a <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'"><img title="'.get_lang('Delete').'" src="../img/delete.gif"></a>\';
}';
?>

Loading…
Cancel
Save