Ejemplo n.º 1
0
?>
> <label for="expense"><?php 
_e('Expense/Debit');
?>
</label> <br/>
                </td>
            </tr>
            <tr>
                <th>
                    <?php 
echo _l('Default Account');
?>
                </th>
                <td valign="top">
                    <?php 
echo print_select_box(module_finance::get_accounts(), 'finance_account_id', isset($recurring['finance_account_id']) ? $recurring['finance_account_id'] : '', '', true, 'name', true);
?>
                </td>
            </tr>
            <tr>
                <th>
                    <?php 
echo _l('Default Categories');
?>
                </th>
                <td valign="top">
                    <?php 
$categories = module_finance::get_categories();
foreach ($categories as $category) {
    ?>
                        <input type="checkbox" name="finance_category_id[]" value="<?php 
Ejemplo n.º 2
0
                                    </td><td>
                                        <input type="text" name="invoice_invoice_payment[<?php 
            echo $invoice_payment_id;
            ?>
][method]" value="<?php 
            echo htmlspecialchars($invoice_payment_data['method']);
            ?>
" size="20">
                                    </td>
                                    <td nowrap="">
                                        <?php 
            echo '<input type="text" name="invoice_invoice_payment[' . $invoice_payment_id . '][amount]" value="' . number_out($invoice_payment_data['amount']) . '" id="' . $invoice_payment_id . 'invoice_paymentamount" class="currency">';
            ?>

                                        <?php 
            echo print_select_box(get_multiple('currency', '', 'currency_id'), 'invoice_invoice_payment[' . $invoice_payment_id . '][currency_id]', $invoice_payment_data['currency_id'], '', false, 'code');
            ?>

                                    </td>
                                    <td>
                                        <?php 
            $notes = '';
            $details = false;
            if (isset($invoice_payment_data['data']) && $invoice_payment_data['data']) {
                $details = @unserialize($invoice_payment_data['data']);
                if ($details && isset($details['custom_notes'])) {
                    $notes = $details['custom_notes'];
                }
            }
            ?>
Ejemplo n.º 3
0
    <tr>
        <th class="width2">
            <?php 
_e('Encryption Vault:');
?>
        </th>
        <td id="env_vault_name">
            <?php 
// drop down list of available encryption methods.
if ($encryption_key && $encrypt && $encrypt['encrypt_key_id']) {
    // we actually have an encrypted value here. don't let them change the key.
    echo htmlspecialchars($encryption_key['encrypt_key_name']);
} else {
    // no encryption saved yet for this field.
    // let them pick
    echo print_select_box($encryption_keys, 'encrypt_key_id', isset($encrypt_field['encrypt_key_id']) ? $encrypt_field['encrypt_key_id'] : false, '', true, 'encrypt_key_name', false);
    ?>
                <a href="#" onclick="$('#enc_existing').hide(); $('#enc_create_new').show();$('#encrypt_key_name')[0].focus(); return false;"><?php 
    _e('Create New Vault');
    ?>
</a>
                <?php 
}
?>
        </td>
    </tr>
    </tbody>
    <tbody id="password_box" style="<?php 
echo $adding_new_blank_field ? 'display:none;' : '';
?>
">
Ejemplo n.º 4
0
        </td>
        <td>
            <input type="text" name="search[generic]" value="<?php 
echo isset($search['generic']) ? htmlspecialchars($search['generic']) : '';
?>
" size="30">
        </td>
		<td width="30">
        <?php 
_e('Status:');
?>

        </td>
        <td>
        <?php 
echo print_select_box(module_website::get_statuses(), 'search[status]', isset($search['status']) ? $search['status'] : '');
?>

        </td>
        <td class="search_action">
			<?php 
echo create_link("Reset", "reset", module_website::link_open(false));
?>

			<?php 
echo create_link("Search", "submit");
?>

		</td>
	</tr>
</table>
Ejemplo n.º 5
0
        ?>

                </td>
                <td valign="top">
                    <input type="text" name="job_task[new][date_due]" value="<?php 
        echo print_date($job['date_due']);
        ?>
" class="date_field">
                </td>
                <?php 
        if (module_config::c('job_allow_staff_assignment', 1)) {
            ?>

                    <td valign="top">
                        <?php 
            echo print_select_box($staff_member_rel, 'job_task[new][user_id]', isset($staff_member_rel[module_security::get_loggedin_id()]) ? module_security::get_loggedin_id() : false, 'job_task_staff_list', '');
            ?>

                    </td>
                <?php 
        }
        ?>

                <td valign="top">
                    <input type="checkbox" name="job_task[new][new_fully_completed]" value="1">
                </td>
                <td align="center" valign="top">
                    <input type="submit" name="save" value="<?php 
        _e('New Task');
        ?>
" class="save_task small_button">
Ejemplo n.º 6
0
				<th>
					<?php 
echo _l('System Access');
?>
				</th>
				<td id="system_access">
					<?php 
echo print_select_box(array(1 => 'Administrator (access to everything)', 2 => 'Customer/User'), 'access_level', $access_level, '', false);
?>
				</td>
			</tr>
			<tr id="data_access">
				<th>
					<?php 
echo _l('Data Access');
?>
				</th>
				<td>
					<?php 
echo print_select_box(array('mine' => 'My Site Only', 'customer' => 'Customer Sites Only'), 'data_access[site]', isset($data_access['site']) ? $data_access['site'] : 'mine', '', false);
?>
				</td>
			</tr>

		</tbody>
	</table>

</form>

<?php 
exit;
Ejemplo n.º 7
0
                    unset($linked_items[$id]);
                }
            }
            if (!count($linked_items)) {
                $linked_items[] = '';
            }
            ?>

                    <div id="envato_items_holder">
                        <?php 
            foreach ($linked_items as $linked_item) {
                ?>
                        <div class="dynamic_block">

                            <?php 
                echo print_select_box($all_items_rel, 'envato_item_ids[]', $linked_item);
                ?>
                            <a href="#" class="add_addit" onclick="return seladd(this);">+</a>
                            <a href="#" class="remove_addit" onclick="return selrem(this);">-</a>
                            </div>
                        <?php 
            }
            ?>
                        </div>
                            <script type="text/javascript">
                                set_add_del('envato_items_holder');
                            </script>
					<?php 
        }));
    }
    echo module_form::generate_fieldset($fieldset_data);
Ejemplo n.º 8
0
        if (!$change_request['task_id'] || !isset($tasks[$change_request['task_id']])) {
            $change_request['job_id'] = 0;
            $change_request['task_id'] = 0;
            update_insert('change_request_id', $change_request['change_request_id'], 'change_request', array('job_id' => 0, 'task_id' => 0));
        }
    }
    if ($change_request['job_id']) {
        $job_data = module_job::get_job($change_request['job_id']);
        echo module_job::link_open($change_request['job_id'], true, $job_data);
        echo ' ';
        $task = $tasks[$change_request['task_id']];
        _e('%s hrs = %s', $task['hours'], currency($task['amount'] > 0 ? $task['amount'] : $task['hours'] * $job_data['hourly_rate']), true, $job_data['currency_id']);
    } else {
        if (module_job::can_i('edit', 'Job Tasks')) {
            if (count($jobs)) {
                echo print_select_box($jobs, 'change_request_job_id', '', '', _l('select a job'), 'name');
                ?>
                        @
                        <input type="text" name="add_job_hours" value="<?php 
                echo module_config::c('change_request_job_hours', 1);
                ?>
" class="add_job_hours" style="width:15px;"><?php 
                _e('hrs');
                ?>
                        <input type="button" name="add_job" class="form_save" value="<?php 
                _e('Add');
                ?>
" onclick="$('#add_change_request_to_website_job_id').val($(this).parent().find('select').first().val());$('#add_change_request_to_website_hours').val($(this).prev('.add_job_hours').val()); $('#add_change_request_to_website').val(<?php 
                echo $change_request['change_request_id'];
                ?>
); this.form.submit(); ">
Ejemplo n.º 9
0
</th>
								    <td>
									    <?php 
                            if ($can_edit_emails) {
                                ?>
										    <input type="hidden"
										           name="custom_data_info[<?php 
                                echo $data_type['data_type_id'];
                                ?>
]"
										           value="<?php 
                                echo htmlentities(json_encode($json));
                                ?>
">
										    <?php 
                                echo print_select_box($options, 'custom_data_related[' . $data_type['data_type_id'] . ']', false, '', true);
                            } else {
                                if (!empty($email['custom_data'])) {
                                    $email_custom_data = json_decode($email['custom_data'], true);
                                    if (is_array($email_custom_data) && isset($email_custom_data[$data_type['data_type_id']])) {
                                        echo htmlspecialchars($email_custom_data[$data_type['data_type_id']]['key']);
                                    } else {
                                        _e('N/A');
                                    }
                                } else {
                                    _e('N/A');
                                }
                            }
                            ?>
								    </td>
							    </tr>
Ejemplo n.º 10
0
                 </th>
                 <td>
                     <?php 
 echo print_select_box(module_group::get_groups('ticket'), 'group_id', false, '', true, 'name');
 ?>
                 </td>
             </tr>
             <tr>
                 <th>
                     <?php 
 echo _l('Change Ticket Status');
 ?>
                 </th>
                 <td>
                     <?php 
 echo print_select_box(module_ticket::get_statuses(), 'status_id', '');
 ?>
                 </td>
             </tr>
             <tr>
                 <th>
                     <?php 
 echo _l('Send Ticket Reply Message');
 ?>
                 </th>
                 <td>
                     <input type="checkbox" name="send_message" value="1"> <?php 
 _e('Yes, send below message to each ticket in group:');
 ?>
                     <div>
                     <textarea name="send_message_content" id="send_message_content" rows="10" cols="30" style="width:450px; height: 350px;"></textarea>
Ejemplo n.º 11
0
?>
">
		</td>
        <?php 
if (class_exists('module_group', false) && module_customer::can_i('view', 'Customer Groups')) {
    ?>

        <td width="60">
            <?php 
    _e('Group:');
    ?>

        </td>
        <td>
            <?php 
    echo print_select_box(module_group::get_groups('customer'), 'search[group_id]', isset($search['group_id']) ? $search['group_id'] : false, '', true, 'name');
    ?>

        </td>
        <?php 
}
?>

		<td align="right" rowspan="2">
			<?php 
echo create_link("Reset", "reset", module_customer::link_open(false));
?>

			<?php 
echo create_link("Search", "submit");
?>
						        <?php 
            _e('This ticket is currently assigned to %s, you can change it below:', isset($admins_rel[$ticket['assigned_user_id']]) ? $admins_rel[$ticket['assigned_user_id']] : _l('Nobody'));
            ?>

					        </td>
				        </tr>
				        <tr>
					        <th>
						        <?php 
            _e('Change staff:');
            ?>

					        </th>
					        <td align="left">
						        <?php 
            echo print_select_box($admins_rel, 'change_assigned_user_id', $ticket['assigned_user_id']);
            if (module_security::get_loggedin_id() != $ticket['assigned_user_id']) {
                ?>

						            <span>
							            <a href="#" id="change_to_me" data-user-id="<?php 
                echo module_security::get_loggedin_id();
                ?>
"><?php 
                _e('Change to Me');
                ?>
</a>
						            </span>
						            <?php 
            }
            ?>
Ejemplo n.º 13
0
                    </td>
                    <td>
                        <?php 
echo print_select_box(module_finance::get_accounts(), 'search[finance_account_id]', isset($search['finance_account_id']) ? $search['finance_account_id'] : '', '', true, 'name');
?>

                    </td>
                    <td width="30">
                        <?php 
_e('Category:');
?>

                    </td>
                    <td>
                        <?php 
echo print_select_box(module_finance::get_categories(), 'search[finance_category_id]', isset($search['finance_category_id']) ? $search['finance_category_id'] : '', '', true, 'name');
?>

                    </td>
                    <td class="search_action">
                        <?php 
echo create_link("Reset", "reset", module_finance::link_open(false));
?>

                        <?php 
echo create_link("Search", "submit");
?>

                    </td>
                </tr>
            </table>
Ejemplo n.º 14
0
        ?>
][<?php 
        echo $key;
        ?>
]" value="<?php 
        echo $value;
        ?>
">
								</td>
						<?php 
    } else {
        ?>
							<td>
                                <?php 
        if (isset($data['attributes'])) {
            echo print_select_box($data['attributes'], 'data[' . $primary_key . '][' . $key . ']', $value);
        } else {
            ?>
								<input type="text" name="data[<?php 
            echo $primary_key;
            ?>
][<?php 
            echo $key;
            ?>
]" value="<?php 
            echo $value;
            ?>
" size="<?php 
            echo isset($data['size']) ? $data['size'] : '20';
            ?>
">
Ejemplo n.º 15
0
    if (isset($priorities[_TICKET_PRIORITY_STATUS_ID])) {
        unset($priorities[_TICKET_PRIORITY_STATUS_ID]);
    }
    ?>


                                <tr>
                                    <th>
                                        <?php 
    echo _l('Priority');
    ?>

                                    </th>
                                    <td>
                                        <?php 
    echo print_select_box($priorities, 'priority', '', '', false);
    ?>

                                    </td>
                                </tr>
                            <?php 
}
?>

                            <tr>
                                <th class="width1">
                                    <?php 
_e('Subject');
?>

                                </th>
Ejemplo n.º 16
0
                    <?php 
    }
    ?>
                    <?php 
    if (class_exists('module_encrypt', false) && ($ticket_data_key['type'] == 'text' || $ticket_data_key['type'] == 'textarea')) {
        ?>
                    <tr>
                        <th>
                            <?php 
        echo _l('Encrypt Using Vault');
        ?>
                        </th>
                        <td>
                            <?php 
        $encryption_keys = module_encrypt::get_encrypt_keys();
        echo print_select_box($encryption_keys, 'encrypt_key_id', isset($ticket_data_key['encrypt_key_id']) ? $ticket_data_key['encrypt_key_id'] : false, '', true, 'encrypt_key_name', false);
        ?>
                        </td>
                    </tr>
                    <?php 
    }
    ?>
                </tbody>
            </table>

            <?php 
    $fieldset_data = array('heading' => array('type' => 'h3', 'main' => true, 'title' => 'Edit Ticket Data Key'), 'elements_before' => ob_get_clean());
    echo module_form::generate_fieldset($fieldset_data);
    unset($fieldset_data);
    $form_actions = array('class' => 'action_bar action_bar_center action_bar_single', 'elements' => array(array('type' => 'save_button', 'name' => 'butt_save', 'value' => _l('Save')), array('type' => 'delete_button', 'name' => 'butt_del', 'value' => _l('Delete'), 'onclick' => "return confirm('" . _l('Really delete this record?') . "');")));
    echo module_form::generate_form_actions($form_actions);
Ejemplo n.º 17
0
?>

		</td>
        <?php 
if (class_exists('module_envato', false)) {
    ?>

        <td width="27">
            <?php 
    echo _l('Envato:');
    ?>

        </td>
        <td>
            <?php 
    echo print_select_box(module_envato::get_envato_items_rel(), 'search[envato_item_id]', isset($search['envato_item_id']) ? $search['envato_item_id'] : '');
    ?>

        </td>
        <?php 
}
?>

		<td class="search_action">
			<?php 
echo create_link("Reset", "reset", module_ticket::link_open(false));
?>

			<?php 
echo create_link("Search", "submit");
?>
echo isset($data_field['order']) ? htmlspecialchars($data_field['order']) : '';
?>
" 
			/>
			(1, 2, 3, etc.. - go to visual editor for drag &amp; drop re-arrange)
		</td>
	</tr>
	<tr>
		<th>
			<?php 
echo _l('Type');
?>
		</th>
		<td>
			<?php 
echo print_select_box(array('text' => 'Text Box', 'textarea' => 'Multiline Text Area', 'select' => 'Select Box (set attributes= below)', 'radio' => 'Radio Buttons (set attributes= below)', 'currency' => 'Currency', 'url' => 'URL', 'number' => 'Number', 'date' => 'Date Select', 'time' => 'Time Select', 'checkbox' => 'Checkbox', 'checkbox_list' => 'Checkbox List (set attributes= below)', 'file' => 'File', 'wysiwyg' => 'WYSIWYG Rich Text', 'encrypted' => 'Encrypted', 'created_date_time' => '(info) Created Date/Time', 'created_date' => '(info) Created Date', 'created_time' => '(info) Created Time', 'created_by' => '(info) Created By Username', 'updated_date_time' => '(info) Updated Date/Time', 'updated_date' => '(info) Updated Date', 'updated_time' => '(info) Updated Time', 'updated_by' => '(info) Updated By Username'), 'field_type', isset($data_field['field_type']) ? $data_field['field_type'] : '', '', ' - select - ');
?>
		</td>
	</tr>
	<tr>
		<th>
			<?php 
echo _l('Type Data');
?>
		</th>
		<td>
			<textarea
			name="field_data" id="field_data" 
			rows="3" cols="40"
			><?php 
echo isset($data_field['field_data']) ? htmlspecialchars($data_field['field_data']) : '';
Ejemplo n.º 19
0
    ?>

                                </th>
                                <td>
                                    <?php 
    $c = array();
    $res = module_user::get_contacts(array('customer_id' => $invoice['customer_id']));
    while ($row = array_shift($res)) {
        $c[$row['user_id']] = $row['name'] . ' ' . $row['last_name'];
    }
    if ($invoice['user_id'] && !isset($c[$invoice['user_id']])) {
        // this option isn't in the listing. add it in.
        $user_temp = module_user::get_user($invoice['user_id'], false);
        $c[$invoice['user_id']] = $user_temp['name'] . ' ' . $user_temp['last_name'] . ' ' . _l('(under different customer)');
    }
    echo print_select_box($c, 'user_id', $invoice['user_id']);
    ?>

                                </td>
                            </tr>
                            <?php 
}
?>


						</tbody>
                        <?php 
module_extra::display_extras(array('owner_table' => 'invoice', 'owner_key' => 'invoice_id', 'owner_id' => $invoice['invoice_id'], 'layout' => 'table_row', 'allow_new' => module_job::can_i('create', 'Invoices'), 'allow_edit' => module_job::can_i('create', 'Invoices')));
?>

					</table>
Ejemplo n.º 20
0
    <table width="100%" border="0" cellspacing="0" cellpadding="2" class="tableclass tableclass_form">
        <tbody>
        <?php 
    foreach ($fields as $key => $val) {
        ?>
            <tr>
                <th class="width1">
                    <?php 
        echo _l($val[0]);
        ?>
                </th>
                <td>
                    <?php 
        // quick added hack for 'region' to display as a drop down
        if ($key == 'region_id' || $key == 'state_id' || $key == 'country_id') {
            echo print_select_box(get_col_vals('address', $key), 'address[' . $address_hash . '][' . $key . ']', isset($address[$key]) ? $address[$key] : '', '', false, false, true);
        } else {
            ?>
                        <input type="text" name="address[<?php 
            echo $address_hash;
            ?>
][<?php 
            echo $key;
            ?>
]" value="<?php 
            echo isset($address[$key]) ? htmlspecialchars($address[$key]) : '';
            ?>
" size="<?php 
            echo $val[1];
            ?>
" />
Ejemplo n.º 21
0
        echo $category['finance_category_id'];
        ?>
"><?php 
        echo htmlspecialchars($category['name']);
        ?>
</label> <br/>
                        <?php 
    }
    ?>

                    <input type="checkbox" name="finance_category_new_checked" value="new">
                    <input type="text" name="finance_category_new" value="">
                </div> &nbsp;
	<?php 
    $header_cats = ob_get_clean();
    $header_rows[] = array('sort_date' => array('data' => '<input type="text" name="transaction_date" class="date_field" value="' . print_date(time()) . '"> '), 'sort_name' => array('data' => '<input type="text" name="name" id="new_transaction_name">'), 'finance_description' => array('data' => '<input type="text" name="description">'), 'finance_customer' => array('data' => ''), 'sort_credit' => array('data' => currency('') . '<input type="text" name="credit" class="currency">', 'cell_class' => 'success_text'), 'sort_debit' => array('data' => currency('') . '<input type="text" name="debit" class="currency">', 'cell_class' => 'error_text'), 'sort_account' => array('data' => print_select_box(module_finance::get_accounts(), 'finance_account_id', '', '', true, 'name', true)), 'finance_categories' => array('data' => $header_cats), 'finance_tick' => array('data' => '<input type="submit" name="addnew" value="' . _l('Quick Add') . '" class="small_button">'));
    $table_manager->set_header_rows($header_rows);
}
$table_manager->set_rows($recent_transactions);
if (module_config::c('finance_list_show_totals', 1)) {
    $footer_rows = array();
    foreach ($finance_credit_total + $finance_debit_total as $currency_id => $foo) {
        $currency = get_single('currency', 'currency_id', $currency_id);
        $footer_rows[] = array('sort_date' => array('data' => ' ', 'cell_colspan' => 3), 'finance_customer' => array('data' => '<strong>' . _l('%s Totals:', $currency && isset($currency['code']) ? $currency['code'] : '') . '</strong>', 'cell_class' => 'text-right'), 'sort_credit' => array('data' => '<strong>' . dollar(isset($finance_credit_total[$currency_id]) ? $finance_credit_total[$currency_id] : 0, true, $currency_id) . '</strong>'), 'sort_debit' => array('data' => '<strong>' . dollar(isset($finance_debit_total[$currency_id]) ? $finance_debit_total[$currency_id] : 0, true, $currency_id) . '</strong>'), 'sort_account' => array('data' => ' ', 'cell_colspan' => 4));
    }
    $footer_rows[] = array('sort_date' => array('data' => ' ', 'cell_colspan' => 8), 'finance_tick' => array('data' => '<input type="button" name="link" value="' . _l('Link') . '" class="small_button" onclick="$(\'#link_go\').val(\'go\'); $(\'#quick_add_form\')[0].submit();">
						<input type="hidden" name="link_go" value="0" id="link_go">
                        ' . _hr('Combine transactions together. eg: an invoice payment history with corresponding bank statement transaction. Transactions need to be the same dollar amount to link successfully.'), 'cell_colspan' => 4));
    $table_manager->set_footer_rows($footer_rows);
}
$table_manager->pagination = true;
Ejemplo n.º 22
0
    ?>
            </td>
            <td>
                <input type="text" name="search[question]" value="<?php 
    echo isset($search['question']) ? htmlspecialchars($search['question']) : '';
    ?>
">
            </td>
            <td>
                <?php 
    echo _l('Search Products:');
    ?>
            </td>
            <td>
                <?php 
    echo print_select_box(module_faq::get_faq_products_rel(), 'search[faq_product_id]', isset($search['faq_product_id']) ? $search['faq_product_id'] : '');
    ?>
            </td>
            <td class="search_action">
                <?php 
    echo create_link("Reset", "reset", module_faq::link_open_public(-1));
    ?>
                <?php 
    echo create_link("Search", "submit");
    ?>
            </td>
        </tr>
    </table>
    <?php 
}
?>
Ejemplo n.º 23
0
    ?>
][date_done]" value="<?php 
    echo print_date($task_data['date_done']);
    ?>
" class="date_field" tabindex="14">
    </td>
    <?php 
}
?>
    <?php 
if (module_config::c('job_allow_staff_assignment', 1)) {
    $colspan++;
    ?>
        <td>
            <?php 
    echo print_select_box($staff_member_rel, 'job_task[' . $task_id . '][user_id]', isset($staff_member_rel[$task_data['user_id']]) ? $task_data['user_id'] : false, 'job_task_staff_list', '');
    ?>
        </td>
    <?php 
}
?>
    <td colspan="2" class="percentage_edit">
        <?php 
// offer up a new way to set a manual task percentage completed.
//_e('Completed:');
?>
            <span class="manual_percent_input" style="<?php 
echo $task_data['manual_percent'] < 0 ? 'display:none;' : '';
?>
">
            <input type="text" name="job_task[<?php 
Ejemplo n.º 24
0
                                    <td>
                                        <?php 
    $admins_rel = module_ticket::get_ticket_staff_rel();
    echo print_select_box($admins_rel, 'default_user_id', $ticket_account['default_user_id']);
    ?>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        <?php 
    echo _l('Default Type');
    ?>
                                    </th>
                                    <td>
                                        <?php 
    echo print_select_box(module_ticket::get_types(), 'default_type', $ticket_account['default_type'], '', true, 'name');
    ?>
	                                    <?php 
    _h('If a Ticket Type is selected, and it has a Default Staff member assigned in the Settings area, it will overwrite the default Staff Member from this page');
    ?>
                                    </td>
                                </tr>
                                <tr>
                                    <th>
                                        <?php 
    echo _l('IMAP Settings:');
    ?>
                                    </th>
                                    <td>

                                    </td>
Ejemplo n.º 25
0
                                    }
                                    if(false && module_ticket::can_i('edit','Related to')){
                                        echo print_select_box($c,'user_id',$ticket['user_id']);
                                    }else if($ticket['user_id']){
                                        echo isset($c[$ticket['user_id']]) ? $c[$ticket['user_id']] : 'N/A';
                                    }*/
        }));
    }
    $res = module_website::get_websites(array('customer_id' => $ticket['customer_id']));
    if (count($res)) {
        $fieldset_data['elements'][] = array('title' => _l('' . module_config::c('project_name_single', 'Website')), 'fields' => array(function () use($res, $ticket) {
            $c = array();
            while ($row = array_shift($res)) {
                $c[$row['website_id']] = $row['name'];
            }
            echo print_select_box($c, 'website_id', $ticket['website_id']);
        }));
    }
    if ((int) $ticket_id > 0) {
        $fieldset_data['elements'][] = array('title' => _l('Public link'), 'fields' => array(function () use($ticket_id) {
            ?>
 <a href="<?php 
            echo module_ticket::link_public($ticket_id);
            ?>
" target="_blank"><?php 
            _e('click here');
            ?>
</a> <?php 
        }));
    }
    echo module_form::generate_fieldset($fieldset_data);
Ejemplo n.º 26
0
			<td>
				<input type="checkbox" name="reminder" id="form_reminder" value="1" <?php 
    echo $note['reminder'] ? ' checked' : '';
    ?>
 />
                <?php 
    _e('for');
    ?>
				<?php 
    // we use the same staff listing we have in jobs.
    $staff_members = module_user::get_staff_members();
    $staff_member_rel = array();
    foreach ($staff_members as $staff_member) {
        $staff_member_rel[$staff_member['user_id']] = $staff_member['name'];
    }
    echo print_select_box($staff_member_rel, 'user_id', $note['user_id'], 'form_user_id', _l('All Staff'));
    ?>
                <?php 
    _h('Sets a dashboard reminder for the above date. This will appear on the selected users dashboard.<br><br>Untick to remove reminder.<br><br>Staff are users who have Job Task EDIT permissions.');
    ?>
			</td>
		</tr>
        <?php 
}
?>
		<tr>
			<th>
				<?php 
echo _l('Note');
?>
			</th>
Ejemplo n.º 27
0
?>
<h3><?php 
echo _l('Product Details');
?>
</h3>
<table border="0" cellspacing="0" cellpadding="2" class="tableclass tableclass_form tableclass_full">
    <tbody>
    <tr>
        <th class="width1">
            <?php 
echo _l('Product');
?>
        </th>
        <td>
            <?php 
echo print_select_box($products, 'faq_product_id', $current_faq_product_id, '', true);
?>
            <?php 
_e('Please select which product you are enquiring about');
?>
        </td>
    </tr>
    </tbody>
    <tbody id="faq_product_area">
    </tbody>
</table>



<script type="text/javascript">
    var ajax_faq_xhr = false;
Ejemplo n.º 28
0
    ?>
</th>
                        <td>
                            <?php 
    echo htmlspecialchars($member['email']);
    ?>
                        </td>
                    </tr>
                    <tr>
                        <th><?php 
    _e('Receive Email');
    ?>
</th>
                        <td>
                            <?php 
    echo print_select_box(get_yes_no(), 'receive_email[' . $member['newsletter_member_id'] . ']', isset($member['receive_email']) ? $member['receive_email'] : 1, '', false);
    ?>
                            <input type="submit" name="save" value="<?php 
    _e('Save');
    ?>
" class="submit_button">
                        </td>
                    </tr>
                    <tr>
                        <th class="width1"><?php 
    _e('Member Subscribed');
    ?>
</th>
                        <td>
                            <?php 
    echo print_date($member['join_date']);
Ejemplo n.º 29
0
                <input type="text" name="description" style="width: 350px;" id="description" value="<?php 
echo htmlspecialchars($template['description']);
?>
" />
            </td>
        </tr>
        <tr id="wysiwyg">
            <th>
                <?php 
echo _l('WYSIWYG');
?>

            </th>
            <td>
                <?php 
echo print_select_box(get_yes_no(), 'wysiwyg', isset($template['wysiwyg']) ? $template['wysiwyg'] : 0, '', false);
?>
 (advanced setting, don't change unless you know what you're doing)
            </td>
        </tr>
        <tr>
            <th>
                <?php 
echo _l('Default Text');
?>

            </th>
            <td valign="top">
                <textarea name="content" id="template_content" rows="10" cols="30" style="width:450px; height: 350px;"><?php 
echo htmlspecialchars($template['content']);
?>
Ejemplo n.º 30
0
        }
    }
    echo print_select_box($d, 'invoice_id', $finance['invoice_id'], '', _l(' - None - '));
    if ($finance['invoice_id']) {
        echo ' <a href="' . module_invoice::link_open($finance['invoice_id'], false) . '">' . _l('Open Invoice') . '</a>';
    }
}));
if (count($linked_staff_members)) {
    $fieldset_data['elements'][] = array('title' => 'Linked Staff', 'fields' => array(function () use(&$finance, $locked, $linked_staff_members) {
        ?>
 <input type="hidden" name="job_staff_expense" value="<?php 
        echo isset($finance['job_staff_expense']) ? (int) $finance['job_staff_expense'] : '';
        ?>
">
                    <?php 
        echo print_select_box($linked_staff_members, 'user_id', isset($finance['user_id']) ? $finance['user_id'] : 0, '', _l(' - None - '));
        if (isset($finance['user_id']) && $finance['user_id']) {
            echo ' <a href="' . module_user::link_open($finance['user_id'], false) . '">' . _l('Open User') . '</a>';
        }
    }));
}
$fieldset_data['elements'][] = array('title' => 'Attachment', 'fields' => array(function () use(&$finance, $locked, $finance_id) {
    if ((int) $finance_id > 0) {
        module_file::display_files(array('owner_table' => 'finance', 'owner_id' => $finance_id, 'layout' => 'gallery', 'editable' => module_security::is_page_editable() && module_finance::can_i('edit', 'Finance')));
    } else {
        _e('Please press save first');
    }
}));
echo module_form::generate_fieldset($fieldset_data);
unset($fieldset_data);
$form_actions = array('class' => 'action_bar action_bar_left', 'elements' => array(array('type' => 'save_button', 'name' => 'butt_save_return', 'value' => _l('Save and Return')), array('type' => 'save_button', 'name' => 'butt_save', 'value' => _l('Save'))));