Template:EditButton/CheckList

From Metabolomics.JP
< Template:EditButton(Difference between revisions)
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 4: Line 4:
 
{{#get:prevpage}} 飛んできたページ
 
{{#get:prevpage}} 飛んできたページ
 
{{#get:title}}    「species」や「効能」と言ったようなタイトル
 
{{#get:title}}    「species」や「効能」と言ったようなタイトル
 +
{{#get:separator}} Separator symbol for the selected items
 
-->{{#lua:
 
-->{{#lua:
 
--%% Preprocessing %%--
 
--%% Preprocessing %%--
Line 22: Line 23:
 
   if (head ~= nil) then
 
   if (head ~= nil) then
 
     body = string.sub(list[i],string.len(head)+1);
 
     body = string.sub(list[i],string.len(head)+1);
     --%% Check whether items are already selected. {{{1}}} is the separator %%--
+
     --%% Check whether items are already selected.%%--
     if (string.match("{{#get:initset}}", "{{{1|&&}}}" .. body .. "{{{1|&&}}}", 0) or
+
     if (string.match("{{#get:initset}}", "{{#get:separator}}" .. body .. "{{#get:separator}}", 0) or
         string.match("{{#get:initset}}", "^" .. body .. "{{{1|&&}}}", 0) or
+
         string.match("{{#get:initset}}", "^" .. body .. "{{#get:separator}}", 0) or
         string.match("{{#get:initset}}", "{{{1|&&}}}" .. body .. "$", 0) ) then
+
         string.match("{{#get:initset}}", "{{#get:separator}}" .. body .. "$", 0) ) then
 
       checked = ' checked="yes"'  
 
       checked = ' checked="yes"'  
 
     else
 
     else
Line 37: Line 38:
 
print('{{#form' .. 'tag:input|type="hidden" name="listpage" value="{{#get:listpage}}"}}')
 
print('{{#form' .. 'tag:input|type="hidden" name="listpage" value="{{#get:listpage}}"}}')
 
print('{{#form' .. 'tag:input|type="hidden" name="title" value="{{#get:title}}"}}')
 
print('{{#form' .. 'tag:input|type="hidden" name="title" value="{{#get:title}}"}}')
 +
print('{{#form' .. 'tag:input|type="hidden" name="separator" value="{{#get:separator}}"}}')
 
print('{{#form' .. 'tag:input|type="hidden" name="hookinsert" value="__HOOK_AND_INSERT__"}}')
 
print('{{#form' .. 'tag:input|type="hidden" name="hookinsert" value="__HOOK_AND_INSERT__"}}')
 
print('{{#form' .. 'tag:input|type="submit" value="update"}}')
 
print('{{#form' .. 'tag:input|type="submit" value="update"}}')

Latest revision as of 09:51, 10 April 2009


{{ }}

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox