<%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF 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. --%> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.auth.permissions.*" %> <%@ page import="org.apache.wiki.tags.*" %> <%@ page import="org.apache.wiki.filters.SpamFilter" %> <%@ page import="org.apache.wiki.ui.*" %> <%@ page import="org.apache.wiki.util.TextUtil" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%-- This is a plain editor for JSPWiki. --%> <% WikiContext context = WikiContext.findContext( pageContext ); WikiEngine engine = context.getEngine(); TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, context.getURL( WikiContext.NONE, "scripts/jspwiki-edit.js" ) ); String usertext = EditorManager.getEditedText( pageContext ); %> <%-- this is a new page, check if we're cloning --%> <% String clone = request.getParameter( "clone" ); if( clone != null ) { WikiPage p = engine.getPage( clone ); if( p != null ) { AuthorizationManager mgr = engine.getAuthorizationManager(); PagePermission pp = new PagePermission( p, PagePermission.VIEW_ACTION ); try { if( mgr.checkPermission( context.getWikiSession(), pp ) ) { usertext = engine.getPureText( p ); } } catch( Exception e ) { /*log.error( "Accessing clone page "+clone, e );*/ } } } %> <% if( usertext == null ) { usertext = engine.getPureText( context.getPage() ); } %> <% if( usertext == null ) usertext = ""; %>
<%-- Required for IE6 on Windows --%> <%-- WYSIWYG not yet implemented for the JSPWiki Default template. Falling back to the plain editor. --%>
<%-- Edit.jsp relies on these being found. So be careful, if you make changes. --%>

<%=SpamFilter.insertInputFields( pageContext )%>

<%-- This following field is only for the SpamFilter to catch bots which are just randomly filling all fields and submitting. Normal user should never see this field, nor type anything in it. --%>
Authentication code:
<%--FIXME --%>
   FIXME

/>

/>