Skip to content
Snippets Groups Projects
Commit e4eb0fbc authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge pull request #935 from protich/issue/934


Show properties config button if the form exists

Reviewed-By: default avatarJared Hancock <jared@osticket.com>
Reviewed-By: @stf675
parents 294a9d60 b3e8e253
No related branches found
No related tags found
No related merge requests found
......@@ -916,6 +916,10 @@ class DynamicList extends VerySimpleModel {
return $this->_form;
}
function getForm() {
return $this->getConfigurationForm();
}
function save($refetch=false) {
if (count($this->dirty))
$this->set('updated', new SqlFunction('NOW'));
......
......@@ -220,7 +220,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
value="<?php echo $i->get('sort'); ?>"/></td>
<td><input type="text" size="40" name="value-<?php echo $id; ?>"
value="<?php echo $i->get('value'); ?>"/>
<?php if ($form->getFields()) { ?>
<?php if ($form && $form->getFields()) { ?>
<a class="action-button" style="float:none;overflow:inherit"
href="#ajax.php/list/item/<?php
echo $i->get('id'); ?>/properties"
......
......@@ -6,9 +6,8 @@ $list=null;
if($_REQUEST['id'] && !($list=DynamicList::lookup($_REQUEST['id'])))
$errors['err']='Unknown or invalid dynamic list ID.';
if ($list) {
$form = DynamicForm::lookup(array('type'=>'L'.$_REQUEST['id']));
}
if ($list)
$form = $list->getForm();
if($_POST) {
$fields = array('name', 'name_plural', 'sort_mode', 'notes');
......
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