step2.htm revision 8808515820f87041605d89a6c044a259567569f4
369N/A<script type="text/javascript">
369N/A
369N/A var serverURLValid = true;
369N/A var platformLocaleValid = true;
369N/A var configDirectoryValid = true;
369N/A var encryptionKeyValid = true;
369N/A var cookieDomainValid = true;
369N/A
369N/A function serverFieldsValid() {
369N/A $('nextTabButton').disabled =
369N/A !(serverURLValid &&
369N/A platformLocaleValid &&
369N/A configDirectoryValid &&
369N/A encryptionKeyValid &&
369N/A cookieDomainValid);
369N/A }
369N/A
369N/A function validateInput(field, handler) {
369N/A var callUrl = "$context$path?actionLink=validateInput";
369N/A var key = "&key=" + field;
5680N/A var value = "&value=" + $(field).value;
5680N/A ie7fix++;
5622N/A callUrl = callUrl + "&ie7fix=" + ie7fix;
369N/A if (handler != null) {
5680N/A AjaxUtils.call(callUrl+key+value, handler);
5680N/A } else {
369N/A AjaxUtils.call(callUrl+key+value, serverFieldValidated);
369N/A }
5706N/A }
844N/A
5706N/A function serverURLFieldValidated(response) {
5622N/A validated(response, "serverURL");
369N/A }
5680N/A
369N/A function serverFieldValidated(response) {
5680N/A validated(response, field);
4659N/A }
5706N/A
5706N/A function validated(response, field) {
369N/A if (response.responseText == "true") {
369N/A eval(field + "Valid = true;" );
369N/A $(field + 'Status').innerHTML = okString;
369N/A } else if (response.responseText.search("warning") == 0) {
369N/A eval(field + "Valid = true;" );
369N/A $(field + 'Status').innerHTML = warningImage +
'<small>' + response.responseText.substring(7) + '</small>';
} else {
eval(field + "Valid = false;" );
$(field + 'Status').innerHTML = errorImage +
'<small>' + response.responseText + '</small>';
}
serverFieldsValid();
field = "";
}
function validateServerURL() {
validateInput("serverURL", serverURLFieldValidated);
validateCookieDomain();
}
function validateLocale() {
field = "platformLocale";
validateInput(field, null);
}
function validateConfigDir() {
field = "configDirectory";
var callUrl = "$context$path?actionLink=validateConfigDir&dir=" +
encodeURIComponent($(field).value);
ie7fix++;
callUrl = callUrl + "&ie7fix=" + ie7fix;
AjaxUtils.call(callUrl, serverFieldValidated);
}
function validateCookieDomain() {
field = "cookieDomain";
var callUrl = "$context$path?actionLink=validateCookieDomain&domain=" +
encodeURIComponent($(field).value) + "&serverurl=" + encodeURIComponent($("serverURL").value);
ie7fix++;
callUrl = callUrl + "&ie7fix=" + ie7fix;
AjaxUtils.call(callUrl, serverFieldValidated);
}
</script>
<div style="margin-left:10px;">
<h1>$page.getLocalizedString("step2.title")<img class="pointer" src="$context/assets/images/message.gif"/></h1>
<p>$page.getLocalizedString("step2.description")</p>
<div id="serverSettingsDiv" style="width:610px;">
<p id="allfields"><em>*</em>&nbsp;$page.getLocalizedString("required.field.label")</p>
<b class="xtop"><b class="xt1"></b><b class="xt2"></b><b class="xt3"></b><b class="xt4"></b></b>
<div class="headerBox" >$page.getLocalizedString("step2.server.settings")</div>
<div class="bodyBox" style="height:220px;">
<span>
<table class="temp">
<tr>
<td><label for="serverURL"><em>*&nbsp;</em>$page.getLocalizedString("step2.server.url")</label></td>
<td>
<input id="serverURL" name="serverURL" type="text"
class="text" size="40"
value="$serverURL"
onkeyup="APP.callDelayed(this, validateServerURL)"
onchange="APP.callDelayed(this, validateServerURL)"/>
<span id="serverURLStatus"></span>
</td>
</tr>
<tr>
<td><label for="cookieDomain"><em>*&nbsp;</em>$page.getLocalizedString("step2.cookie.domain")</label></td>
<td>
<input id="cookieDomain" name="cookieDomain" type="text"
class="text" style="width:150px"
value="$cookieDomain"
onkeyup="APP.callDelayed(this, validateCookieDomain)"
onchange="APP.callDelayed(this, validateCookieDomain)"/>
<span id="cookieDomainStatus"></span>
</td>
</tr>
<tr>
<td><label for="platformLocale"><em>*&nbsp;</em>$page.getLocalizedString("step2.platform.locale")</label></td>
<td>
<input id="platformLocale" name="platformLocale" type="text" class="text" style="width:150px" value="$platformLocale" onchange="APP.callDelayed(this, validateLocale)"/>
<span id="platformLocaleStatus"></span>
</td>
</tr>
<tr>
<td><label for="configDirectory"><em>*&nbsp;</em>$page.getLocalizedString("step2.config.directory")</label></td>
<td>
<input id="configDirectory" name="configDirectory"
type="text" class="text" size="40"
value="$configDirectory" onkeyup="APP.callDelayed(this, validateConfigDir)" />
<span id="configDirectoryStatus">$initialCheck</span>
</td>
</tr>
</table>
</span>
</div>
<div>
<b class="xbottom">
<b class="xbGray1"></b>
<b class="xbGray2"></b>
<b class="xbGray3"></b>
<b class="xbGray4"></b>
</b>
</div>
</div>
</div> <!-- indent div -->