TemplateTaskForm.js revision e26e5073e1266868172d72453c97f413fe2fb603
0N/A/**
4589N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0N/A *
0N/A * Copyright (c) 2011-2012 ForgeRock AS. All rights reserved.
0N/A *
0N/A * The contents of this file are subject to the terms
2362N/A * of the Common Development and Distribution License
0N/A * (the License). You may not use this file except in
2362N/A * compliance with the License.
0N/A *
0N/A * You can obtain a copy of the License at
0N/A * http://forgerock.org/license/CDDLv1.0.html
0N/A * See the License for the specific language governing
0N/A * permission and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL
0N/A * Header Notice in each file and include the License file
0N/A * at http://forgerock.org/license/CDDLv1.0.html
0N/A * If applicable, add the following below the CDDL Header,
0N/A * with the fields enclosed by brackets [] replaced by
2362N/A * your own identifying information:
2362N/A * "Portions Copyrighted [year] [name of copyright owner]"
2362N/A */
0N/A
0N/A/*global define */
0N/A
0N/Adefine("org/forgerock/openidm/ui/common/workflow/tasks/TemplateTaskForm", [
4589N/A "handlebars",
4589N/A "org/forgerock/openidm/ui/common/workflow/tasks/AbstractTaskForm",
0N/A "org/forgerock/commons/ui/common/util/DateUtil",
0N/A "org/forgerock/commons/ui/common/main/Configuration"
0N/A], function(Handlebars, AbstractTaskForm, DateUtil, conf, uiUtils) {
0N/A
0N/A var TemplateTaskForm = AbstractTaskForm.extend({
0N/A
0N/A template: "templates/common/EmptyTemplate.html",
0N/A
0N/A postRender: function(callback) {
0N/A var t = Handlebars.compile(this.args)(this.task);
4589N/A
0N/A this.$el.html(t);
0N/A
0N/A if (callback) {
0N/A callback();
0N/A }
0N/A }
0N/A });
0N/A
0N/A return new TemplateTaskForm();
0N/A});
0N/A