$Plugins->trigger_event('AdminDisplayItemFormFieldset', array('Form' => &$Form, 'Item' => &$edited_Item, 'edit_layout' => 'simple'));
?>

</div>

<div class="right_col">

	<?php 
// ################### MODULES SPECIFIC ITEM SETTINGS ###################
modules_call_method('display_item_settings', array('Form' => &$Form, 'Blog' => &$Blog, 'edited_Item' => &$edited_Item));
// ################### CATEGORIES ###################
cat_select($Form);
// ################### VISIBILITY / SHARING ###################
$Form->begin_fieldset(T_('Visibility / Sharing'), array('id' => 'itemform_visibility'));
$Form->switch_layout('linespan');
visibility_select($Form, $edited_Item->status);
$Form->switch_layout(NULL);
$Form->end_fieldset();
// ################### COMMENT STATUS ###################
if ($Blog->get_setting('allow_comments') != 'never' && $Blog->get_setting('disable_comments_bypost')) {
    $Form->begin_fieldset(T_('Comments'), array('id' => 'itemform_comments'));
    ?>
			<label title="<?php 
    echo T_('Visitors can leave comments on this post.');
    ?>
"><input type="radio" name="post_comment_status" value="open" class="checkbox" <?php 
    if ($post_comment_status == 'open') {
        echo 'checked="checked"';
    }
    ?>
 />
/**
 * @param string $code
 * @param string $title
 * @param string $prof
 * @param string $lang
 * @param string $type - can be null
 * @param int $vis
 * @param string $desc
 * @param mixed $faculty - can be null
 */
function course_details_form($code, $title, $prof, $lang, $type, $vis, $desc, $faculty) {
    global $langInfo1, $langInfo2, $langCourseCode, $langLanguage, $langTitle,
    $langCourseDescription, $langFaculty, $langCourseVis,
    $langTeacher, $langUsersWillAdd,
    $langOk, $langAll, $langsTeachers, $langMultiRegType,
    $langNone, $langOldValue, $treeObj, $langBack, $course_code;

    list($tree_js, $tree_html) = $treeObj->buildCourseNodePicker();
    if ($type) {
        if (isset($GLOBALS['lang' . $type])) {
            $type_label = ' (' . $GLOBALS['lang' . $type] . ')';
        } else {
            $type_label = ' (' . $type . ')';
        }
    } else {
        $type_label = '';
    }
    if (is_array($faculty)) {
        foreach ($faculty as $entry) {
            $old_faculty_names[] = q(Hierarchy::unserializeLangField($entry['name']));
        }
        $old_faculty = implode('<br>', $old_faculty_names);
    } else {
        $old_faculty = q(Hierarchy::unserializeLangField($faculty) . $type_label);
    }
    $formAction = $_SERVER['SCRIPT_NAME'];
    if (isset($GLOBALS['course_code'])) {
        $formAction .= '?course=' . $GLOBALS['course_code'];
    }
    return action_bar(array(
        array('title' => $langBack,
              'url' => "index.php?course=$course_code",
              'icon' => 'fa-reply',
              'level' => 'primary-label'))) . "
        <div class='alert alert-info'>$langInfo1 <br> $langInfo2</div>
                <div class='row'>
                <div class='col-md-12'>
                <div class='form-wrapper' >
                <form class='form-horizontal' role='form' action='$formAction' method='post' onsubmit='return validateNodePickerForm();' >

                    <div class='form-group'>
                        <label for='course_code' class='col-sm-3 control-label'>$langCourseCode:</label>
                        <div class='col-sm-9'>
                            <input type='text' class='form-control' id='course_code' name='course_code' value='" . q($code) . "'>
                        </div>
                    </div>
                    <div class='form-group'>
                        <label for='course_code' class='col-sm-3 control-label'>$langLanguage:</label>
                        <div class='col-sm-9'>
                            " . lang_select_options('course_lang') . "
                        </div>
                    </div>
                    <div class='form-group'>
                        <label for='course_title' class='col-sm-3 control-label'>$langTitle:</label>
                        <div class='col-sm-9'>
                            <input class='form-control' type='text' id='course_title' name='course_title' value='" . q($title) . "' />
                        </div>
                    </div>

                    <div class='form-group'>
                        <label class='col-sm-3 control-label'>$langCourseDescription:</label>
                        <div class='col-sm-9'>
                            " . rich_text_editor('course_desc', 10, 40, purify($desc)) . "
                        </div>
                    </div>
                    <div class='form-group'>
                        <label class='col-sm-3 control-label'>$langFaculty:</label>
                        <div class='col-sm-9'>
                            " . $tree_html . "<br>$langOldValue: <i>$old_faculty</i>
                        </div>
                    </div>
                    <div class='form-group'>
                        <label class='col-sm-3 control-label'>$langCourseVis:</label>
                        <div class='col-sm-9'>
                            " . visibility_select($vis) . "
                        </div>
                    </div>
                    <div class='form-group'>
                        <label for='course_prof' class='col-sm-3 control-label'>$langTeacher:</label>
                        <div class='col-sm-9'>
                            <input class='form-control' type='text' id='course_prof' name='course_prof' value='" . q($prof) . "' size='50' />
                        </div>
                    </div>
                    <div class='form-group'>
                    <label class='col-sm-3 control-label'>$langUsersWillAdd:</label>

                        <div class='col-sm-9'>
                            <input type='radio' name='add_users' value='all' id='add_users_all' checked='checked'>
                           $langAll<br>
                           <input type='radio' name='add_users' value='prof' id='add_users_prof'>
                           $langsTeachers<br>
                           <input type='radio' name='add_users' value='none' id='add_users_none'>
                           $langNone
                        </div>
                    </div>
                    <div class='form-group'>
                        <label class='col-sm-3 control-label'>$langMultiRegType:</label>
                        <div class='col-sm-9'>
                            <input type='checkbox' name='create_users' value='1' id='create_users' checked='checked'>
                        </div>
                    </div>
                    <div class='form-group'>
                        <div class='col-sm-offset-3 col-sm-9'>
                        <input class='btn btn-primary' type='submit' name='create_restored_course' value='$langOk' />
                      <input type='hidden' name='restoreThis' value='" . q($_POST['restoreThis']) . "' />
                          </div>
                    </div>
                " . generate_csrf_token_form_field() . "
                </form>
                </div>
                </div>
                </div>
    ";
}
Exemple #3
0
        if ($edited_Item->get_type_setting('allow_closing_comments')) {
            // Allow closing comments
            $comment_status_options[] = array('value' => 'closed', 'label' => T_('Closed'), 'note' => T_('Visitors can NOT leave comments on this post.'));
        }
        if ($edited_Item->get_type_setting('allow_disabling_comments')) {
            // Allow disabling comments
            $comment_status_options[] = array('value' => 'disabled', 'label' => T_('Disabled'), 'note' => T_('Visitors cannot see nor leave comments on this post.'));
        }
        $Form->radio_input('post_comment_status', $edited_Item->get('comment_status'), $comment_status_options, T_('Allow replies'), array('lines' => true));
    } else {
        $Form->hidden('post_comment_status', $edited_Item->get('comment_status'));
    }
}
// ################### VISIBILITY / SHARING ###################
$Form->switch_template_parts(array('inputstart' => '<td class="form_input" id="itemform_visibility">'));
visibility_select($Form, $edited_Item->status, false, array(), T_('Visibility / Sharing'));
$Form->switch_template_parts($disp_params['edit_form_params']);
// ################### TEXT RENDERERS ###################
$item_renderer_checkboxes = $edited_Item->get_renderer_checkboxes();
if (!empty($item_renderer_checkboxes)) {
    $Form->switch_template_parts(array('fieldset_begin' => '<tr><td class="left" valign="top"><strong>$fieldset_title$:</strong></td><td class="form_input">'));
    $Form->begin_fieldset(T_('Text Renderers'), array('id' => 'itemform_renderers'));
    echo $item_renderer_checkboxes;
    $Form->end_fieldset();
    $Form->switch_template_parts($disp_params['edit_form_params']);
}
// ################### TAGS ###################
if ($edited_Item->get_type_setting('use_tags') != 'never') {
    // Display tags
    // Checkbox to suggest tags
    $suggest_checkbox = ' <span title="' . format_to_output(T_('Check this to let b2evolution auto-suggest tags as you type, based on the tags existing on other posts.'), 'htmlattr') . '">' . '<input id="suggest_item_tags" name="suggest_item_tags" value="1" type="checkbox"' . ($UserSettings->get('suggest_item_tags') ? ' checked="checked"' : '') . ' /> ' . '<label for="suggest_item_tags">' . T_('suggest') . '</label>' . '</span>';