Rev 12569 | Rev 12595 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
12569 | bpr | 1 | !! |
2 | !! page edition to add glossary_item into a glossary |
||
3 | !! |
||
4 | !if $cmd=new or $cmd=resume |
||
5 | $name_insert <span class="tt wims_fname">$dir</span> |
||
6 | !if $iniparm!=$empty |
||
7 | $name_parm |
||
8 | <p> |
||
9 | <span class="tt wims_parm"> |
||
10 | !replace internal & by & in $iniparm |
||
11 | </span> |
||
12 | </p> |
||
13 | !endif |
||
14 | !form reply |
||
15 | <fieldset class="property_fields halfwidth blockcenter"> |
||
16 | <legend>$name_title</legend> |
||
17 | <div class="field box"> |
||
18 | <label for="pickglossary">$name_choose</label> |
||
19 | <select name="pickglossary" id="pickglossary"> |
||
20 | !for i=1 to $glossarytot |
||
21 | !set sh=!line $i of $glossarys |
||
22 | !set se=!item 1 of $sh |
||
23 | !set ti=!item 2 to -1 of $sh |
||
24 | !if $se>0 |
||
25 | !if $se=$glossarytot |
||
26 | <option value="$se" selected="selected">$wims_name_Glossary $se: $ti</option> |
||
27 | !else |
||
28 | <option value="$se">$wims_name_Glossary $se: $ti</option> |
||
29 | !endif |
||
30 | !endif |
||
31 | !next i |
||
32 | <option value="$[$glossarytot+1]">$name_newglos</option> |
||
33 | </select> |
||
34 | </div> |
||
12581 | obado | 35 | <div id="js-new_glossary" class="field box"> |
36 | <label for="new_glossary">$name_newglostitle</label> |
||
12569 | bpr | 37 | <input size="50" name="new_glossary" value="$new_glossary" id="new_glossary" /> |
38 | </div> |
||
12581 | obado | 39 | <div class="field box"> |
40 | <label for="gloss_title">$name_titleglose</label> |
||
41 | <input size="50" name="title" value="$gl_title" id="gloss_title" required="required" /> |
||
42 | </div> |
||
12569 | bpr | 43 | !if $jquery_defined=yes |
12581 | obado | 44 | <script> |
45 | $$('#pickglossary').on('change', function() { |
||
46 | var check = this.value === "$[$glossarytot+1]"; |
||
47 | $$("#new_glossary").prop('required', check); |
||
48 | !!$$("#gloss_title").prop('required', check); |
||
49 | if(check){ |
||
50 | $$("#js-new_glossary").slideDown(); |
||
51 | }else{ |
||
52 | $$("#js-new_glossary").hide(); |
||
53 | } |
||
54 | }).change(); |
||
55 | </script> |
||
12569 | bpr | 56 | !endif |
57 | <input type="hidden" name="job" value="add" /> |
||
58 | <div class="wimscenter wimsform"><input type="submit" value="$wims_name_Insert" /></div> |
||
59 | </fieldset> |
||
60 | !formend |
||
61 | !endif |
||
62 | |||
63 | !if $cmd=reply |
||
64 | $name_endadd $pickglossary. |
||
65 | !set wims_menu_items=!append line "glossarycheck",1,module=adm/tool/glossary&gl=$pickglossary\ |
||
66 | to $wims_menu_items |
||
67 | !endif |