本文整理汇总了PHP中module_form::prevent_exit方法的典型用法代码示例。如果您正苦于以下问题:PHP module_form::prevent_exit方法的具体用法?PHP module_form::prevent_exit怎么用?PHP module_form::prevent_exit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module_form
的用法示例。
在下文中一共展示了module_form::prevent_exit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$template = module_template::get_template($template_id);
}
if (!$template) {
$template_id = 'new';
$template = array('template_id' => 'new', 'template_key' => '', 'description' => '', 'content' => '', 'name' => '', 'default_text' => '', 'wysiwyg' => 1);
module_security::sanatise_data('template', $template);
}
?>
<form action="<?php
echo module_template::link_open(false);
?>
" method="post" id="template_form">
<?php
module_form::prevent_exit(array('valid_exits' => array('.submit_button')));
if ($template) {
// is there a company template?
if (class_exists('module_company', false) && defined('COMPANY_UNIQUE_CONFIG') && COMPANY_UNIQUE_CONFIG) {
if (module_company::get_current_logged_in_company_id()) {
// we restrict this template editing to only this template.
$company_id = module_company::get_current_logged_in_company_id();
} else {
$company_id = isset($_REQUEST['company_id']) ? (int) $_REQUEST['company_id'] : module_company::get_current_logged_in_company_id();
}
$new_template = module_company::template_get_company($template['template_id'], $template, $company_id);
if ($new_template) {
$template = $new_template;
}
module_company::template_edit_form($template_id, $company_id);
}
示例2: array
$(function(){
ucm.ticket.init();
});
</script>
<form action="" method="post" id="ticket_form" enctype="multipart/form-data">
<input type="hidden" name="_process" value="save_ticket" />
<input type="hidden" name="ticket_id" value="<?php
echo $ticket['ticket_id'];
?>
" />
<?php
echo $action_buttons;
$fields = array('fields' => array('subject' => 'Subject'));
module_form::set_required($fields);
module_form::prevent_exit(array('valid_exits' => array('.submit_button', '.save_task', '.notify', '.delete', '.attachment_link')));
hook_handle_callback('layout_column_half', 1, '35');
/** TICKET DETAILS */
$responsive_summary = array();
$responsive_summary[] = '#' . module_ticket::ticket_number($ticket['ticket_id']);
if ($ticket['status_id'] == 2 || $ticket['status_id'] == 3 || $ticket['status_id'] == 5) {
$responsive_summary[] = ordinal($ticket['position']);
}
$responsive_summary[] = htmlspecialchars($ticket['subject']);
$fieldset_data = array('heading' => array('title' => _l('Ticket Details'), 'type' => 'h3', 'responsive' => array('summary' => implode(', ', $responsive_summary))), 'elements' => array(array('title' => _l('Ticket Number'), 'fields' => array(function () use($ticket) {
?>
<span class="ticket_status_<?php
echo (int) $ticket['status_id'];
?>
"><?php
示例3: htmlspecialchars
" />
<?php
}
?>
<input type="hidden" name="hourly_rate" value="<?php
echo htmlspecialchars($invoice['hourly_rate']);
?>
" />
<input type="hidden" name="_redirect" value="" id="form_redirect" />
<?php
$fields = array('fields' => array('name' => 'Name'));
module_form::set_required($fields);
module_form::prevent_exit(array('valid_exits' => array('.submit_button', '.save_invoice_item', '.save_invoice_payment', '.delete', '.apply_discount')));
hook_handle_callback('layout_column_half', 1, '35');
/* INVOICE DETAILS */
$fieldset_data = array('heading' => array('type' => 'h3', 'title' => 'Invoice Details'), 'class' => 'tableclass tableclass_form tableclass_full', 'elements' => array(array('title' => 'Invoice #', 'field' => array('type' => 'text', 'name' => 'name', 'value' => $invoice['name'])), array('title' => 'Status', 'field' => array('type' => 'select', 'name' => 'status', 'value' => $invoice['status'], 'blank' => false, 'options' => module_invoice::get_statuses(), 'allow_new' => true)), array('title' => 'Created Date', 'field' => array('type' => 'date', 'name' => 'date_create', 'value' => print_date($invoice['date_create']))), array('title' => 'Due Date', 'fields' => array(array('type' => 'date', 'name' => 'date_due', 'value' => print_date($invoice['date_due'])), array('type' => 'checkbox', 'name' => 'overdue_email_auto', 'value' => isset($invoice['overdue_email_auto']) && $invoice['overdue_email_auto'], 'label' => 'Auto Overdue Email', 'help' => 'When this Invoice becomes overdue an email will be automatically sent to the customer. Settings > Invoice for more options.'))), array('title' => 'Sent Date', 'hidden' => !(int) $invoice_id, 'field' => array('type' => 'date', 'name' => 'date_sent', 'id' => 'date_sent', 'value' => print_date($invoice['date_sent']))), array('title' => 'Paid Date', 'hidden' => !(int) $invoice_id, 'field' => array('type' => 'date', 'name' => 'date_paid', 'value' => print_date($invoice['date_paid']), 'help' => 'To mark an invoice as paid please record a full payment against this invoice. Once that is done you can adjust the date here.'))), 'extra_settings' => array('owner_table' => 'invoice', 'owner_key' => 'invoice_id', 'owner_id' => $invoice['invoice_id'], 'layout' => 'table_row', 'allow_new' => module_invoice::can_i('create', 'Invoices'), 'allow_edit' => module_invoice::can_i('edit', 'Invoices')));
$incrementing = false;
if (!isset($invoice['taxes']) || !count($invoice['taxes'])) {
$invoice['taxes'][] = array();
// at least have 1?
}
foreach ($invoice['taxes'] as $tax) {
if (isset($tax['increment']) && $tax['increment']) {
$incrementing = true;
}
}
ob_start();
?>
示例4: echo
<input type="hidden" name="customer_id" value="<?php
echo (int) $job['customer_id'];
?>
" />
<input type="hidden" name="quote_id" value="<?php
echo (int) $job['quote_id'];
?>
" />
<?php
$fields = array('fields' => array('name' => 'Name'));
module_form::set_required($fields);
//module_form::set_default_field('task_desc_new');
module_form::set_default_field('job_name');
module_form::prevent_exit(array('valid_exits' => array('.submit_button', '.save_task', '.delete', '.task_defaults')));
hook_handle_callback('layout_column_half', 1, '35');
/**** JOB DETAILS ****/
$fieldset_data = array('heading' => array('type' => 'h3', 'title' => 'Job Details'), 'class' => 'tableclass tableclass_form tableclass_full', 'elements' => array('name' => array('title' => 'Job Title', 'field' => array('type' => 'text', 'name' => 'name', 'value' => $job['name'])), 'type' => array('title' => 'Type', 'field' => array('type' => 'select', 'name' => 'type', 'value' => $job['type'], 'blank' => false, 'options' => module_job::get_types(), 'allow_new' => true)), 'hourly_rate' => array('title' => 'Hourly Rate', 'ignore' => !module_invoice::can_i('view', 'Invoices'), 'field' => array('type' => 'currency', 'name' => 'hourly_rate', 'value' => number_out($job['hourly_rate']))), 'status' => array('title' => 'Status', 'field' => array('type' => 'select', 'name' => 'status', 'value' => $job['status'], 'blank' => false, 'options' => module_job::get_statuses(), 'allow_new' => true)), 'date_quote' => array('title' => 'Quote Date', 'ignore' => !module_config::c('job_allow_quotes', 0), 'field' => array('type' => 'date', 'name' => 'date_quote', 'value' => print_date($job['date_quote']), 'help' => 'This is the date the Job was quoted to the Customer. Once this Job Quote is approved, the Start Date will be set below.')), 'date_start' => array('title' => 'Start Date', 'field' => array('type' => 'date', 'name' => 'date_start', 'value' => print_date($job['date_start']), 'help' => 'This is the date the Job is scheduled to start work. This can be a date in the future. If you have the Calendar, this is the date that will be used for the Calendar event.')), 'time_start' => array('title' => 'Start Time', 'ignore' => !(class_exists('module_calendar', false) && module_config::c('job_show_times', 1)), 'field' => array('type' => 'time', 'name' => 'time_start', 'value' => isset($job['time_start']) ? $job['time_start'] : '', 'help' => 'This is the time the Job is scheduled to start. If you have the Calendar, this is the time that will be used for the Calendar event.')), 'time_end' => array('title' => 'End Time', 'ignore' => !(class_exists('module_calendar', false) && module_config::c('job_show_times', 1)), 'field' => array('type' => 'time', 'name' => 'time_end', 'value' => isset($job['time_end']) ? $job['time_end'] : '', 'help' => 'This is the time the Job is scheduled to finish. If you have the Calendar, this is the time that will be used for the Calendar event.')), 'date_due' => array('title' => 'Due Date', 'field' => array('type' => 'date', 'name' => 'date_due', 'value' => print_date($job['date_due']))), 'date_completed' => array('title' => 'Finished Date', 'field' => array('type' => 'date', 'name' => 'date_completed', 'value' => print_date($job['date_completed']))), 'user_id' => array('title' => 'Staff Member', 'ignore' => !module_config::c('job_allow_staff_assignment', 1), 'field' => array('type' => 'select', 'options' => $staff_member_rel, 'name' => 'user_id', 'value' => $job['user_id'], 'blank' => false, 'help' => 'Assign a staff member to this job. You can also assign individual tasks to different staff members. Staff members are users who have EDIT permissions on Job Tasks.'))), 'extra_settings' => array('owner_table' => 'job', 'owner_key' => 'job_id', 'owner_id' => $job['job_id'], 'layout' => 'table_row', 'allow_new' => module_job::can_i('create', 'Jobs'), 'allow_edit' => module_job::can_i('create', 'Jobs')));
$incrementing = false;
if (!isset($job['taxes']) || !count($job['taxes'])) {
$job['taxes'][] = array();
// at least have 1?
}
foreach ($job['taxes'] as $tax) {
if (isset($tax['increment']) && $tax['increment']) {
$incrementing = true;
}
}
ob_start();
?>