Difference between revisions of "Create new request"

From PegaWiki
Jump to navigation Jump to search
(migration)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#ifingroup:pegaemployee, sysop, editor, administrator|{{#if: {{#urlget: pageName}} | {{#ifexist: {{#urldecode: {{#urlget: pageName}} }}
+
{{#ifingroup:pegaemployee, sysop, editor, administrator
| A page with this name already exists, please choose another name
+
|{{#if: {{#urlget: pageName}}  
<wsform action="get" id="new-request" class="mb-4"><wsfield type="text" class="form-control " name="pageName" placeholder="Title" size="50"/><wsfield type="submit" value="Check"/></wsform>
+
|{{#if:<!--
| Create the request with title '''<big>{{#urldecode: {{#urlget: pageName}} }}</big>''' ? {{#widget: Request form proceed
+
 
|pageName={{fullurl:{{urlencode:{{#urldecode: {{#urlget: pageName}} }}|WIKI}} }}
+
// Checking conditions: no content page in old or new name format should exist
 +
 
 +
// Old
 +
--><!--{{#ifexist: {{#show:{{#urldecode: {{#urlget: pageType}} }}|?Design name}}_-_{{#urldecode: {{#urlget: pageName}} }} |Yes}}--><!--
 +
 
 +
// New
 +
-->{{#ifexist: {{#urldecode: {{#urlget: pageName}} }} |Yes}}<!--
 +
-->{{#if: {{#ask:[[Class::{{#show:{{#urldecode: {{#urlget: pageType}} }}|?Design name}}||New request]] [[Title::{{#urldecode: {{#urlget: pageName}} }}]] }} |Yes}}<!--
 +
-->{{#if: {{#ask:[[Class::{{#show:{{#urldecode: {{#urlget: pageType}} }}|?Design name}}||New request]] [[{{#urldecode: {{#urlget: pageName}} }}]] }} |Yes}}<!--
 +
-->{{#if: {{#ask:[[Class::New request]] [[Title::{{#urldecode: {{#urlget: pageName}} }}]] }} |Yes}}<!--
 +
 
 +
// Main form with denied previous entry
 +
-->| A page with this name already exists, please choose another name
 +
<wsform action="get" id="new-request" class="mb-4">
 +
<br><br>
 +
Page template: <wsselect class="form-control" name="pageType">
 +
{{#arraymap: {{#ask: [[Class::Request design]] |?= |link=none}}|,|@@@
 +
|{{#tag:wsfield|{{#show: @@@ |?Design name}} page |type=option |value=@@@}}
 +
|}}</wsselect>
 +
<wsfield type="text" class="form-control " name="pageName" placeholder="Title" size="50"/>
 +
<wsfield type="submit" value="Check"/>
 +
</wsform><!--
 +
 
 +
// Confirmation page; pagename is allowed
 +
-->|{{#vardefine:@Page name |{{#urldecode: {{#urlget: pageName}} }} }}<!--
 +
-->{{#vardefine:@Page template |{{#urldecode: {{#urlget: pageType}} }} }}<!--
 +
-->{{#vardefine:@Page base |{{#show:{{#var: @Page template}} |?Design name}} }}<!--
 +
 
 +
--><!--Create the request with title '{{#var:@Page base}} - '''<big>{{#var:@Page name}}</big>'''' using the template ''{{#var:@Page template}}''?--><!--
 +
-->Create the request with title ''''<big>{{#var:@Page name}}</big>'''' using the template ''{{#var:@Page template}}''?  
 +
 
 +
<!--<wsform action="get" id="new-request" class="mb-4" mwreturn="{{fullurl:{{#var:@Page base}}_-_{{#var:@Page name}} }}" >-->
 +
<wsform action="get" id="new-request" class="mb-4" mwreturn="{{fullurl:{{#var:@Page name}} }}" >
 +
<wsfield type="hidden" name="preload" value="{{#var:@Page template}}" />
 +
<wsfield type="hidden" name="veaction" value="edit" />
 +
 
 +
<wsfield type="submit" value="Create"/>
 +
</wsform>
 +
}}<!--
 +
 
 +
// Main form
 +
-->|<wsform action="get" id="new-request" class="mb-4">
 +
<br><br>
 +
Page template: <wsselect class="form-control" name="pageType">
 +
{{#arraymap: {{#ask: [[Class::Request design]] |?= |link=none}}|,|@@@
 +
|{{#tag:wsfield|{{#show: @@@ |?Design name}} page |type=option |value=@@@}}
 +
|}}</wsselect>
 +
<wsfield type="text" class="form-control " name="pageName" placeholder="Title" size="50"/>
 +
<wsfield type="submit" value="Check"/>
 +
</wsform>
 
}}
 
}}
}}
+
|You are not allowed to view this page.}}
| {{#widget: Request form}}
 
|Title= Create a new Design Pattern
 
}}|You are not allowed to view this page.}}
 

Latest revision as of 13:32, 17 February 2021

You are not allowed to view this page.