Esempio n. 1
0
}
$disabled = false;
$table->width = '99%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
$auth_methods = array('mysql' => __('Local Integria'), 'ldap' => __('LDAP'));
if ($is_enterprise) {
    add_enterprise_auth_methods($auth_methods);
}
$table->data[0][0] = print_select($auth_methods, "auth_methods", $auth_method, '', '', '', true, 0, true, __('Authentication method'));
$table->data[0][1] = print_input_text("session_timeout", $config['session_timeout'], '', 10, 10, true, __('Session timeout (secs)'));
$table->data[0][1] .= print_help_tip(__("This is defined in seconds. "), true);
$table->data[1][0] = '<b>' . __('Autocreate remote users') . '</b>';
$table->data[2][0] = __('Yes') . '&nbsp;' . print_radio_button_extended('autocreate_remote_users', 1, '', $config['autocreate_remote_users'], false, 'enable_autocreate_profile();', '', true) . '&nbsp;&nbsp;';
$table->data[2][0] .= __('No') . '&nbsp;' . print_radio_button_extended('autocreate_remote_users', 0, '', $config['autocreate_remote_users'], false, 'enable_autocreate_profile();', '', true);
if ($config['autocreate_remote_users'] == 0) {
    $disabled = true;
}
$profile_list = profile_get_profiles();
if ($profile_list === false) {
    $profile_list = array();
}
$table->data[3][0] = print_select($profile_list, "default_remote_profile", $config['default_remote_profile'], '', '', '', true, 0, true, __('Autocreate profile'), $disabled);
$group_list = group_get_groups();
if ($group_list === false) {
    $group_list = array();
}
$table->data[4][0] = print_select($group_list, "default_remote_group", $config['default_remote_group'], '', '', '', true, 0, true, __('Autocreate group'), $disabled);
$table->data[5][0] = print_input_text("autocreate_blacklist", $config['autocreate_blacklist'], '', 60, 500, true, __('Autocreate blacklist'), $disabled);
$table->data[5][0] .= integria_help("autocreate_blacklist", true);
Esempio n. 2
0
/**
 * Render a radio button input.
 *
 * @param string Input name.
 * @param string Input value.
 * @param string  Label to add after the radio button (optional).
 * @param string Checked and selected value, the button will be selected if it matches $value (optional).
 * @param bool Whether to return an output string or echo now (optional, echo by default).
 */
function print_radio_button($name, $value, $label = '', $checkedvalue = '', $return = false, $label = false)
{
    $output = print_radio_button_extended($name, $value, $label, $checkedvalue, false, '', '', true, $label);
    if ($return) {
        return $output;
    }
    echo $output;
}
Esempio n. 3
0
$table->data[0][2] .= "<div style='display:inline-block;'>" . print_input_text('issue_time', $time, '', 7, 20, true, __('Time')) . "</div>";
$table->data[1][0] = print_select_from_sql('SELECT id, name FROM tnewsletter ORDER BY name', 'id_newsletter', $id_newsletter, '', '', '', true, false, false, __('Newsletter'));
$status_values[0] = __('Ready');
$status_values[1] = __('Pending');
$status_values[2] = __('Sent');
$table->data[1][1] = print_select($status_values, "status", $status, '', '', '', true, 0, true, __('Issue status'));
$campaigns = crm_get_campaigns_combo_list();
$table->data[1][2] = print_select($campaigns, "campaign", $campaign, '', __("None"), 0, true, 0, true, __('Campaign'));
$editor_type_chkbx = "<div style=\"padding: 4px 0px;\"><b><small>";
$editor_type_chkbx .= __('Basic') . "&nbsp;&nbsp;";
//$editor_type_chkbx .= print_radio_button_extended ('editor_type', 0, '', true, false, "removeTinyMCE('textarea-html')", '', true);
$editor_type_chkbx .= print_radio_button_extended('editor_type', 0, '', false, false, "removeTinyMCE('textarea-html')", '', true);
$editor_type_chkbx .= "&nbsp;&nbsp;&nbsp;&nbsp;";
$editor_type_chkbx .= __('Advanced') . "&nbsp;&nbsp;";
//$editor_type_chkbx .= print_radio_button_extended ('editor_type', 0, '', false, false, "addTinyMCE('textarea-html')", '', true);
$editor_type_chkbx .= print_radio_button_extended('editor_type', 0, '', true, false, "addTinyMCE('textarea-html')", '', true);
$editor_type_chkbx .= "</small></b></div>";
$table->data[3][0] = print_textarea("html", 10, 1, $html, 'class="noselected"', true, "<br>" . __('HTML') . $editor_type_chkbx);
$table->data[4][0] = "";
if ($id) {
    $table->data[4][0] .= print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"', true);
    $table->data[4][0] .= print_input_hidden('id', $id, true);
    $table->data[4][0] .= print_input_hidden('update', 1, true);
} else {
    $table->data[4][0] .= print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"', true);
    $table->data[4][0] .= print_input_hidden('create', 1, true);
}
echo '<form method="post" action="index.php?sec=customers&sec2=operation/newsletter/issue_definition">';
print_table($table);
echo "</form>";
//id hidden