File: /var/www/html/unitime/target/unitime-4.8/user/instructor.jspf
<%--
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*
--%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="tt" uri="http://www.unitime.org/tags-custom" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="loc" uri="http://www.unitime.org/tags-localization" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<loc:bundle name="CourseMessages"><s:set var="msg" value="#attr.MSG"/>
<loc:bundle name="ConstantsMessages" id="CONST"><s:set var="const" value="#attr.CONST"/>
<tt:confirm name="confirmDelete"><loc:message name="confirmDeleteInstructor"/></tt:confirm>
<c:set var="operation" value="${param.operation}" scope="page"/>
<c:set var="instructorId" value="${param.instructorId}" scope="page"/>
<TR>
<TD valign="middle" colspan='2'>
<tt:section-header>
<tt:section-title> </tt:section-title>
<s:if test="#attr.operation == 'add'">
<s:submit accesskey='%{#msg.accessSaveInstructor()}' name='op' value='%{#msg.actionSaveInstructor()}'
title='%{#msg.titleSaveInstructor(#msg.accessSaveInstructor())}'/>
</s:if>
<s:if test="#attr.operation == 'update'">
<s:submit accesskey='%{#msg.accessUpdateInstructor()}' name='op' value='%{#msg.actionUpdateInstructor()}'
title='%{#msg.titleUpdateInstructor(#msg.accessUpdateInstructor())}'/>
<sec:authorize access="hasPermission(#form.instructorId, 'DepartmentalInstructor', 'InstructorDelete')">
<s:submit accesskey='%{#msg.accessDeleteInstructor()}' name='op' value='%{#msg.actionDeleteInstructor()}'
title='%{#msg.titleDeleteInstructor(#msg.accessDeleteInstructor())}'
onclick="return confirmDelete();"/>
</sec:authorize>
</s:if>
<s:submit accesskey='%{#msg.accessLookupInstructor()}' name='op' value='%{#msg.actionLookupInstructor()}'
title='%{#msg.titleLookupInstructor(#msg.accessLookupInstructor())}'/>
<s:if test="form.previousId != null">
<s:submit accesskey='%{#msg.accessPreviousInstructor()}' name='op' value='%{#msg.actionPreviousInstructor()}'
title='%{#msg.titlePreviousInstructorWithUpdate(#msg.accessPreviousInstructor())}'/>
</s:if>
<s:if test="form.nextId != null">
<s:submit accesskey='%{#msg.accessNextInstructor()}' name='op' value='%{#msg.actionNextInstructor()}'
title='%{#msg.titleNextInstructorWithUpdate(#msg.accessNextInstructor())}'/>
</s:if>
<s:if test="#attr.operation == 'add'">
<s:submit accesskey='%{#msg.accessBackToInstructors()}' name='op' value='%{#msg.actionBackToInstructors()}'
title='%{#msg.titleBackToInstructors(#msg.accessBackToInstructors())}'/>
</s:if>
<s:if test="#attr.operation == 'update'">
<s:submit accesskey='%{#msg.accessBackToDetail()}' name='op' value='%{#msg.actionBackToDetail()}'
title='%{#msg.titleBackToDetail(#msg.accessBackToDetail())}'/>
</s:if>
</tt:section-header>
</TD>
</TR>
<s:if test="!fieldErrors.isEmpty()">
<TR>
<TD colspan="2" align="left" class="errorTable">
<div class='errorHeader'><loc:message name="formValidationErrors"/></div><s:fielderror/>
</TD>
</TR>
</s:if>
<TR>
<TD><loc:message name="propertyExternalId"/></TD>
<TD>
<tt:propertyEquals name="tmtbl.instructor.allowExternalIdEdit" value="true">
<s:textfield name="form.puId" maxlength="40" size="10" id="uid"/>
</tt:propertyEquals>
<tt:propertyNotEquals name="tmtbl.instructor.allowExternalIdEdit" value="true">
<s:property value="form.puId"/>
<s:hidden name="form.puId"/>
</tt:propertyNotEquals>
</TD>
</TR>
<TR>
<TD><loc:message name="propertyAccountName"/></TD>
<TD>
<s:textfield name="form.careerAcct" maxlength="20" size="20"/>
</TD>
</TR>
<TR>
<TD><loc:message name="propertyFirstName"/></TD>
<TD>
<s:textfield name="form.fname" maxlength="100" size="30" id="fname"/>
<s:submit type="button" value="%{#msg.actionLookupInstructor()}" onclick="lookup(); return false;" cssClass="btn"/>
</TD>
</TR>
<TR>
<TD><loc:message name="propertyMiddleName"/></TD>
<TD>
<s:textfield name="form.mname" maxlength="100" size="30" id="mname" />
</TD>
</TR>
<TR>
<TD><loc:message name="propertyLastName"/> <font class="reqField">*</font></TD>
<TD>
<s:textfield name="form.lname" maxlength="100" size="30" id="lname" />
</TD>
</TR>
<TR>
<TD><loc:message name="propertyAcademicTitle"/></TD>
<TD>
<s:textfield name="form.title" maxlength="50" size="20" id="title" />
</TD>
</TR>
<TR>
<TD><loc:message name="propertyEmail"/></TD>
<TD>
<s:textfield name="form.email" maxlength="200" size="50" id="email" />
</TD>
</TR>
<TR>
<TD><loc:message name="propertyDepartment"/></TD>
<TD>
<s:property value="form.deptName"/>
</TD>
</TR>
<s:if test="#request.posTypeList != null">
<TR>
<TD><loc:message name="propertyInstructorPosition"/></TD>
<TD>
<s:select name="form.posType" list="#request.posTypeList" listKey="uniqueId" listValue="label" headerKey="" headerValue="%{#msg.valueNotSet()}"></s:select>
</TD>
</TR>
</s:if>
<s:else>
<s:hidden name="form.posType"/>
</s:else>
<TR>
<TD valign="top"><loc:message name="propertyNotes"/></TD>
<TD>
<s:textarea name="form.note" rows="5" cols="70"/>
</TD>
</TR>
<TR>
<TD><loc:message name="propertyIgnoreTooFar"/></TD>
<TD>
<s:checkbox name="form.ignoreDist"/>
</TD>
</TR>
<TR>
<TD valign="middle" colspan='2' class='WelcomeRowHead'>
</TD>
</TR>
<TR>
<TD valign="middle" colspan='2' align='right'>
<s:if test="#attr.operation == 'add'">
<s:submit accesskey='%{#msg.accessSaveInstructor()}' name='op' value='%{#msg.actionSaveInstructor()}'
title='%{#msg.titleSaveInstructor(#msg.accessSaveInstructor())}'/>
</s:if>
<s:if test="#attr.operation == 'update'">
<s:submit accesskey='%{#msg.accessUpdateInstructor()}' name='op' value='%{#msg.actionUpdateInstructor()}'
title='%{#msg.titleUpdateInstructor(#msg.accessUpdateInstructor())}'/>
<sec:authorize access="hasPermission(#form.instructorId, 'DepartmentalInstructor', 'InstructorDelete')">
<s:submit accesskey='%{#msg.accessDeleteInstructor()}' name='op' value='%{#msg.actionDeleteInstructor()}'
title='%{#msg.titleDeleteInstructor(#msg.accessDeleteInstructor())}'
onclick="return confirmDelete();"/>
</sec:authorize>
</s:if>
<s:submit accesskey='%{#msg.accessLookupInstructor()}' name='op' value='%{#msg.actionLookupInstructor()}'
title='%{#msg.titleLookupInstructor(#msg.accessLookupInstructor())}'/>
<s:if test="form.previousId != null">
<s:submit accesskey='%{#msg.accessPreviousInstructor()}' name='op' value='%{#msg.actionPreviousInstructor()}'
title='%{#msg.titlePreviousInstructorWithUpdate(#msg.accessPreviousInstructor())}'/>
</s:if>
<s:if test="form.nextId != null">
<s:submit accesskey='%{#msg.accessNextInstructor()}' name='op' value='%{#msg.actionNextInstructor()}'
title='%{#msg.titleNextInstructorWithUpdate(#msg.accessNextInstructor())}'/>
</s:if>
<s:if test="#attr.operation == 'add'">
<s:submit accesskey='%{#msg.accessBackToInstructors()}' name='op' value='%{#msg.actionBackToInstructors()}'
title='%{#msg.titleBackToInstructors(#msg.accessBackToInstructors())}'/>
</s:if>
<s:if test="#attr.operation == 'update'">
<s:submit accesskey='%{#msg.accessBackToDetail()}' name='op' value='%{#msg.actionBackToDetail()}'
title='%{#msg.titleBackToDetail(#msg.accessBackToDetail())}'/>
</s:if>
</TD>
</TR>
<script type="text/javascript">
function lookup() {
peopleLookup((document.getElementById('fname').value + ' ' + document.getElementById('lname').value).trim(), function(person) {
if (person) {
document.getElementById('uid').value = (person[0] == null ? '' : person[0]);
document.getElementById('fname').value = (person[1] == null ? '' : person[1]);
document.getElementById('mname').value = (person[2] == null ? '' : person[2]);
document.getElementById('lname').value = (person[3] == null ? '' : person[3]);
document.getElementById('email').value = (person[4] == null ? '' : person[4]);
document.getElementById('title').value = (person[6] == null ? '' : person[6]);
}
}, "mustHaveExternalId");
}
</script>
</loc:bundle>
</loc:bundle>