Skip to content
Snippets Groups Projects
Commit f3bb9113 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #3070 from greezybacon/issue/sequence-create


oops: Fix call to missing create(), only fetch user form once

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 8dbd67c5 735bb203
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ class SequenceAjaxAPI extends AjaxController {
foreach ($_POST['seq'] as $id=>$info) {
if (strpos($id, 'new-') === 0) {
unset($info['id']);
$sequences[] = Sequence::create($info);
$sequences[] = new Sequence($info);
}
else {
foreach ($sequences as $s) {
......
......@@ -114,14 +114,16 @@ if ($form && count($langs) > 1) { ?>
</tbody>
</table>
<table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
<?php if ($form && $form->get('type') == 'T') { ?>
<?php if ($form && $form->get('type') == 'T') {
$uform = UserForm::objects()->one();
?>
<thead>
<tr>
<th colspan="7">
<em><strong><?php echo __('User Information Fields'); ?></strong>
<?php echo sprintf(__('(These fields are requested for new tickets
via the %s form)'),
UserForm::objects()->one()->get('title')); ?></em>
$uform->get('title')); ?></em>
</th>
</tr>
<tr>
......@@ -135,9 +137,8 @@ if ($form && count($langs) > 1) { ?>
</thead>
<tbody>
<?php
$uform = UserForm::objects()->all();
$ftypes = FormField::allTypes();
foreach ($uform[0]->getFields() as $f) {
foreach ($uform->getFields() as $f) {
if (!$f->isVisibleToUsers()) continue;
?>
<tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment