1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-29 11:10:18 +02:00

[ticket/11795] Move find user JS to forum_fn

Move JavaScript from user search results to forum_fn.js

PHPBB3-11795
This commit is contained in:
Vjacheslav Trushkin
2013-08-30 15:20:14 +03:00
parent 0a9ba5415c
commit e6d87c5bc0
3 changed files with 48 additions and 42 deletions

View File

@@ -1,43 +1,3 @@
<!-- IF S_IN_SEARCH_POPUP -->
<!-- You should retain this javascript in your own template! -->
<script type="text/javascript">
// <![CDATA[
function insert_user(user)
{
opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = ( opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value.length && opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.type == "textarea" ) ? opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value + "\n" + user : user;
}
function insert_marked(users)
{
if (typeof(users.length) == "undefined")
{
if (users.checked)
{
insert_user(users.value);
}
}
else if (users.length > 0)
{
for (i = 0; i < users.length; i++)
{
if (users[i].checked)
{
insert_user(users[i].value);
}
}
}
self.close();
}
function insert_single(user)
{
opener.document.forms['{S_FORM_NAME}'].{S_FIELD_NAME}.value = user;
self.close();
}
// ]]>
</script>
<!-- ENDIF -->
<h2 class="solo">{L_FIND_USERNAME}</h2>
<form method="post" action="{S_MODE_ACTION}" id="search_memberlist">