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

Show properties config button if the form exists

parent 294a9d60
Branches
Tags
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.
Please register or to comment