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

Merge branch 'develop' into develop-next

parents c8731113 a80ee743
No related branches found
No related tags found
No related merge requests found
......@@ -156,8 +156,12 @@ class DynamicForm extends VerySimpleModel {
$inst = DynamicFormEntry::create(
array('form_id'=>$this->get('id'), 'sort'=>$sort)
);
if ($data)
$inst->setSource($data);
$inst->_fields = $this->_fields ?: null;
return $inst;
}
......@@ -1795,7 +1799,7 @@ class SelectionField extends FormField {
function getSearchMethods() {
return array(
'set' => __('has a value'),
'notset' => __('does not have a value'),
'nset' => __('does not have a value'),
'includes' => __('includes'),
'!includes' => __('does not include'),
);
......@@ -1804,7 +1808,7 @@ class SelectionField extends FormField {
function getSearchMethodWidgets() {
return array(
'set' => null,
'notset' => null,
'nset' => null,
'includes' => array('ChoiceField', array(
'choices' => $this->getChoices(),
'configuration' => array('multiselect' => true),
......
......@@ -90,7 +90,7 @@ class Ticket2PDF extends mPDFWithLocalImages
return;
$html = ob_get_clean();
$this->SetAutoFont();
$this->SetAutoFont(AUTOFONT_RTL);
$this->WriteHtml($html, 0, true, true);
}
}
......@@ -120,7 +120,7 @@ class Task2PDF extends mPDFWithLocalImages {
ob_start();
include STAFFINC_DIR.'templates/task-print.tmpl.php';
$html = ob_get_clean();
$this->SetAutoFont();
$this->SetAutoFont(AUTOFONT_RTL);
$this->WriteHtml($html, 0, true, true);
}
......
......@@ -10,13 +10,15 @@ $users = User::objects()
if ($_REQUEST['query']) {
$search = $_REQUEST['query'];
$users->filter(Q::any(array(
$filter = Q::any(array(
'emails__address__contains' => $search,
'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']);
}
......
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