diff --git a/e107_admin/links.php b/e107_admin/links.php index 6eb396ee0..61439a81c 100644 --- a/e107_admin/links.php +++ b/e107_admin/links.php @@ -69,7 +69,7 @@ class links_admin_ui extends e_admin_ui protected $batchDelete = true; protected $batchCopy = true; protected $listOrder = 'link_category,link_order ASC'; - protected $listSorting = true; // TODO - should enable the 'sort' icon in the 'options' column. + protected $listSorting = true; public $current_parent = 0; @@ -78,7 +78,7 @@ class links_admin_ui extends e_admin_ui protected $fields = array( 'checkboxes' => array('title'=> '', 'width' => '3%','forced' => true, 'thclass' => 'center first','class' => 'center first'), 'link_button' => array('title'=> LAN_ICON, 'type'=>'icon', 'width'=>'5%', 'thclass' => 'center', 'class'=>'center'), - 'link_id' => array('title'=> LAN_ID, 'noedit'=>TRUE), + 'link_id' => array('title'=> LAN_ID, 'type'=>'text','readParms'=>'link=link_url&target=dialog','noedit'=>TRUE), 'link_name' => array('title'=> LCLAN_15, 'width'=>'auto','type'=>'text', 'inline'=>true, 'required' => true, 'validate' => true), 'link_category' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width' => 'auto'), diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 0bcf52071..fc5b4a64b 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -2172,12 +2172,17 @@ class e_form $ext = vartrue($parms['target']) =='blank' ? " rel='external' " : ""; // new window $modal = vartrue($parms['target']) =='modal' ? " data-toggle='modal' data-cache='false' data-target='#uiModal' " : ""; + $data = $this->getController()->getListModel()->toArray(); if($parms['link'] == 'sef') //XXX @Miro - Thoughts? - { - $data = $this->getController()->getListModel()->toArray(); + { $urlData = $this->getController()->getUrl(); $link = e107::getUrl()->create($urlData['profile'], $data); } + elseif(vartrue($data[$parms['link']])) // support for a field-name as the link. eg. link_url. + { + $link = $tp->replaceConstants(vartrue($data[$parms['link']])); + } + $value = "".$value.""; }