Check qu'un access type est sélectionné avant le submit
This commit is contained in:
parent
98a446b9e4
commit
6983796eeb
|
@ -131,7 +131,7 @@ $lac = $authip->list_affected();
|
||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<td valign=middle class="lst2">
|
<td valign=middle class="lst2">
|
||||||
<input type="submit" class="inb" value="<?php __("Save")?>" />
|
<input type="submit" class="inb" value="<?php __("Save")?>" onclick='return check_accesstype_selected();' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -206,5 +206,14 @@ foreach($list_ip as $i) {
|
||||||
$("#edit_ip").val(iph);
|
$("#edit_ip").val(iph);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_accesstype_selected() {
|
||||||
|
if ( $('input[name=s_protocol]:radio:checked').val() ) {
|
||||||
|
// there is a value
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
alert("<?php __("Please select an access type"); ?>");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?php include_once("foot.php"); ?>
|
<?php include_once("foot.php"); ?>
|
||||||
|
|
Loading…
Reference in New Issue