<!--
The contents of this file are subject to the terms of the Common Development and
Distribution License (the License). You may not use this file except in compliance with the
License.
You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
specific language governing permission and limitations under the License.
When distributing Covered Software, include this CDDL Header Notice in each file and include
the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
Header, with the fields enclosed by brackets [] replaced by your own identifying
information: "Portions Copyrighted [year] [name of copyright owner]".
Copyright (c) 2011-2015 ForgeRock AS. All rights reserved.
-->
<style>
#taskDetails fieldset {
margin-top: 0;
}
#taskDetails .field label {
text-align: left;
}
#taskDetails .field input,#taskDetails .field select {
clear: both;
}
#taskDetails .field .validation-message {
clear: none !important;
margin-left: 20px !important;
float: left !important;
}
</style>
<h3 class="text-center">Contractor Details</h3>
<div class="form-group">
<label class="col-sm-3 control-label" for="userName">{{t "common.user.username"}}</label>
<div class="col-sm-6">
<input class="form-control" value="{{variables.userName}}" type="text" id="userName" name="userName" autofocus />
<div class="validation-message"></div>
<span class="error form-control-feedback"><i class="fa validation-icon"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="mail">{{t "common.user.emailAddress"}}</label>
<div class="col-sm-6">
<input value="{{variables.mail}}" class="form-control" type="email" id="mail" name="mail" />
<div class="validation-message"></div>
<span class="error form-control-feedback"><i class="fa validation-icon"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="userName">{{t "common.user.givenName"}}</label>
<div class="col-sm-6">
<input class="form-control" value="{{variables.givenName}}" type="text" id="givenName" name="givenName" data-validation-dependents="password" />
<div class="validation-message"></div>
<span class="error form-control-feedback"><i class="fa validation-icon"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="sn">{{t "common.user.sn"}}</label>
<div class="col-sm-6">
<input class="form-control" value="{{variables.sn}}" type="text" id="sn" name="sn" data-validation-dependents="password" />
<div class="validation-message"></div>
<span class="error form-control-feedback"><i class="fa validation-icon"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="telephoneNumber">{{t "common.user.phoneNumber"}}</label>
<div class="col-sm-6">
<input class="form-control" value="{{variables.telephoneNumber}}" type="text" id="telephoneNumber" name="telephoneNumber" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="provisionToXMLprovisionToXML">Provision to XML</label>
<div class="col-sm-6">
<select class="form-control" name="provisionToXML">
<option value="1">Yes</option>
<option value="0">No</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="department">Department</label>
<div class="col-sm-6">
<input class="form-control" value="{{variables.department}}" type="text" id="department" name="department"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="jobTitle">Job Title</label>
<div class="col-sm-6">
<input class="form-control" value="{{variables.jobTitle}}" type="text" id="jobTitle" name="jobTitle"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="description">Description</label>
<div class="col-sm-6">
<input class="form-control" type="text" value="{{variables.description}}" id="description" name="description"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="startDate">Start Date</label>
<div class="col-sm-6">
<input class="form-control" type="text" value="{{variables.startDate}}" id="startDate" name="startDate"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="endDate">End Date</label>
<div class="col-sm-6">
<input class="form-control" type="text" value="{{variables.endDate}}" id="endDate" name="endDate"/>
</div>
</div>
{{#if assignee}}
<div class="field">
<label class="light">{{t "common.form.decision"}}</label>
{{select variables.decisionOptions "decision" "0" "" " data-validator='required' "}}
<span class="ok" style="">✔</span>
<div class="validation-message"></div>
</div>
{{/if}}
<div style="clear:both;"></div>
<script>
{{#if variables.provisionToXML}}
$('#taskDetails form select[name=provisionToXML]').val("{{variables.provisionToXML}}");
{{/if}}
(function () {
var v = require("org/forgerock/commons/ui/common/main/ValidatorsManager" );
v.bindValidators($('#taskDetails form' ), "managed/user/*", function () {
v.validateAllFields($('#taskDetails form'));
});
}());
</script>