define(AT_INCLUDE_PATH, '../../../include/');
include(AT_INCLUDE_PATH.'vitals.inc.php');
+admin_authenticate(AT_ADMIN_PRIV_JOB_BOARD);
+
include(AT_JB_INCLUDE.'classes/Job.class.php');
require(AT_INCLUDE_PATH.'lib/tinymce.inc.php');
$_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet
-
-admin_authenticate(AT_ADMIN_PRIV_JOB_BOARD);
+$_custom_head .= '
+ <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-layout.css" />
+ <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-text.css" />
+ <script type="text/javascript" src="'.$_base_path.'mods/job_board/include/js/edit.js"></script>
+ ';
/*
* Add the submenu on this page so that user can go back to the listing.
include(AT_JB_INCLUDE.'classes/Employer.class.php');
require(AT_INCLUDE_PATH.'lib/tinymce.inc.php');
$_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet
+$_custom_head .= '
+ <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-layout.css" />
+ <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-text.css" />
+ <script type="text/javascript" src="'.$_base_path.'mods/job_board/include/js/edit.js"></script>
+ ';
if (!Employer::authenticate()){
$msg->addError('ACCESS_DENIED');
include(AT_JB_INCLUDE.'classes/Employer.class.php');
require(AT_INCLUDE_PATH.'lib/tinymce.inc.php');
$_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet
+$_custom_head .= '
+ <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-layout.css" />
+ <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-text.css" />
+ <script type="text/javascript" src="'.$_base_path.'mods/job_board/include/js/edit.js"></script>
+ ';
if (!Employer::authenticate()){
$msg->addError('ACCESS_DENIED');
-<?php
-if (($_POST['setvisual'] && !$_POST['settext']) || $_GET['setvisual']) {
- load_editor();
+<?php
+$simple = true;
+if ($_POST['complexeditor'] == '1') {
+ $simple = false;
}
+load_editor($simple, false, "none");
?>
<div class="input-form">
<form action="" method="post" name="form">
?>
</div>
<div class="row">
- <?php echo _AT('formatting'); ?><br />
- <input type="radio" name="formatting" value="0" id="text" <?php if ($_POST['formatting'] == 0) { echo 'checked="checked"'; } ?> onclick="javascript: document.form.setvisual.disabled=true;" <?php if ($_POST['setvisual'] && !$_POST['settext']) { echo 'disabled="disabled"'; } ?> />
+ <span class="nowrap">
+ <label for="formatting_radios"><span class="required" title="<?php echo _AT('required_field'); ?>">*</span><?php echo _AT('formatting'); ?></label>
+ <span id="formatting_radios">
+ <input type="radio" name="formatting" value="0" id="text" <?php if ($_POST['formatting'] == 0) { echo 'checked="checked"'; } ?> />
+ <label for="text"><?php echo _AT('plain_text'); ?></label>
- <label for="text"><?php echo _AT('plain_text'); ?></label>
- <input type="radio" name="formatting" value="1" id="html" <?php if ($_POST['formatting'] == 1 || $_POST['setvisual']) { echo 'checked="checked"'; } ?> onclick="javascript: document.form.setvisual.disabled=false;"/>
-
- <label for="html"><?php echo _AT('html'); ?></label>
- <?php //Button for enabling/disabling visual editor
- if (($_POST['setvisual'] && !$_POST['settext']) || $_GET['setvisual']){
- echo '<input type="hidden" name="setvisual" value="'.$_POST['setvisual'].'" />';
- echo '<input type="submit" name="settext" value="'._AT('switch_text').'" class="button"/>';
- } else {
- echo '<input type="submit" name="setvisual" value="'._AT('switch_visual').'" ';
- if ($_POST['formatting']==0) { echo 'disabled="disabled"'; }
- echo ' class="button" />';
- }
- ?>
+ <input type="radio" name="formatting" value="1" id="html" <?php if ($_POST['formatting'] == 1) { echo 'checked="checked"'; } ?> />
+ <label for="html"><?php echo _AT('html'); ?></label>
+ </span>
+ </span>
</div>
<div class="row">
<span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="jb_description"><?php echo _AT('jb_post_description'); ?></label><br />
<?php
-if (($_POST['setvisual'] && !$_POST['settext']) || $_GET['setvisual']) {
- load_editor();
+$simple = true;
+if ($_POST['complexeditor'] == '1') {
+ $simple = false;
}
+load_editor($simple, false, "none");
?>
<div class="input-form">
<form name="form" action="" method="post">
?>
</div>
<div class="row">
- <?php echo _AT('formatting'); ?><br />
- <input type="radio" name="formatting" value="0" id="text" <?php if ($_POST['formatting'] == 0) { echo 'checked="checked"'; } ?> onclick="javascript: document.form.setvisual.disabled=true;" <?php if ($_POST['setvisual'] && !$_POST['settext']) { echo 'disabled="disabled"'; } ?> />
+ <span class="nowrap">
+ <label for="formatting_radios"><span class="required" title="<?php echo _AT('required_field'); ?>">*</span><?php echo _AT('formatting'); ?></label>
+ <span id="formatting_radios">
+ <input type="radio" name="formatting" value="0" id="text" <?php if ($_POST['formatting'] == 0) { echo 'checked="checked"'; } ?> />
+ <label for="text"><?php echo _AT('plain_text'); ?></label>
- <label for="text"><?php echo _AT('plain_text'); ?></label>
- <input type="radio" name="formatting" value="1" id="html" <?php if ($_POST['formatting'] == 1 || $_POST['setvisual']) { echo 'checked="checked"'; } ?> onclick="javascript: document.form.setvisual.disabled=false;"/>
-
- <label for="html"><?php echo _AT('html'); ?></label>
- <?php //Button for enabling/disabling visual editor
- if (($_POST['setvisual'] && !$_POST['settext']) || $_GET['setvisual']){
- echo '<input type="hidden" name="setvisual" value="'.$_POST['setvisual'].'" />';
- echo '<input type="submit" name="settext" value="'._AT('switch_text').'" class="button"/>';
- } else {
- echo '<input type="submit" name="setvisual" value="'._AT('switch_visual').'" ';
- if ($_POST['formatting']==0) { echo 'disabled="disabled"'; }
- echo ' class="button" />';
- }
- ?>
+ <input type="radio" name="formatting" value="1" id="html" <?php if ($_POST['formatting'] == 1) { echo 'checked="checked"'; } ?> />
+ <label for="html"><?php echo _AT('html'); ?></label>
+ </span>
+ </span>
</div>
<div class="row">
<span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="jb_description"><?php echo _AT('jb_post_description'); ?></label><br />
<?php
-if (($_POST['setvisual'] && !$_POST['settext']) || $_GET['setvisual']) {
- load_editor();
+$simple = true;
+if ($_POST['complexeditor'] == '1') {
+ $simple = false;
}
+load_editor($simple, false, "none");
?>
<div class="input-form">
</div>
<div class="row">
- <?php echo _AT('formatting'); ?><br />
- <input type="radio" name="formatting" value="0" id="text" <?php if ($_POST['formatting'] == 0) { echo 'checked="checked"'; } ?> onclick="javascript: document.form.setvisual.disabled=true;" <?php if ($_POST['setvisual'] && !$_POST['settext']) { echo 'disabled="disabled"'; } ?> />
+ <span class="nowrap">
+ <label for="formatting_radios"><span class="required" title="<?php echo _AT('required_field'); ?>">*</span><?php echo _AT('formatting'); ?></label>
+ <span id="formatting_radios">
+ <input type="radio" name="formatting" value="0" id="text" <?php if ($_POST['formatting'] == 0) { echo 'checked="checked"'; } ?> />
+ <label for="text"><?php echo _AT('plain_text'); ?></label>
- <label for="text"><?php echo _AT('plain_text'); ?></label>
- <input type="radio" name="formatting" value="1" id="html" <?php if ($_POST['formatting'] == 1 || $_POST['setvisual']) { echo 'checked="checked"'; } ?> onclick="javascript: document.form.setvisual.disabled=false;"/>
-
- <label for="html"><?php echo _AT('html'); ?></label>
- <?php //Button for enabling/disabling visual editor
- if (($_POST['setvisual'] && !$_POST['settext']) || $_GET['setvisual']){
- echo '<input type="hidden" name="setvisual" value="'.$_POST['setvisual'].'" />';
- echo '<input type="submit" name="settext" value="'._AT('switch_text').'" class="button"/>';
- } else {
- echo '<input type="submit" name="setvisual" value="'._AT('switch_visual').'" ';
- if ($_POST['formatting']==0) { echo 'disabled="disabled"'; }
- echo ' class="button" />';
- }
- ?>
+ <input type="radio" name="formatting" value="1" id="html" <?php if ($_POST['formatting'] == 1) { echo 'checked="checked"'; } ?> />
+ <label for="html"><?php echo _AT('html'); ?></label>
+ </span>
+ </span>
</div>
<div class="row">
<span class="required" title="<?php echo _AT('required_field'); ?>">*</span><label for="jb_description"><?php echo _AT('jb_post_description'); ?></label><br />
<div>
<label><?php echo _AT('categories'); ?></label>
<?php if(is_array($this->job_post['categories'])):
- foreach($this->job_post['categories'] as $category): ?>
- <span><?php echo $this->job_obj->getCategoryNameById($category);?></span>
- <?php endforeach; else: ?>
+ $category_str = '';
+ foreach($this->job_post['categories'] as $category){
+ $category_str .= $this->job_obj->getCategoryNameById($category).', ';
+ }
+ $category_str = substr($category_str, 0, -2);
+ ?>
+ <span><?php echo $category_str;?></span>
+ <?php else: ?>
<span><?php echo $this->job_obj->getCategoryNameById($this->job_post['categories']);?></span>
<?php endif; ?>
</div>
--- /dev/null
+/***********************************************************************/\r
+/* ATutor */\r
+/***********************************************************************/\r
+/* Copyright (c) 2002-2010 */\r
+/* Inclusive Design Institute */\r
+/* http://atutor.ca */\r
+/* */\r
+/* This program is free software. You can redistribute it and/or */\r
+/* modify it under the terms of the GNU General Public License */\r
+/* as published by the Free Software Foundation. */\r
+/***********************************************************************/\r
+// $Id$\r
+\r
+/*global jQuery*/\r
+/*global ATutor */\r
+/*global tinyMCE */\r
+/*global window */\r
+\r
+ATutor = ATutor || {};\r
+ATutor.mods = ATutor.mods || {};\r
+ATutor.mods.editor = ATutor.mods.editor || {};\r
+\r
+(function () {\r
+ //initialises values to show or hide them\r
+ var setupPage = function () {\r
+ var textArea = jQuery("#textSpan");\r
+ var textAreaId = "jb_description";\r
+ if (jQuery("#html").attr("checked")) {\r
+ if (ATutor.mods.editor.editor_pref !== '1' && !tinyMCE.get(textAreaId)) {\r
+ tinyMCE.execCommand('mceAddControl', false, textAreaId);\r
+ }\r
+ textArea.show();\r
+ } else {\r
+ if (tinyMCE.get(textAreaId)) {\r
+ tinyMCE.execCommand('mceRemoveControl', false, textAreaId);\r
+ }\r
+ textArea.show();\r
+ } \r
+ };\r
+\r
+ //set up click handlers and show/hide appropriate tools via setupPage\r
+ var initialize = function () {\r
+ jQuery("#formatting_radios > input").click(setupPage);\r
+ setupPage();\r
+ };\r
+ \r
+ jQuery(document).ready(initialize);\r
+})();
\ No newline at end of file