Template:ISO 4217/code/format: Difference between revisions

Content deleted Content added
No edit summary
m Protected "Template:ISO 4217/code/format": High-risk template or module: 654 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite))
 
(23 intermediate revisions by one other user not shown)
Line 1:
{{#if:{{{valueformat|}}}<!--
-->|_11.VALok_{{#if:{{{value|}}}<!--
-->|#default={{{value|}}}
|_12.toCHECKforNONE&BADCODE_<!--
|{{#if:{{{input-code|}}}<!-- input is not an ok-code, so analyse for 'None' and ISOcat
-->{{#if:{{{input-code|}}}{{#if:{{Str find word|source=option-none|orwords={{{format|}}}}}|_31.optNONE>{{{input-code|}}}<_|_32.NOTnoneTOCAT>{{{input-code|}}}<_}}
-->|_OPTNONEyes_{{#if:{{ISO 4217/code-none|iso-code={{{input-code|}}}}}<!-- check None-option:
|_21.ZZZorNONEcheck
-->|{{#if:{{{input-codeyesno|}}}{{#if:{{Str find word|source=option-none|orwords={{{format|}}}}}|_31.optNONE>{{{input-code|}}}<_|_32.NOTnoneTOCAT>{{{input!--code|}}}<_}}
|_22.BLANKin._<!-- blank input do rteturn blank EOjob
-->|yes={{{input-code|}}}<!-- 'None'=allowed so return the input string
-->}}
-->|no=<!--'none' not allowed so return blank; CAT-N-->{{#if:{{{ISO4217-cat|}}}|{{ISO 4217/maintenance-category|main-sort=NONE|template-sort=&#x20;ISOcat-N<nowiki>*</nowiki>}}}}}}<!--
-->|<!--bad code so return blank; CAT-C-->{{#if:{{{ISO4217-cat|}}}|{{ISO 4217/maintenance-category|main-sort=CODE|template-sort=&#x20;ISOcat-C<nowiki>*</nowiki>}}}}<!--
-->}}<!--
-->|<!-- input-code=blank so no error to detect; return blank
-->}}}}
|{{{value|}}}<!-- no format, so return plain value (is an ok code OR blank) -->
}}
 
<noinclude>
<nowiki>
{{#if:{{Str find word|source=option-none|orwords={{{format|}}}}}
|_OPTNONEyes_{{#if:{{ISO 4217/code-none|iso-code={{{input-code|}}}}}
| _isNONE_{{{input-code|}}}|_todoerr&catcheckNONE_}}<!--
 
 
-->
|={{#if:{{{input-code|}}}|_BADCODEIN_CAT|_BLANKcodeINsoBLANKout_}}
 
}}
}}
{{#switch:{{{value|}}}<!-- correct code OR 'None' OR <blank> -->
|=
|None={{#switch:{{{format|}}}|option-none={{{value|}}}}}
|#default={{{value|}}}
}}<!--
 
add errortext, ISOcategory IF:
-->{{#if:{{#switch:{{{value|}}}
|={{#if:{{{input|}}}|_ERR1_}}<!-- input did not lead to correct code so error -->
|None={{#ifeq:{{{format|}}}|option-none||_ERR2_}}<!-- None not accepted so error -->
}}|<!--
-->{{{errortext|}}}<!--
-->{{yesno|{{{ISOcat|}}}|yes={{main other|1=[[Category:Pages using Infobox currency with ISO code to check|Code]]|2=[[:Category:Pages using Infobox currency with ISO code to check|ISOcat:nowiki>C*/nowiki>]]}}}}<!--
-->}}
 
 
|{ISO 4217/code/format
|input={{{iso-code|}}}
|format={{{format|}}}
|errortext={{{errortext|}}}
|ISO4217-cat={{Str find word|source=iso4217-cat|case=no|orwords={{{format|}}}}}
|is-none={{ISO 4217/code-none|iso-code={{{iso-code|}}}}}
|value=}}</nowiki></noinclude>