diff --git a/main/admin/careers.php b/main/admin/careers.php index 21de5b030d..9f012172c1 100644 --- a/main/admin/careers.php +++ b/main/admin/careers.php @@ -24,22 +24,21 @@ $htmlHeadXtra[] = api_get_jquery_ui_js(true); // setting breadcrumbs $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); $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. 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 $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_careers'; diff --git a/main/admin/promotions.php b/main/admin/promotions.php index d966eecf9a..aa8019ea13 100644 --- a/main/admin/promotions.php +++ b/main/admin/promotions.php @@ -23,7 +23,18 @@ $htmlHeadXtra[] = api_get_jquery_ui_js(true); // setting breadcrumbs $interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); $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. Display::display_header($tool_name); diff --git a/main/admin/usergroups.php b/main/admin/usergroups.php index aabcbbea18..b1d3161826 100644 --- a/main/admin/usergroups.php +++ b/main/admin/usergroups.php @@ -22,7 +22,16 @@ api_protect_admin_script(); $htmlHeadXtra[] = api_get_jquery_ui_js(true); // setting breadcrumbs $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. 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'])); // Settting the form elements $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->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"'); // Setting the rules @@ -130,8 +139,8 @@ elseif (isset($_GET['action']) && $_GET['action'] == 'edit' && is_numeric($_GET[ // Settting the form elements $form->addElement('header', '', get_lang('Modify')); $form->addElement('hidden', 'id',intval($_GET['id'])); - $form->addElement('text', 'name', get_lang('Name'), array('size' => '100')); - $form->addElement('html_editor', 'description', get_lang('description'), null); + $form->addElement('text', 'name', get_lang('Name'), array('size' => '70')); + $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"'); // Setting the defaults diff --git a/main/inc/lib/career.lib.php b/main/inc/lib/career.lib.php index 74f5f1b830..6a01273cea 100644 --- a/main/inc/lib/career.lib.php +++ b/main/inc/lib/career.lib.php @@ -79,9 +79,8 @@ class Career extends Model { $form->addElement('header', '', $header); $form->addElement('hidden', 'id',intval($_GET['id'])); - $form->addElement('text', 'name', get_lang('Name'), array('size' => '100')); - $form->addElement('html_editor', 'description', get_lang('description'), null); - + $form->addElement('text', 'name', get_lang('Name'), array('size' => '70')); + $form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250')); $status_list = $this->get_status_list(); $form->addElement('select', 'status', get_lang('Status'), $status_list); if ($action == 'edit') { diff --git a/main/inc/lib/promotion.lib.php b/main/inc/lib/promotion.lib.php index 1c5a79468e..622d89a787 100644 --- a/main/inc/lib/promotion.lib.php +++ b/main/inc/lib/promotion.lib.php @@ -81,9 +81,8 @@ class Promotion extends Model { } $form->addElement('header', '', $header); $form->addElement('hidden', 'id', intval($_GET['id'])); - $form->addElement('text', 'name', get_lang('Name'), array('size' => '100','id' => 'name')); - $form->addElement('html_editor', 'description', get_lang('Description'), true, array('ToolbarSet'=>'Forum','Height'=>'150')); - + $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')); $career = new Career(); $careers = $career->get_all(); $career_list = array();