Feature #2479 fix fckeditor in promotions

skala
Juan Carlos Raña 14 years ago
parent 6ef67b2d0b
commit 904cd48a0d
  1. 6
      main/admin/careers.php
  2. 8
      main/admin/promotions.php
  3. 3
      main/img/icons/48/_sum.txt
  4. 13
      main/inc/lib/promotion.lib.php

@ -59,9 +59,9 @@ $extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc) //With this function we can add actions to the jgrid (edit, delete, etc)
$action_links = 'function action_formatter(cellvalue, options, rowObject) { $action_links = 'function action_formatter(cellvalue, options, rowObject) {
return \'<a href="?action=edit&id=\'+options.rowId+\'"><img width="20px" src="../img/edit.png" title="'.get_lang('Edit').'"></a> '. return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',22).'</a>'.
'<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=copy&id=\'+options.rowId+\'"><img title="'.get_lang('Copy').'" src="../img/copy.gif"></a>'. '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',22).'</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.png"></a>'. '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',22).'</a>'.
'\'; '\';
}'; }';
?> ?>

@ -63,10 +63,10 @@ $extra_params['autowidth'] = 'true'; //use the width of the parent
$extra_params['height'] = 'auto'; //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 //With this function we can add actions to the jgrid
$action_links = 'function action_formatter (cellvalue, options, rowObject) { $action_links = 'function action_formatter (cellvalue, options, rowObject) {
return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'"><img title="'.get_lang('SubscribeSessionsToPromotions').'" width="22px" src="../img/icons/22/session_to_promotion.png"></a> '. return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'">'.Display::return_icon('session_to_promotion.png',get_lang('SubscribeSessionsToPromotions'),'',22).'</a>'.
'<a href="?action=edit&id=\'+options.rowId+\'"><img width="20px" src="../img/edit.png" title="'.get_lang('Edit').'"></a> '. '&nbsp;<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',22).'</a>'.
'<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=copy&id=\'+options.rowId+\'"><img title="'.get_lang('Copy').'" src="../img/copy.gif" alt="'.get_lang('Copy').'"></a> '. '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',22).'</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.png"></a> \'; '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',22).'</a> \';
}'; }';
?> ?>

@ -283,4 +283,5 @@ wiki_assignment modif nuvola
star crystal star crystal
star_green modif crystal star_green modif crystal
menu nuvola menu nuvola
starthere (=info.png 64 px) crystal starthere (=info.png 64 px) crystal
copy crystal

@ -9,6 +9,7 @@
require_once 'model.lib.php'; require_once 'model.lib.php';
require_once 'career.lib.php'; require_once 'career.lib.php';
require_once 'fckeditor/fckeditor.php';
define ('PROMOTION_STATUS_ACTIVE', 1); define ('PROMOTION_STATUS_ACTIVE', 1);
define ('PROMOTION_STATUS_INACTIVE',0); define ('PROMOTION_STATUS_INACTIVE',0);
@ -74,7 +75,15 @@ class Promotion extends Model {
*/ */
function return_form($url, $action = 'add') { function return_form($url, $action = 'add') {
$form = new FormValidator('promotion', 'post', $url);
$oFCKeditor = new FCKeditor('description') ;
$oFCKeditor->ToolbarSet = 'careers';
$oFCKeditor->Width = '100%';
$oFCKeditor->Height = '200';
$oFCKeditor->Value = $message;
$oFCKeditor->CreateHtml();
$form = new FormValidator('promotion', 'post', $url);
// Settting the form elements // Settting the form elements
$header = get_lang('Add'); $header = get_lang('Add');
if ($action == 'edit') { if ($action == 'edit') {
@ -83,7 +92,7 @@ class Promotion extends Model {
$form->addElement('header', '', $header); $form->addElement('header', '', $header);
$form->addElement('hidden', 'id', intval($_GET['id'])); $form->addElement('hidden', 'id', intval($_GET['id']));
$form->addElement('text', 'name', get_lang('Name'), array('size' => '70','id' => 'name')); $form->addElement('text', 'name', get_lang('Name'), array('size' => '70','id' => 'name'));
$form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250')); $form->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'careers','Width' => '100%', 'Height' => '250'));
$career = new Career(); $career = new Career();
$careers = $career->get_all(); $careers = $career->get_all();
$career_list = array(); $career_list = array();

Loading…
Cancel
Save