Project

General

Profile

« Previous | Next » 

Revision 4544

Added by daigle about 16 years ago

Use validation for form submiTtal. This validates that all fields are populated.

View differences:

lib/admin/ldap-configuration.jsp
46 46

  
47 47

  
48 48
<form method="POST" name="configuration_form" action="<%= request.getContextPath() %>/admin" 
49
                                        onsubmit="return submitForm(this);">
49
                                        onsubmit="return validateAndSubmitForm(this);">
50 50
<% 
51 51
	// metadata holds all group and properties metadata
52 52
    PropertiesMetaData metadata = (PropertiesMetaData)request.getAttribute("metadata");
lib/admin/admin.js
35 35
    return true;
36 36
}
37 37

  
38
function submitForm(action,form_ref) {
39
	form_ref.action.value=action;
40
	form_ref.sessionId.value=<xsl:value-of select="$sessid" />;
38
function submitForm(form_ref) {
39
//	form_ref.action.value=action;
40
//	form_ref.sessionId.value=<xsl:value-of select="$sessid" />;
41 41
	form_ref.submit();
42 42
}
43 43

  
44
function validataAndSubmitForm(action,form_ref) {
45
	form_ref.action.value=action;
46
	form_ref.sessionId.value=<xsl:value-of select="$sessid" />;
47
	validateForm(form_ref)
44
function validateAndSubmitForm(form_ref) {
45
//	form_ref.action.value=action;
46
//	form_ref.sessionId.value=<xsl:value-of select="$sessid" />;
47
	if (!validateForm(form_ref)) {
48
		return false;
49
	}
48 50
	form_ref.submit();
51

  
49 52
}
50 53

  
51 54
function forward(location) {

Also available in: Unified diff