Check qu'un access type est sélectionné avant le submit

This commit is contained in:
Alan Garcia 2013-01-28 10:05:08 +00:00
parent 98a446b9e4
commit 6983796eeb
1 changed files with 10 additions and 1 deletions

View File

@ -131,7 +131,7 @@ $lac = $authip->list_affected();
<tr>
<th>&nbsp;</th>
<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>
</tr>
</tbody>
@ -206,5 +206,14 @@ foreach($list_ip as $i) {
$("#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>
<?php include_once("foot.php"); ?>