Fixing breadcrumbs and html_editors see BT#2020

skala
Julio Montoya 15 years ago
parent bfdb86bc23
commit f50dcc6390
  1. 21
      main/admin/careers.php
  2. 13
      main/admin/promotions.php
  3. 19
      main/admin/usergroups.php
  4. 5
      main/inc/lib/career.lib.php
  5. 5
      main/inc/lib/promotion.lib.php

@ -24,22 +24,21 @@ $htmlHeadXtra[] = api_get_jquery_ui_js(true);
// setting breadcrumbs // setting breadcrumbs
$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions')); $interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions'));
$interbreadcrumb[]=array('url' => 'careers.php','name' => get_lang('Careers')); $action = $_GET['action'];
if ($action == 'add') {
$interbreadcrumb[]=array('url' => 'careers.php','name' => get_lang('Careers'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Add'));
} elseif ($action == 'edit') {
$interbreadcrumb[]=array('url' => 'careers.php','name' => get_lang('Careers'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit'));
} else {
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Careers'));
}
// The header. // The header.
Display::display_header($tool_name); Display::display_header($tool_name);
// Tool name
if (isset($_GET['action']) && $_GET['action'] == 'add') {
$tool = 'Add';
$interbreadcrumb[] = array ('url' => api_get_self(), 'name' => get_lang('Career'));
}
if (isset($_GET['action']) && $_GET['action'] == 'editnote') {
$tool = 'Modify';
$interbreadcrumb[] = array ('url' => api_get_self(), 'name' => get_lang('Career'));
}
//jqgrid will use this URL to do the selects //jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_careers'; $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_careers';

@ -23,7 +23,18 @@ $htmlHeadXtra[] = api_get_jquery_ui_js(true);
// setting breadcrumbs // setting breadcrumbs
$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions')); $interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions'));
$interbreadcrumb[]=array('url' => 'promotions.php','name' => get_lang('Promotions'));
$action = $_GET['action'];
if ($action == 'add') {
$interbreadcrumb[]=array('url' => 'promotions.php','name' => get_lang('Promotions'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Add'));
} elseif ($action == 'edit') {
$interbreadcrumb[]=array('url' => 'promotions.php','name' => get_lang('Promotions'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit'));
} else {
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Promotions'));
}
// The header. // The header.
Display::display_header($tool_name); Display::display_header($tool_name);

@ -22,7 +22,16 @@ api_protect_admin_script();
$htmlHeadXtra[] = api_get_jquery_ui_js(true); $htmlHeadXtra[] = api_get_jquery_ui_js(true);
// setting breadcrumbs // setting breadcrumbs
$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Groups')); $action = $_GET['action'];
if ($action == 'add') {
$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Groups'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Add'));
} elseif ($action == 'edit') {
$interbreadcrumb[]=array('url' => 'usergroups.php','name' => get_lang('Groups'));
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit'));
} else {
$interbreadcrumb[]=array('url' => '#','name' => get_lang('Groups'));
}
// The header. // The header.
Display::display_header($tool_name); Display::display_header($tool_name);
@ -94,9 +103,9 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$form = new FormValidator('note', 'post', api_get_self().'?action='.Security::remove_XSS($_GET['action'])); $form = new FormValidator('note', 'post', api_get_self().'?action='.Security::remove_XSS($_GET['action']));
// Settting the form elements // Settting the form elements
$form->addElement('header', '', get_lang('Add')); $form->addElement('header', '', get_lang('Add'));
$form->addElement('text', 'name', get_lang('name'), array('size' => '95', 'id' => 'name')); $form->addElement('text', 'name', get_lang('name'), array('size' => '70', 'id' => 'name'));
//$form->applyFilter('note_title', 'html_filter'); //$form->applyFilter('note_title', 'html_filter');
$form->addElement('html_editor', 'description', get_lang('Description'), null); $form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250'));
$form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="add"'); $form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="add"');
// Setting the rules // Setting the rules
@ -130,8 +139,8 @@ elseif (isset($_GET['action']) && $_GET['action'] == 'edit' && is_numeric($_GET[
// Settting the form elements // Settting the form elements
$form->addElement('header', '', get_lang('Modify')); $form->addElement('header', '', get_lang('Modify'));
$form->addElement('hidden', 'id',intval($_GET['id'])); $form->addElement('hidden', 'id',intval($_GET['id']));
$form->addElement('text', 'name', get_lang('Name'), array('size' => '100')); $form->addElement('text', 'name', get_lang('Name'), array('size' => '70'));
$form->addElement('html_editor', 'description', get_lang('description'), null); $form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250'));
$form->addElement('style_submit_button', 'submit', get_lang('Modify'), 'class="save"'); $form->addElement('style_submit_button', 'submit', get_lang('Modify'), 'class="save"');
// Setting the defaults // Setting the defaults

@ -79,9 +79,8 @@ class Career 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' => '100')); $form->addElement('text', 'name', get_lang('Name'), array('size' => '70'));
$form->addElement('html_editor', 'description', get_lang('description'), null); $form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250'));
$status_list = $this->get_status_list(); $status_list = $this->get_status_list();
$form->addElement('select', 'status', get_lang('Status'), $status_list); $form->addElement('select', 'status', get_lang('Status'), $status_list);
if ($action == 'edit') { if ($action == 'edit') {

@ -81,9 +81,8 @@ 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' => '100','id' => 'name')); $form->addElement('text', 'name', get_lang('Name'), array('size' => '70','id' => 'name'));
$form->addElement('html_editor', 'description', get_lang('Description'), true, array('ToolbarSet'=>'Forum','Height'=>'150')); $form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', '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