Rev 12640 | Rev 14114 | 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"> |
||
12640 | obado | 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 |
||
12569 | bpr | 30 | !endif |
12640 | obado | 31 | !next i |
32 | <option value="$[$glossarytot+1]">$name_newglos</option> |
||
33 | </select> |
||
34 | </div> |
||
35 | <div id="js-new_glossary" class="field box"> |
||
12641 | bpr | 36 | <ul class="wims_nopuce"><li> |
12640 | obado | 37 | <label for="new_glossary">$name_newglostitle</label> |
38 | <input size="50" name="new_glossary" value="$new_glossary" id="new_glossary" /> |
||
12641 | bpr | 39 | </li><li> |
12640 | obado | 40 | <label for="new_glossarydesc">$wims_name_Description</label> |
41 | <input size="50" name="new_glossarydesc" value="$new_glossarydesc" id="new_glossarydesc" /> |
||
12641 | bpr | 42 | </li> |
43 | </ul> |
||
12640 | obado | 44 | </div> |
45 | <div class="field box"> |
||
46 | <label for="gloss_title">$name_titleglose</label> |
||
47 | <input size="50" name="title" value="$gl_title" id="gloss_title" required="required" /> |
||
48 | </div> |
||
49 | !if $jquery_defined=yes |
||
50 | <script> |
||
51 | $$('#pickglossary').on('change', function() { |
||
52 | var check = this.value === "$[$glossarytot+1]"; |
||
53 | $$("#new_glossary").prop('required', check); |
||
54 | !!$$("#gloss_title").prop('required', check); |
||
55 | if(check){ |
||
56 | $$("#js-new_glossary").slideDown(); |
||
57 | }else{ |
||
58 | $$("#js-new_glossary").hide(); |
||
59 | } |
||
60 | }).change(); |
||
61 | </script> |
||
12569 | bpr | 62 | !endif |
12640 | obado | 63 | <input type="hidden" name="job" value="add" /> |
64 | <div class="wimscenter wimsform"><input type="submit" value="$wims_name_Insert" /></div> |
||
12569 | bpr | 65 | </fieldset> |
66 | !formend |
||
67 | !endif |
||
68 | |||
69 | !if $cmd=reply |
||
70 | $name_endadd $pickglossary. |
||
12595 | bpr | 71 | !set wims_menu_items=!append line glossarycheck,1,module=adm/tool/glossary&gl=$pickglossary\ |
12569 | bpr | 72 | to $wims_menu_items |
73 | !endif |