From 3ba4b8af4f7eed24d4f04527dc4eb7e3b40ac21c Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Fri, 2 Jan 2015 01:39:26 +0000 Subject: [PATCH] forms: Use form's name as the heading on edit. Show the form title on edit instead of "Custom Form" - which can be misleading since the user might be editing a built-in form. --- include/staff/dynamic-form.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php index 4b1b852a0..f5518ee02 100644 --- a/include/staff/dynamic-form.inc.php +++ b/include/staff/dynamic-form.inc.php @@ -2,7 +2,7 @@ $info=array(); if($form && $_REQUEST['a']!='add') { - $title = __('Update custom form section'); + $title = __('Update form section'); $action = 'update'; $url = "?id=".urlencode($_REQUEST['id']); $submit_text=__('Save Changes'); @@ -23,14 +23,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <input type="hidden" name="do" value="<?php echo $action; ?>"> <input type="hidden" name="a" value="<?php echo $action; ?>"> <input type="hidden" name="id" value="<?php echo $info['id']; ?>"> - <h2><?php echo __('Custom Form'); ?></h2> + <h2><?php echo $form ? Format::htmlchars($form->getTitle()) : __('Custom Form'); ?></h2> <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> <th colspan="2"> <h4><?php echo $title; ?></h4> <em><?php echo __( - 'Custom forms are used to allow custom data to be associated with tickets' + 'Forms are used to allow for collection of custom data' ); ?></em> </th> </tr> -- GitLab