コード例 #1
0
ファイル: ajax_task_edit.php プロジェクト: sgh1986915/php-crm
if (function_exists('hook_handle_callback')) {
    hook_handle_callback('quote_task_after', $task_data['quote_id'], $task_data['quote_task_id'], $quote, $task_data);
}
?>
    </td>
    <td colspan="<?php 
echo $colspan;
?>
" valign="top">

        <div>
        <?php 
_e('Task Type:');
?>
 <?php 
$types = module_quote::get_task_types();
$types['-1'] = _l('Default (%s)', $types[$quote['default_task_type']]);
module_form::generate_form_element(array('type' => 'select', 'name' => 'quote_task[' . $quote_task_id . '][manual_task_type]', 'id' => 'manual_task_type_' . $quote_task_id, 'options' => $types, 'blank' => false, 'value' => $task_data['manual_task_type_real']));
?>
        </div>

    </td>
    <td class="edit_task_options">
        <div>
        <?php 
if ($task_editable) {
    ?>
            <input type="hidden" name="quote_task[<?php 
    echo $quote_task_id;
    ?>
][billable_t]" value="1">
コード例 #2
0
            ?>

					    <input type="button" name="i" id="insert_saved" value="<?php 
            _e('Insert');
            ?>
"
					           class="task_defaults small_button">
					    <input type="hidden" name="default_tasks_action" id="default_tasks_action" value="0">
					    <?php 
            _h('Here you can save the current tasks as defaults to be used later, or insert a previously saved set of defaults.');
        }));
    }
    if (module_config::c('quote_show_task_numbers', 1)) {
        $fieldset_data['elements'][] = array('title' => 'Task Numbers', 'field' => array('type' => 'select', 'options' => array(0 => _l('Automatic'), 1 => _l('Manual'), 2 => _l('Hidden')), 'name' => 'auto_task_numbers', 'value' => $quote['auto_task_numbers']));
    }
    $fieldset_data['elements'][] = array('title' => 'Task Type', 'field' => array('type' => 'select', 'options' => module_quote::get_task_types(), 'name' => 'default_task_type', 'value' => isset($quote['default_task_type']) ? $quote['default_task_type'] : 0, 'help' => 'The default is hourly rate + amount. This will show the "Hours" column along with an "Amount" column. Inputing a number of hours will auto complete the price based on the quote hourly rate. <br>Quantity and Amount will allow you to input a Quantity (eg: 2) and an Amount (eg: $100) and the final price will be $200 (Quantity x Amount). The last option "Amount Only" will just have the amount column for manual input of price. Change the advanced setting "default_task_type" between 0, 1 and 2 to change the default here.'));
    if (class_exists('module_quote_discussion', false) && isset($quote['quote_discussion']) && module_quote_discussion::is_plugin_enabled()) {
        $fieldset_data['elements'][] = array('title' => 'Quote Discussion', 'field' => array('type' => 'select', 'options' => array(0 => _l('Allowed'), 1 => _l('Disabled & Hidden'), 2 => _l('Disabled & Shown')), 'name' => 'quote_discussion', 'value' => isset($quote['quote_discussion']) ? $quote['quote_discussion'] : 0));
    }
    $find_other_templates = 'quote_pdf';
    $current_template = isset($quote['quote_template_print']) && strlen($quote['quote_template_print']) ? $quote['quote_template_print'] : module_config::c('quote_template_print_default', 'quote_pdf');
    if (function_exists('convert_html2pdf') && isset($find_other_templates) && strlen($find_other_templates) && isset($current_template) && strlen($current_template)) {
        $other_templates = array();
        foreach (module_template::get_templates() as $possible_template) {
            if (strpos($possible_template['template_key'], $find_other_templates) !== false) {
                // found another one!
                $other_templates[$possible_template['template_key']] = $possible_template['template_key'];
                // $possible_template['description'];
            }
        }
        if (count($other_templates) > 1) {