<%@ page import="com.atlassian.jira.ManagerFactory,
                 com.atlassian.jira.config.properties.ApplicationProperties,
                 com.atlassian.jira.web.SessionKeys,
                 com.atlassian.jira.user.UserHistory,
                 com.opensymphony.util.TextUtils,
                 com.atlassian.jira.config.properties.APKeys"%>
<%@ taglib uri="webwork" prefix="webwork" %>

<jsp:include page="/template/standard/controlheader.jsp" />
<input type="text"
       name="<webwork:property value="parameters['name']"/>"
      <webwork:property value="parameters['size']">
         <webwork:if test=".">size="<webwork:property value="."/>"</webwork:if>
      </webwork:property>
      <webwork:property value="parameters['maxlength']">
         <webwork:if test=".">maxlength="<webwork:property value="."/>"</webwork:if>
      </webwork:property>
      <webwork:property value="parameters['nameValue']">
         <webwork:if test=".">value="<webwork:property value="."/>"</webwork:if>
      </webwork:property>
      <webwork:property value="parameters['disabled']">
         <webwork:if test="{parameters['disabled']}">DISABLED</webwork:if>
      </webwork:property>
      <webwork:property value="parameters['readonly']">
         <webwork:if test="{parameters['readonly']}">READONLY</webwork:if>
      </webwork:property>
      <webwork:property value="parameters['onkeyup']">
         <webwork:if test=".">onkeyup="<webwork:property value="."/>"</webwork:if>
      </webwork:property>
      <webwork:property value="parameters['tabindex']">
         <webwork:if test=".">tabindex="<webwork:property value="."/>"</webwork:if>
      </webwork:property>
      <webwork:property value="parameters['onchange']">
         <webwork:if test=".">onchange="<webwork:property value="."/>"</webwork:if>
      </webwork:property>
      <webwork:property value="parameters['style']">
         <webwork:if test=".">style="<webwork:property value="."/>"</webwork:if>
      </webwork:property>
>

<script language="javascript">
function openIssuePicker(formName, linkFieldName, currentissue, singleSelectOnly, showSubTasks, showSubTasksParent, selectedProjectId)
{
    var url = '<%= request.getContextPath() %>/secure/popups/IssuePicker.jspa?';
    url += 'formName=' + formName + '&';
    url += 'linkFieldName=' + linkFieldName + '&';
    url += 'currentIssue=' + currentissue + '&';
    url += 'singleSelectOnly=' + singleSelectOnly + '&';
    url += 'showSubTasks=' + showSubTasks + '&';
    url += 'showSubTasksParent=' + showSubTasksParent + '&';
    if (selectedProjectId != null)
    {
        url += 'selectedProjectId=' + selectedProjectId + '&';
    }

    var vWinUsers = window.open(url, 'UssueSelectorPopup', 'status=no,resizable=yes,top=100,left=200,width=620,height=500,scrollbars=yes,resizable');
    vWinUsers.opener = self;
	vWinUsers.focus();
}
</script>

    <a href="javascript:openIssuePicker('<webwork:property value="parameters['formname']" />', '<webwork:property value="parameters['name']"/>', '<webwork:property value="parameters['currentissue']"/>', '<webwork:property value="parameters['singleSelectOnly']"><webwork:if test="."><webwork:property value="."/></webwork:if><webwork:else>false</webwork:else></webwork:property>', '<webwork:property value="parameters['showSubTasks']"><webwork:if test="."><webwork:property value="."/></webwork:if><webwork:else>true</webwork:else></webwork:property>', '<webwork:property value="parameters['showSubTasksParent']"><webwork:if test="."><webwork:property value="."/></webwork:if><webwork:else>true</webwork:else></webwork:property>', <webwork:property value="parameters['selectedProjectId']"><webwork:if test=".">'<webwork:property value="."/>'</webwork:if><webwork:else>null</webwork:else></webwork:property>)"
       title="Quick link to recently viewed issues">[<webwork:text name="'linkissue.picker.selectissue'"/>]</a>
 <jsp:include page="/template/standard/controlfooter.jsp" />