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

Merge branch 'develop' into 1.10.x

parents f5776974 a80ee743
Branches
Tags
No related merge requests found
...@@ -155,8 +155,12 @@ class DynamicForm extends VerySimpleModel { ...@@ -155,8 +155,12 @@ class DynamicForm extends VerySimpleModel {
$inst = DynamicFormEntry::create( $inst = DynamicFormEntry::create(
array('form_id'=>$this->get('id'), 'sort'=>$sort) array('form_id'=>$this->get('id'), 'sort'=>$sort)
); );
if ($data) if ($data)
$inst->setSource($data); $inst->setSource($data);
$inst->_fields = $this->_fields ?: null;
return $inst; return $inst;
} }
...@@ -1786,7 +1790,7 @@ class SelectionField extends FormField { ...@@ -1786,7 +1790,7 @@ class SelectionField extends FormField {
function getSearchMethods() { function getSearchMethods() {
return array( return array(
'set' => __('has a value'), 'set' => __('has a value'),
'notset' => __('does not have a value'), 'nset' => __('does not have a value'),
'includes' => __('includes'), 'includes' => __('includes'),
'!includes' => __('does not include'), '!includes' => __('does not include'),
); );
...@@ -1795,7 +1799,7 @@ class SelectionField extends FormField { ...@@ -1795,7 +1799,7 @@ class SelectionField extends FormField {
function getSearchMethodWidgets() { function getSearchMethodWidgets() {
return array( return array(
'set' => null, 'set' => null,
'notset' => null, 'nset' => null,
'includes' => array('ChoiceField', array( 'includes' => array('ChoiceField', array(
'choices' => $this->getChoices(), 'choices' => $this->getChoices(),
'configuration' => array('multiselect' => true), 'configuration' => array('multiselect' => true),
......
...@@ -86,7 +86,7 @@ class Ticket2PDF extends mPDFWithLocalImages ...@@ -86,7 +86,7 @@ class Ticket2PDF extends mPDFWithLocalImages
return; return;
$html = ob_get_clean(); $html = ob_get_clean();
$this->SetAutoFont(); $this->SetAutoFont(AUTOFONT_RTL);
$this->WriteHtml($html, 0, true, true); $this->WriteHtml($html, 0, true, true);
} }
} }
...@@ -116,7 +116,7 @@ class Task2PDF extends mPDFWithLocalImages { ...@@ -116,7 +116,7 @@ class Task2PDF extends mPDFWithLocalImages {
ob_start(); ob_start();
include STAFFINC_DIR.'templates/task-print.tmpl.php'; include STAFFINC_DIR.'templates/task-print.tmpl.php';
$html = ob_get_clean(); $html = ob_get_clean();
$this->SetAutoFont(); $this->SetAutoFont(AUTOFONT_RTL);
$this->WriteHtml($html, 0, true, true); $this->WriteHtml($html, 0, true, true);
} }
......
...@@ -10,13 +10,15 @@ $users = User::objects() ...@@ -10,13 +10,15 @@ $users = User::objects()
if ($_REQUEST['query']) { if ($_REQUEST['query']) {
$search = $_REQUEST['query']; $search = $_REQUEST['query'];
$users->filter(Q::any(array( $filter = Q::any(array(
'emails__address__contains' => $search, 'emails__address__contains' => $search,
'name__contains' => $search, 'name__contains' => $search,
'org__name__contains' => $search, 'org__name__contains' => $search,
'cdata__phone__contains' => $search, ));
// TODO: Add search for cdata if (UserForm::getInstance()->getField('phone'))
))); $filter->add(array('cdata__phone__contains' => $search));
$users->filter($filter);
$qs += array('query' => $_REQUEST['query']); $qs += array('query' => $_REQUEST['query']);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment