[pLog-svn] r2910 - plugins/branches/lifetype-1.0/hostblock/templates

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Feb 6 17:02:51 GMT 2006


Author: jondaley
Date: 2006-02-06 17:02:51 +0000 (Mon, 06 Feb 2006)
New Revision: 2910

Modified:
   plugins/branches/lifetype-1.0/hostblock/templates/addblockedhost.template
   plugins/branches/lifetype-1.0/hostblock/templates/addblogblockedhost.template
   plugins/branches/lifetype-1.0/hostblock/templates/common.template
   plugins/branches/lifetype-1.0/hostblock/templates/editblockedhost.template
   plugins/branches/lifetype-1.0/hostblock/templates/editblogblockedhost.template
Log:
allow more masks. probably we should allow any number, since sometimes /19 etc is useful.  Also, apparently, some people use 255 in inner octets for valid ips.  I didn't think that was allowed

Modified: plugins/branches/lifetype-1.0/hostblock/templates/addblockedhost.template
===================================================================
--- plugins/branches/lifetype-1.0/hostblock/templates/addblockedhost.template	2006-02-06 13:39:07 UTC (rev 2909)
+++ plugins/branches/lifetype-1.0/hostblock/templates/addblockedhost.template	2006-02-06 17:02:51 UTC (rev 2910)
@@ -16,9 +16,13 @@
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" />
 	/ <select name="mask" id="mask" >
+     <option value="4">4 {$locale->tr("bits")}</option>
      <option value="8">8 {$locale->tr("bits")}</option>
+     <option value="12">12 {$locale->tr("bits")}</option>
      <option value="16">16 {$locale->tr("bits")}</option>
+     <option value="20">20 {$locale->tr("bits")}</option>
      <option value="24">24 {$locale->tr("bits")}</option>
+     <option value="28">28 {$locale->tr("bits")}</option>
      <option value="32" selected="selected">32 {$locale->tr("bits")}</option>
     </select> 
   </div>
@@ -53,4 +57,4 @@
  {include file="$admintemplatepath/errormessage.template"} 
 {/if}
 {include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
\ No newline at end of file
+{include file="$admintemplatepath/footer.template"}

Modified: plugins/branches/lifetype-1.0/hostblock/templates/addblogblockedhost.template
===================================================================
--- plugins/branches/lifetype-1.0/hostblock/templates/addblogblockedhost.template	2006-02-06 13:39:07 UTC (rev 2909)
+++ plugins/branches/lifetype-1.0/hostblock/templates/addblogblockedhost.template	2006-02-06 17:02:51 UTC (rev 2910)
@@ -16,9 +16,13 @@
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" />
 	/ <select name="mask" id="mask" >
+     <option value="4">4 {$locale->tr("bits")}</option>
      <option value="8">8 {$locale->tr("bits")}</option>
+     <option value="12">12 {$locale->tr("bits")}</option>
      <option value="16">16 {$locale->tr("bits")}</option>
+     <option value="20">20 {$locale->tr("bits")}</option>
      <option value="24">24 {$locale->tr("bits")}</option>
+     <option value="28">28 {$locale->tr("bits")}</option>
      <option value="32" selected="selected">32 {$locale->tr("bits")}</option>
     </select> 
   </div>
@@ -53,4 +57,4 @@
  {include file="$admintemplatepath/errormessage.template"} 
 {/if}
 {include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
\ No newline at end of file
+{include file="$admintemplatepath/footer.template"}

Modified: plugins/branches/lifetype-1.0/hostblock/templates/common.template
===================================================================
--- plugins/branches/lifetype-1.0/hostblock/templates/common.template	2006-02-06 13:39:07 UTC (rev 2909)
+++ plugins/branches/lifetype-1.0/hostblock/templates/common.template	2006-02-06 17:02:51 UTC (rev 2910)
@@ -10,7 +10,7 @@
       ip[4] = parseInt(form.ip4.value);
 
       for( i=1; i<=4; i++ ) {
-        if( (isNaN(ip[i])) || (ip[i] < 0) || (ip[i] > 253)) {
+        if( (isNaN(ip[i])) || (ip[i] < 0) || (ip[i] > 255)) {
           window.alert({/literal}'{$locale->tr("error_invalid_ip_address")|escape:"javascript"}'{literal});
           return false;
         }
@@ -20,4 +20,4 @@
      }
 	  // -->
      {/literal}
-	</script>
\ No newline at end of file
+	</script>

Modified: plugins/branches/lifetype-1.0/hostblock/templates/editblockedhost.template
===================================================================
--- plugins/branches/lifetype-1.0/hostblock/templates/editblockedhost.template	2006-02-06 13:39:07 UTC (rev 2909)
+++ plugins/branches/lifetype-1.0/hostblock/templates/editblockedhost.template	2006-02-06 17:02:51 UTC (rev 2910)
@@ -16,9 +16,13 @@
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" value="{$ip3}" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" value="{$ip4}" />
     / <select name="mask" id="mask">
+     <option value="4" {if $blockedhost->getMask() == 4} selected="selected"{/if}>4 {$locale->tr("bits")}</option>
      <option value="8" {if $blockedhost->getMask() == 8} selected="selected"{/if}>8 {$locale->tr("bits")}</option>
+     <option value="12" {if $blockedhost->getMask() == 12} selected="selected"{/if}>12 {$locale->tr("bits")}</option>
      <option value="16" {if $blockedhost->getMask() == 16} selected="selected"{/if}>16 {$locale->tr("bits")}</option>
+     <option value="20" {if $blockedhost->getMask() == 20} selected="selected"{/if}>20 {$locale->tr("bits")}</option>
      <option value="24" {if $blockedhost->getMask() == 24} selected="selected"{/if}>24 {$locale->tr("bits")}</option>
+     <option value="28" {if $blockedhost->getMask() == 28} selected="selected"{/if}>28 {$locale->tr("bits")}</option>
      <option value="32" {if $blockedhost->getMask() == 32} selected="selected"{/if}>32 {$locale->tr("bits")}</option>
     </select>
   </div>
@@ -54,4 +58,4 @@
  {include file="$admintemplatepath/errormessage.template"} 
 {/if}
 {include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
\ No newline at end of file
+{include file="$admintemplatepath/footer.template"}

Modified: plugins/branches/lifetype-1.0/hostblock/templates/editblogblockedhost.template
===================================================================
--- plugins/branches/lifetype-1.0/hostblock/templates/editblogblockedhost.template	2006-02-06 13:39:07 UTC (rev 2909)
+++ plugins/branches/lifetype-1.0/hostblock/templates/editblogblockedhost.template	2006-02-06 17:02:51 UTC (rev 2910)
@@ -16,9 +16,13 @@
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" value="{$ip3}" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" value="{$ip4}" />
     / <select name="mask" id="mask">
+     <option value="4" {if $blockedhost->getMask() == 4} selected="selected"{/if}>4 {$locale->tr("bits")}</option>
      <option value="8" {if $blockedhost->getMask() == 8} selected="selected"{/if}>8 {$locale->tr("bits")}</option>
+     <option value="12" {if $blockedhost->getMask() == 12} selected="selected"{/if}>12 {$locale->tr("bits")}</option>
      <option value="16" {if $blockedhost->getMask() == 16} selected="selected"{/if}>16 {$locale->tr("bits")}</option>
+     <option value="20" {if $blockedhost->getMask() == 20} selected="selected"{/if}>20 {$locale->tr("bits")}</option>
      <option value="24" {if $blockedhost->getMask() == 24} selected="selected"{/if}>24 {$locale->tr("bits")}</option>
+     <option value="28" {if $blockedhost->getMask() == 28} selected="selected"{/if}>28 {$locale->tr("bits")}</option>
      <option value="32" {if $blockedhost->getMask() == 32} selected="selected"{/if}>32 {$locale->tr("bits")}</option>
     </select>
   </div>
@@ -54,4 +58,4 @@
  {include file="$admintemplatepath/errormessage.template"} 
 {/if}
 {include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
\ No newline at end of file
+{include file="$admintemplatepath/footer.template"}



More information about the pLog-svn mailing list