aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorhabeascodice <habeascodice@federated.social>2014-10-09 01:06:59 -0700
committerhabeascodice <habeascodice@federated.social>2014-10-09 01:06:59 -0700
commit7a106cf60cfa005ec6d8c35f922dc57b9af0175e (patch)
tree34b0593f9922f33d9e2c2c517ba9f6e9d3490c44 /include/text.php
parent737a3362d50900a5f26aada14f515c5c857a762f (diff)
parentfc0576acf810019a0c168bfa4dc4a2175ae0b505 (diff)
downloadvolse-hubzilla-7a106cf60cfa005ec6d8c35f922dc57b9af0175e.tar.gz
volse-hubzilla-7a106cf60cfa005ec6d8c35f922dc57b9af0175e.tar.bz2
volse-hubzilla-7a106cf60cfa005ec6d8c35f922dc57b9af0175e.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php36
1 files changed, 17 insertions, 19 deletions
diff --git a/include/text.php b/include/text.php
index 22cf17866..0e38de2d2 100644
--- a/include/text.php
+++ b/include/text.php
@@ -815,28 +815,26 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
function search($s,$id='search-box',$url='/search',$save = false) {
$a = get_app();
- $o = '<div id="' . $id . '">';
- $o .= '<form action="' . $a->get_baseurl((stristr($url,'network')) ? true : false) . $url . '" method="get" >';
- $o .= '<input type="text" class="icon-search" name="search" id="search-text" placeholder="&#xf002;" value="' . $s .'" onclick="this.submit();" />';
- $o .= '<input class="search-submit btn btn-default" type="submit" name="submit" id="search-submit" value="' . t('Search') . '" />';
- if(feature_enabled(local_user(),'savedsearch'))
- $o .= '<input class="search-save btn btn-default" type="submit" name="save" id="search-save" value="' . t('Save') . '" />';
- $o .= '</form></div>';
- return $o;
+ return replace_macros(get_markup_template('searchbox.tpl'),array(
+ '$s' => $s,
+ '$id' => $id,
+ '$action_url' => $a->get_baseurl((stristr($url,'network')) ? true : false) . $url,
+ '$search_label' => t('Search'),
+ '$save_label' => t('Save'),
+ '$savedsearch' => feature_enabled(local_user(),'savedsearch')
+ ));
}
function searchbox($s,$id='search-box',$url='/search',$save = false) {
- $a = get_app();
- $o = '<div id="' . $id . '">';
- $o .= '<form action="' . z_root() . '/' . $url . '" method="get" >';
- $o .= '<input type="hidden" name="f" value="" />';
- $o .= '<input type="text" class="icon-search" name="search" id="search-text" placeholder="&#xf002;" value="' . $s .'" onclick="this.submit();" />';
- $o .= '<input type="submit" name="submit" class="btn btn-default" id="search-submit" value="' . t('Search') . '" />';
- if(feature_enabled(local_user(),'savedsearch'))
- $o .= '<input type="submit" name="searchsave" class="btn btn-default" id="search-save" value="' . t('Save') . '" />';
- $o .= '</form></div>';
- return $o;
+ return replace_macros(get_markup_template('searchbox.tpl'),array(
+ '$s' => $s,
+ '$id' => $id,
+ '$action_url' => z_root() . '/' . $url,
+ '$search_label' => t('Search'),
+ '$save_label' => t('Save'),
+ '$savedsearch' => feature_enabled(local_user(),'savedsearch')
+ ));
}
@@ -2061,4 +2059,4 @@ function extra_query_args() {
}
}
return $s;
-} \ No newline at end of file
+}