%META:TOPICINFO{author="ProjectContributor" date="1288962587" format="1.1" version="1"}%
%META:TOPICPARENT{name="PatternSkin"}%
%TMPL:INCLUDE{"WebCreateNewTopic"}%

%{"hide page top controls"}%
%TMPL:DEF{"top"}%%TMPL:END%
%TMPL:DEF{"formandactions"}%%TMPL:END%

%TMPL:DEF{"script:topictemplate"}%
%TMPL:P{"JavascriptFiles/foswikiStringUnicodeChars"}%
%TMPL:P{"LIBJS" id="JavascriptFiles/foswikiWindow" requires="JQUERYPLUGIN::FOSWIKI"}%
%TMPL:P{"LIBJS" id="PatternSkin/webtopiccreator" requires="JavascriptFiles/foswikiString"}%
%ADDTOZONE{"script"
 tag="PatternSkinWebCreateNewTopicTemplate.txt"
 text="
<script type=\"text/javascript\">
//<![CDATA[
function openTemplateWindow () {
    var window = foswiki.Window.openPopup(
        '$percntSCRIPTURL{view}$percnt/',
            {
                topic:'WebTemplateTopics',
                web:'$percntSYSTEMWEB$percnt',
                template:'viewplain',
                attributes:'resizable=1,scrollbars=1,status=1,toolbar=1',
                urlparams:'web=$percntBASEWEB$percnt'
            }
        );
    return false;
}
function getQueryUrl() {
	return '$percntSCRIPTURLPATH{view}$percnt/$percntBASEWEB$percnt/$percntBASETOPIC$percnt?$percntQUERYSTRING$percnt;pickparent=1'
}
/* Localized texts */
var TEXT_FEEDBACK_HEADER = '$percntMAKETEXT{Topic will be named: }$percnt';
/* Url params */
var URL_PICK_PARENT = '$percntURLPARAM{pickparent}$percnt';
var URL_TEMPLATE = '$percntURLPARAM{template}$percnt';
//]]>
</script>" requires="JavascriptFiles/foswikiWindow"}%%TMPL:END%

%TMPL:DEF{"formstartstep"}%%TMPL:P{"formstart"}%
<div class="foswikiFormSteps">%TMPL:END%

%TMPL:DEF{"formendstep"}%</div>
%TMPL:P{"formend"}%%TMPL:END%

%TMPL:DEF{"titlestep"}%<div class="foswikiFormStep">
---++ %MAKETEXT{"Create New Topic in [_1] Web" args="<nop>%BASEWEB%"}%
</div>%TMPL:END%

%TMPL:DEF{"topicnamestep"}%<div class="foswikiFormStep">
---+++ %MAKETEXT{"Topic name:"}%
<p>
%TMPL:P{"topicname"}% <span id="webTopicCreatorFeedback" class="foswikiGrayText"><!--generated name will be put here--></span>
</p>%TMPL:P{"nonwikiword"}%
</div>%TMPL:END%

%TMPL:DEF{"topicparentstep"}%<div class="foswikiFormStep">
---+++ %MAKETEXT{"Topic parent:"}%
<p>
%TMPL:P{"topicparent"}%
</p>
</div>%TMPL:END%

%TMPL:DEF{"topictemplatestep"}%<div class="foswikiFormStep">
---+++ %MAKETEXT{"Use template:"}%
<p>
%TMPL:P{"topictemplate"}%
</p>
</div>%TMPL:END%

%TMPL:DEF{"submitstep"}%<div class="foswikiFormStep foswikiLast">
<p>
%TMPL:P{"submit"}%
</p>
</div>%TMPL:END%
