1{jq} 2 var html = new Array(); 3 function test_xpath(index) { 4 /* 5 alert("Index:"+index); 6 alert ('Xpath['+index+']='+document.getElementById('xpath_'+index).value); 7 */ 8 window.open('tiki_tests/tiki-tests_show_xpath.php?filename={{$filename}}&index='+index+'&xpath='+document.getElementById('xpath_'+index).value,'_blank') ; 9 } 10{/jq} 11 12{title help="tests"}{tr}TikiTests Edit{/tr}{/title} 13 14<h2 class='pagetitle'>TikiTest:{$filename}</h2> 15<br/> 16{include file='tiki-tests_menubar.tpl'} 17<fieldset> 18 <legend>{tr}Options{/tr}</legend> 19 <form name='tiki_tests' action="tiki_tests/tiki-tests_edit.php" method="post"> 20 <input type="checkbox" name="summary" value="y" {if $summary eq 'y'} checked="checked"{/if}>{tr}Summary mode{/tr}<br/> 21 <input type="checkbox" name="show_page" value="y" {if $show_page eq 'y'} checked="checked"{/if}>{tr}Show Page Differences{/tr}<br/> 22 <input type="checkbox" name="show_tidy" value="y" {if $show_tidy eq 'y'} checked="checked"{/if}>{tr}Show Tidy Errors and Warnings{/tr}<br/> 23 <input type="checkbox" name="show_post" value="y" {if $show_post eq 'y'} checked="checked"{/if}>{tr}Show POST Data{/tr}<br/> 24 <input type="checkbox" name="current_session" value="y" {if $current_session eq 'y'} checked="checked"{/if}>{tr}Use Current Session/Log out{/tr}<br/> 25 <input type="hidden" name="filename" value="{$filename}"> 26 <center><input type="submit" class="btn btn-primary btn-sm" name="action" value="{tr}Refresh{/tr}"></center> 27 {if $result} 28 </fieldset> 29 <fieldset> 30 <legend>{tr}Recorded Links{/tr}</legend> 31 <div class="table-responsive"> 32 <table class="table"> 33 {foreach from=$result item=r name=url} 34 <tr> 35 <th style="width:10%">{tr}Request:{/tr} {$r.method}</td><td>{$r.url}</th> 36 </tr> 37 <tr> 38 <td colspan="2"> 39 <table style="width:100%" > 40 <tr> 41 <th colspan="2">{tr}Element to compare (Xpath expression):{/tr} <input type="text" style="width:50%;" id="xpath_{$smarty.foreach.url.index}" name="xpath[{$smarty.foreach.url.index}]" value="{$r.xpath}" /> <input type="button" value="{tr}Test Xpath Expression{/tr}" onclick="javascript:test_xpath({$smarty.foreach.url.index}); return false"></th> 42 </tr> 43 {if isset($r.post) and $show_post and sizeof($r.post) gt 0} 44 <tr> 45 <th colspan="2">{tr}Post Variables{/tr}</th> 46 </tr> 47 {foreach from=$r.post item=p key=k} 48 <tr> 49 <td>{$k}</td> 50 <td>{$p}</td> 51 </tr> 52 {/foreach} 53 {/if} 54 {if $show_tidy} 55 <tr><th colspan="4">{tr}Tidy Results{/tr}</th></tr> 56 <tr> 57 <td colspan="2"> 58 <div class="table-responsive"> 59 <table class="table"> 60 <tr> 61 <td colspan="2" width="50%"><pre>{$r.ref_error_msg|escape:"html"}</pre></td> 62 </tr> 63 </table> 64 </div> 65 </td> 66 </tr> 67 {/if} 68 <tr><td colspan="2"><input type="checkbox" name="delete[{$smarty.foreach.url.index}]" value="delete">{tr}Delete this link{/tr}</td></tr> 69 </table> 70 </td> 71 </tr> 72 {/foreach} 73 </table> 74 </div> 75 <center><input type="submit" class="btn btn-primary btn-sm" name="action" value="{tr}Edit{/tr}"></center> 76 {/if} 77 </form> 78</fieldset> 79