added form validation

This commit is contained in:
Roland Gruber 2018-06-30 09:49:20 +02:00
parent 36c731e092
commit 31862c5bc5
1 changed files with 2 additions and 12 deletions

View File

@ -172,7 +172,7 @@ elseif (isset($_GET['edit'])) {
} }
// display formular // display formular
echo "<form action=\"profilepage.php?type=" . $type->getId() . "\" method=\"post\">\n"; echo "<form id=\"profilepage\" action=\"profilepage.php?type=" . $type->getId() . "\" method=\"post\">\n";
echo '<input type="hidden" name="' . getSecurityTokenName() . '" value="' . getSecurityTokenValue() . '">'; echo '<input type="hidden" name="' . getSecurityTokenName() . '" value="' . getSecurityTokenValue() . '">';
$profName = ''; $profName = '';
@ -251,17 +251,7 @@ $_SESSION['profile_types'] = array_merge($_SESSION['profile_types'], parseHtml(n
?> ?>
<script type="text/javascript"> <script type="text/javascript">
jQuery(document).ready(function() { jQuery("#profilepage").validationEngine();
var maxWidth = 0;
jQuery('fieldset').each(function() {
if (jQuery(this).width() > maxWidth) {
maxWidth = jQuery(this).width();
};
});
jQuery('fieldset').each(function() {
jQuery(this).css({'width': maxWidth});
});
});
</script> </script>
</form> </form>
</div> </div>