Skip to content

Commit

Permalink
Merge remote-tracking branch 'bnfleb/NAS-2889-hide-crawlertraps' into…
Browse files Browse the repository at this point in the history
… 7.5-RC
  • Loading branch information
csrster committed Sep 5, 2023
2 parents 39a1ee6 + 25d6c99 commit bd4718e
Showing 1 changed file with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ Display all the form information for this domain
<tr>
<th><fmt:message key="crawler.traps"/></th>
</tr>
<tr><td><a id="showCrawlertraps" href="" onclick="showHideCrawlertraps();return false;">
<span id="showCrawlerTrap"><fmt:message key="show.crawler.traps"/></span>
<span id="hideCrawlerTrap"><fmt:message key="hide.crawler.traps"/></span>
</a></td></tr>
<tr id="crawlertrapRow">
<td>
<textarea rows="<%=Constants.CRAWLERTRAPS_ROWS%>" cols="<%=Constants.CRAWLERTRAPS_COLUMNS%>"
Expand All @@ -330,15 +334,23 @@ Display all the form information for this domain
</table>
</div>

<a id="showCrawlertraps" href="" onclick="showCrawlertraps();return false;">
<fmt:message key="show.crawler.traps"/></a>


<script type="text/javascript">
document.getElementById("crawlertrapRow").style.display = "none";
function showCrawlertraps() {
document.getElementById("crawlertrapRow").style.display = "none";
document.getElementById("hideCrawlerTrap").style.display = "none";
function showHideCrawlertraps() {
if (document.getElementById("hideCrawlerTrap").style.display == "none") {
// show crawler traps
document.getElementById("crawlertrapRow").style.display = "block";
document.getElementById("showCrawlertraps").style.display = "none";
document.getElementById("hideCrawlerTrap").style.display = "block";
document.getElementById("showCrawlerTrap").style.display = "none";
} else {
// hide crawler traps
document.getElementById("crawlertrapRow").style.display = "none";
document.getElementById("hideCrawlerTrap").style.display = "none";
document.getElementById("showCrawlerTrap").style.display = "block";
}
}
</script>

<br/>
Expand Down

0 comments on commit bd4718e

Please sign in to comment.