diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 14:58:52 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 14:58:52 -0300 |
commit | 2d9b20157957a55bd83875775085ed31c9062577 (patch) | |
tree | f051d6d805a3448ea243379a2457be8d67dcfa5f /views/default/translation_editor/search.php | |
download | elgg-2d9b20157957a55bd83875775085ed31c9062577.tar.gz elgg-2d9b20157957a55bd83875775085ed31c9062577.tar.bz2 |
Squashed 'mod/translation_editor/' content from commit 9d86955
git-subtree-dir: mod/translation_editor
git-subtree-split: 9d86955e6d8b6807578f5a9da0346ac1a146881c
Diffstat (limited to 'views/default/translation_editor/search.php')
-rw-r--r-- | views/default/translation_editor/search.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/views/default/translation_editor/search.php b/views/default/translation_editor/search.php new file mode 100644 index 000000000..541b33123 --- /dev/null +++ b/views/default/translation_editor/search.php @@ -0,0 +1,43 @@ +<?php
+
+ $current_language = $vars["current_language"];
+ $q = $vars["query"];
+ $in_search = $vars["in_search"];
+
+ if(empty($q)){
+ $q = elgg_echo("translation_editor:forms:search:default");
+ }
+
+ // build form
+ $form_data .= "<table><tr><td>";
+
+ $form_data .= elgg_view("input/text", array("name" => "translation_editor_search", "value" => $q));
+
+ $form_data .= "</td><td> ";
+
+ $form_data .= elgg_view("input/hidden", array("name" => "language", "value" => $current_language));
+ $form_data .= elgg_view("input/submit", array("value" => elgg_echo("search")));
+
+ $form_data .= "</td></tr></table>";
+ $form = elgg_view("input/form", array("body" => $form_data,
+ "id" => "translation_editor_search_form",
+ "action" => $vars["url"] . "translation_editor/search",
+ "disable_security" => true));
+
+ echo $form;
+ echo "<br />";
+
+?>
+<script type="text/javascript">
+ $(document).ready(function(){
+ $('#translation_editor_search_form input[name="translation_editor_search"]').focus(function(){
+ if($(this).val() == "<?php echo elgg_echo("translation_editor:forms:search:default"); ?>"){
+ $(this).val("");
+ }
+ }).blur(function(){
+ if($(this).val() == ""){
+ $(this).val("<?php echo elgg_echo("translation_editor:forms:search:default"); ?>");
+ }
+ });
+ });
+</script>
\ No newline at end of file |