Example #1
0
$Form->begin_form('fform', $creating ? T_('New scheduled job') : T_('Edit scheduled job'));
$Form->add_crumb('crontask');
$Form->hiddens_by_key(get_memorized('action'));
$Form->hidden('action', $creating ? 'create' : 'update');
$Form->begin_fieldset(T_('Job details') . get_manual_link('scheduled-job-form'));
if ($creating && $action != 'copy') {
    // New cronjob
    $cron_jobs_names = get_cron_jobs_config('name');
    // Exclude these cron jobs from manual creating
    unset($cron_jobs_names['send-post-notifications']);
    unset($cron_jobs_names['send-comment-notifications']);
    $Form->select_input_array('cjob_type', get_param('cjob_type'), $cron_jobs_names, T_('Job type'));
} else {
    // Edit cronjob
    if ($action == 'edit') {
        $Form->info(T_('Job #'), $edited_Cronjob->ID);
    }
    $Form->info(T_('Default job name'), cron_job_name($edited_Cronjob->key, '', $edited_Cronjob->params));
    $Form->text_input('cjob_name', $edited_Cronjob->name, 50, T_('Job name'), '', array('maxlength' => 255));
}
$Form->date_input('cjob_date', date2mysql($edited_Cronjob->start_timestamp), T_('Schedule date'), array('required' => true));
$Form->time_input('cjob_time', date2mysql($edited_Cronjob->start_timestamp), T_('Schedule time'), array('required' => true));
$Form->duration_input('cjob_repeat_after', $edited_Cronjob->repeat_after, T_('Repeat every'), 'days', 'minutes', array('minutes_step' => 1));
$Form->end_fieldset();
if (!$creating) {
    // We can edit only pending cron jobs, Show this field just for info
    $Form->begin_fieldset(T_('Execution details') . get_manual_link('scheduled-job-execution-details'));
    $Form->info(T_('Status'), 'pending');
    $Form->end_fieldset();
}
$Form->end_form(array(array('submit', 'submit', $creating ? T_('Create') : T_('Save Changes!'), 'SaveButton')));
Example #2
0
    $Form->global_icon(T_('Delete this goal!'), 'delete', regenerate_url('action', 'action=delete&' . url_crumb('goal')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('New goal') : T_('Goal'));
$Form->add_crumb('goal');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',goal_ID' : '')));
// (this allows to come back to the right list order & page)
$GoalCategoryCache =& get_GoalCategoryCache();
$GoalCategoryCache->load_all();
$Form->select_input_object('goal_gcat_ID', $edited_Goal->gcat_ID, $GoalCategoryCache, T_('Category'), array('required' => true));
$Form->text_input('goal_name', $edited_Goal->name, 40, T_('Name'), '', array('maxlength' => 50, 'required' => true));
$Form->text_input('goal_key', $edited_Goal->key, 32, T_('Key'), T_('Should be URL friendly'), array('required' => true));
$Form->text_input('goal_redir_url', $edited_Goal->redir_url, 60, T_('Normal Redirection URL'), '', array('maxlength' => 255, 'class' => 'large', 'required' => true));
$Form->text_input('goal_temp_redir_url', $edited_Goal->temp_redir_url, 60, T_('Temporary Redirection URL'), '', array('maxlength' => 255, 'class' => 'large'));
$Form->date_input('goal_temp_start_date', is_int($edited_Goal->temp_start_ts) ? date2mysql($edited_Goal->temp_start_ts) : $edited_Goal->temp_start_ts, T_('Temporary Start Date'));
$Form->time_input('goal_temp_start_time', is_int($edited_Goal->temp_start_ts) ? date2mysql($edited_Goal->temp_start_ts) : $edited_Goal->temp_start_ts, T_('Temporary Start Time'));
$Form->date_input('goal_temp_end_date', is_int($edited_Goal->temp_end_ts) ? date2mysql($edited_Goal->temp_end_ts) : $edited_Goal->temp_end_ts, T_('Temporary End Date'));
$Form->time_input('goal_temp_end_time', is_int($edited_Goal->temp_end_ts) ? date2mysql($edited_Goal->temp_end_ts) : $edited_Goal->temp_end_ts, T_('Temporary End Time'));
$Form->text_input('goal_default_value', $edited_Goal->default_value, 15, T_('Default value'), '');
$Form->textarea('goal_notes', $edited_Goal->get('notes'), 15, T_('Notes'), '', 50);
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
?>
<script type="text/javascript">
function check_goal_redir_url_required()
{
	if( jQuery( '#goal_temp_redir_url' ).val() == '' )
	{
Example #3
0
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Invitation
 */
global $edited_Invitation;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'invitation_checkchanges', 'post', 'compact');
if (!$creating) {
    $Form->global_icon(T_('Delete this invitation code!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('invitation')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', ($creating ? T_('New invitation code') : T_('Invitation code')) . get_manual_link('invitation-code-form'));
$Form->add_crumb('invitation');
$Form->hiddens_by_key(get_memorized('action'));
// (this allows to come back to the right list order & page)
$GroupCache =& get_GroupCache();
$Form->select_input_object('ivc_grp_ID', $edited_Invitation->grp_ID, $GroupCache, T_('Group'), array('required' => true));
$Form->text_input('ivc_code', $edited_Invitation->code, 32, T_('Code'), T_('Must be from 3 to 32 letters, digits or signs "-", "_".'), array('required' => true));
$Form->date_input('ivc_expire_date', date2mysql($edited_Invitation->expire_ts), T_('Expire date'), array('required' => true));
$Form->time_input('ivc_expire_time', date2mysql($edited_Invitation->expire_ts), T_('Expire time'), array('required' => true));
$Form->text_input('ivc_source', $edited_Invitation->source, 32, T_('Source'), '', array('maxlength' => 30));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
}
ob_start();
echo '<div class="comment_toolbars">';
// CALL PLUGINS NOW:
$Plugins->trigger_event('AdminDisplayToolbar', array('target_type' => 'Comment', 'edit_layout' => NULL, 'Comment' => $edited_Comment));
echo '</div>';
$plugins_toolbar = ob_get_clean();
$Form->switch_template_parts(array('inputstart' => '<td class="row2 left">' . $plugins_toolbar));
$Form->textarea_input('content', $comment_content, $disp_params['textarea_lines'], $disp_params['form_comment_text'], array('cols' => 60, 'style' => 'width:99%', 'id' => $dummy_fields['content']));
// set b2evoCanvas for plugins
echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
if ($current_User->check_perm('blog_edit_ts', 'edit', false, $Blog->ID)) {
    // ------------------------------------ TIME STAMP -------------------------------------
    $Form->switch_template_parts(array('fieldstart' => '', 'fieldend' => '', 'labelstart' => '', 'labelend' => '', 'labelempty' => '', 'inputstart' => '', 'inputend' => '', 'output' => false));
    $comment_date_input = $Form->date_input('comment_issue_date', $edited_Comment->date, '');
    $comment_date_input .= $Form->time_input('comment_issue_time', $edited_Comment->date, '');
    $Form->switch_template_parts($disp_params['edit_form_params']);
    $Form->info(T_('Comment date'), $comment_date_input, '');
}
if ($comment_Item->can_rate() || !empty($edited_Comment->rating)) {
    // Rating is editable
    $edit_form_params = $disp_params['edit_form_params'];
    $before_rating = $edit_form_params['fieldstart'] . $edit_form_params['labelstart'] . T_('Rating') . $edit_form_params['labelend'] . $edit_form_params['inputstart'];
    $after_rating = $edit_form_params['inputend'] . $edit_form_params['fieldend'];
    $edited_Comment->rating_input(array('before' => $before_rating, 'after' => $after_rating));
}
// Get those statuses which are not allowed for the current User to create comments in this blog
$exclude_statuses = array_merge(get_restricted_statuses($Blog->ID, 'blog_comment!', 'edit'), array('redirected', 'trash'));
// Get allowed visibility statuses
$sharing_options = get_visibility_statuses('radio-options', $exclude_statuses);
if (count($sharing_options) == 1) {
    $Form->text_input('newcomment_author_url', $edited_Comment->author_url, 20, T_('Website URL'), '', array('maxlength' => 100, 'style' => 'width: 100%;'));
}
echo '<div class="comment_toolbars">';
// CALL PLUGINS NOW:
$Plugins->trigger_event('AdminDisplayToolbar', array('target_type' => 'Comment', 'edit_layout' => NULL, 'Comment' => $edited_Comment));
echo '</div>';
$Form->textarea_input('content', $comment_content, $display_params['textarea_lines'], $display_params['form_comment_text'], array('cols' => 38, 'class' => 'bComment', 'id' => $dummy_fields['content']));
// set b2evoCanvas for plugins
echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "' . $dummy_fields['content'] . '" );</script>';
if ($current_User->check_perm('blog_edit_ts', 'edit', false, $Blog->ID)) {
    // ------------------------------------ TIME STAMP -------------------------------------
    $Form->begin_fieldset();
    echo '<div class="label">' . T_('Comment date') . ':</div>';
    $Form->switch_layout('blockspan');
    $Form->date_input('comment_issue_date', $edited_Comment->date, '', array('size' => "10"));
    $Form->time_input('comment_issue_time', $edited_Comment->date, '', array('size' => "10"));
    $Form->switch_layout(NULL);
    $Form->end_fieldset();
}
if ($comment_Item->can_rate() || !empty($edited_Comment->rating)) {
    // Rating is editable
    $edited_Comment->rating_input(array('before' => '<fieldset><div class="label">' . T_('Rating') . ':</div><div class="input">', 'after' => '</div></fieldset>'));
}
// Get those statuses which are not allowed for the current User to create comments in this blog
$exclude_statuses = array_merge(get_restricted_statuses($Blog->ID, 'blog_comment!', 'edit'), array('redirected', 'trash'));
// Get allowed visibility statuses
$sharing_options = get_visibility_statuses('radio-options', $exclude_statuses);
if (count($sharing_options) == 1) {
    // Only one visibility status is available, don't show radio but set hidden field
    $Form->hidden('comment_status', $sharing_options[0][0]);
} else {