Subversion Repositories oidplus

Compare Revisions

No changes between revisions

Regard whitespace Rev 1035 → Rev 1036

/trunk/TODO
128,7 → 128,6
- Object type plugins : take care that "treeicon.png" and "icon_big.png" exist everywhere (become standard)
- freeoid: gmail app does not hyperlink the activation URL. why?
- how to avoid invite spamming?
- when a PHP error happens (i.e. the AJAX script did not manage to output a JSON), the AJAX script outputs "Error: SyntaxError: Unexpected token < in JSON at position 0" ... better show the user the actual message, or something more user-friendly at least
- when login expired, remove entries in the treeview
- disable specific functions (e.g. invite, login, rainfo, forgot password) if the plugins are not installed (check if class type is registered using class_exists())
- <abbr> in <code> is double underlined; that's not good
/trunk/doc/config_values.txt
137,7 → 137,15
OIDplus::ENFORCE_SSL_YES (1) = (on)
OIDplus::ENFORCE_SSL_AUTO (2) = (auto detect SSL)
 
OIDplus::baseConfig()->setValue('VTS_CAPTCHA_COMPLEXITY', 50000);
Only used if CAPTCHA_PLUGIN=ViaThinkSoft Client Challenge
 
OIDplus::baseConfig()->setValue('VTS_CAPTCHA_AUTOSOLVE', true);
Only used if CAPTCHA_PLUGIN=ViaThinkSoft Client Challenge
 
OIDplus::baseConfig()->setValue('VTS_CAPTCHA_MAXTIME', 10*60/*10 minutes*/);
Only used if CAPTCHA_PLUGIN=ViaThinkSoft Client Challenge
 
----------------------
(2) SYSTEM LIMITATIONS (defined and documented in includes/oidplus_limits.inc.php , can be overwritten by config.inc.php)
----------------------
189,7 → 197,7
OIDplus::baseConfig()->setValue('OBJECT_CACHING', true);
 
OIDplus::baseConfig()->setValue('FORCE_DBMS_SLANG', '');
Currently valid values: mysql, mssql, pgsql, sqlite
Currently valid values: access, mssql, mysql, oracle, pgsql, sqlite
 
OIDplus::baseConfig()->setValue('PREPARED_STATEMENTS_EMULATION', 'auto');
Currently only for ODBC database plugin.
359,9 → 367,9
OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_CLIENT_SECRET', '.............');
 
 
-------------------------------------------------------------------------
--------------------------------------------------------------------------
(6) FACEBOOK OAUTH2 FIELDS (see document facebook_oauth2_installation.txt)
-------------------------------------------------------------------------
--------------------------------------------------------------------------
 
OIDplus::baseConfig()->setValue('FACEBOOK_OAUTH2_ENABLED', true);
OIDplus::baseConfig()->setValue('FACEBOOK_OAUTH2_CLIENT_ID', '.............'); // Your App ID
403,3 → 411,13
OIDplus::baseConfig()->setValue('JWT_TTL_LOGIN_ADMIN', 10*365*24*60*60);
How many seconds will a "remember me" login JWT token be valid?
(Administrator login)
 
 
----------------------------------------------------
(8) THIRD-PARTY PLUGINS
----------------------------------------------------
 
OIDplus::baseConfig()->setValue('RDAP_CACHE_ENABLED', false );
OIDplus::baseConfig()->setValue('RDAP_CACHE_DIRECTORY', OIDplus::localpath().'userdata/cache/' );
OIDplus::baseConfig()->setValue('RDAP_BASE_URI', OIDplus::webpath() );
OIDplus::baseConfig()->setValue('RDAP_CACHE_EXPIRES', 60 * 3 );
/trunk/includes/oidplus_base.js
569,3 → 569,21
// TODO: as toast?
alert(txt);
}
 
/* AJAX success/error-handling */
 
function oidplus_ajax_error(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
console.error(errorThrown, jqXHR);
alertError(_L("Error: %1", errorThrown));
}
 
function oidplus_ajax_success(data, cb) {
if (typeof data === "object" && "error" in data) {
alertError(_L("Error: %1", data.error));
} else if (typeof data === "object" && data.status >= 0) {
cb(data);
} else {
alertError(_L("Error: %1", data));
}
}
/trunk/oidplus.min.js.php
63,9 → 63,9
$translation_array = OIDplus::getTranslationArray();
$files[] = 'var language_messages = '.json_encode($translation_array).';';
 
//$tbl_prefix = OIDplus::baseConfig()->getValue('OIDPLUS_TABLENAME_PREFIX','');
//$tbl_prefix = OIDplus::baseConfig()->getValue('TABLENAME_PREFIX','');
//$files[] = 'var language_tblprefix = '.json_encode($tbl_prefix).';';
$files[] = 'var language_tblprefix = "<tableprefix>";'; // hide OIDPLUS_TABLENAME_PREFIX from the client
$files[] = 'var language_tblprefix = "<tableprefix>";'; // hide TABLENAME_PREFIX from the client
 
// The CSRF token is set by index.php
// TODO: can there race-conditions if we set csrf_token here? Or should we set it as inline-script in index.php ?
/trunk/plugins/tushevorg/publicPages/2000_uitweaks/OIDplusPagePublicUITweaks.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/adminPages/110_system_config/OIDplusPageAdminSystemConfig.js
37,19 → 37,12
name: name,
value: $("#config_"+$.escapeSelector(name))[0].value,
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Update OK"));
} else {
alertError(_L("Error: %1",data));
});
}
}
});
}
 
/trunk/plugins/viathinksoft/adminPages/120_registration/OIDplusPageAdminRegistration.js
42,19 → 42,12
name: 'reg_privacy',
value: $("#reg_privacy")[0].value,
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Update OK"));
} else {
alertError(_L("Error: %1",data));
});
}
}
});
}
 
/trunk/plugins/viathinksoft/adminPages/130_create_ra/OIDplusPageAdminCreateRa.js
38,22 → 38,15
password1: $("#password1").val(),
password2: $("#password2").val()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Account created"));
//openOidInPanel('oidplus:rainfo$'+$("#email").val(),true);
// We need to reload the whole page, because the tree at the left contains a "List RA" list with the RAs
window.location.href = '?goto='+encodeURIComponent('oidplus:rainfo$'+$("#email").val());
} else {
alertError(_L("Error: %1",data));
});
}
}
});
return false;
}
/trunk/plugins/viathinksoft/adminPages/400_oidinfo_export/OIDplusPageAdminOIDInfoExport.js
40,20 → 40,13
action: "import_oidinfo_oid",
oid: oid
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
console.log(_L("Imported OID %1",oid));
OIDplusPageAdminOIDInfoExport.removeMissingOid(oid);
} else {
alertError(_L("Error: %1",data));
});
}
}
});
},
 
79,14 → 72,11
$.xhrPool.remove(jqXHR);
},
data: form_data,
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
// TODO XXX: (Future feature) If the user decides that existing OIDs shall be overwritten, then we may not print "Ignored OIDs because they are already existing"
if ("error" in data) {
if ("count_imported_oids" in data) {
if (typeof data === "object" && "error" in data) {
if (typeof data === "object" && "count_imported_oids" in data) {
// TODO: Device if alertSuccess, alertWarning oder alertError is shown
alertSuccess(_L("Successfully imported OIDs: %1",data.count_imported_oids)+"\n"+
_L("Ignored OIDs because they are already existing: %1",data.count_already_existing)+"\n"+
99,7 → 89,7
} else {
alertError(_L("Error: %1",data.error));
}
} else if (data.status >= 0) {
} else if (typeof data === "object" && data.status >= 0) {
// TODO: Device if alertSuccess, alertWarning oder alertError is shown
alertSuccess(_L("Successfully imported OIDs: %1",data.count_imported_oids)+"\n"+
_L("Ignored OIDs because they are already existing: %1",data.count_already_existing)+"\n"+
107,7 → 97,7
_L("Warnings: %1",data.count_warnings));
$('#userfile').val('');
} else {
if ("count_imported_oids" in data) {
if (typeof data === "object" && "count_imported_oids" in data) {
// TODO: Device if alertSuccess, alertWarning oder alertError is shown
alertSuccess(_L("Successfully imported OIDs: %1",data.count_imported_oids)+"\n"+
_L("Ignored OIDs because they are already existing: %1",data.count_already_existing)+"\n"+
/trunk/plugins/viathinksoft/adminPages/700_colors/OIDplusPageAdminColors.js
144,14 → 144,9
invcolors: $("#icolor").is(':checked') ? 1 : 0,
theme: $("#theme")[0].value,
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
OIDplusPageAdminColors.hue_shift_saved = OIDplusPageAdminColors.hue_shift;
OIDplusPageAdminColors.sat_shift_saved = OIDplusPageAdminColors.sat_shift;
OIDplusPageAdminColors.val_shift_saved = OIDplusPageAdminColors.val_shift;
158,10 → 153,8
OIDplusPageAdminColors.invcolors_saved = OIDplusPageAdminColors.invcolors;
OIDplusPageAdminColors.test_color_theme(); // apply visually
alertSuccess(_L("Update OK"));
} else {
alertError(_L("Error: %1",data));
});
}
}
});
}
 
/trunk/plugins/viathinksoft/adminPages/900_software_update/OIDplusPageAdminSoftwareUpdate.js
64,18 → 64,18
},
success: function(data) {
//hide_waiting_anim();
if ("error" in data) {
if (typeof data === "object" && "error" in data) {
$("#update_header").text(_L("Update failed"));
//alertError(_L("Error: %1",data.error));
if ("content" in data) {
if (typeof data === "object" && "content" in data) {
$("#update_infobox").html($("#update_infobox").html() + "\n\n" + data.content + "\n\n" + '<span class="severity_4"><strong>' + _L('FATAL ERROR') + ':</strong></span> ' + data.error + "\n\n");
} else {
$("#update_infobox").html($("#update_infobox").html() + "\n\n" + '<span class="severity_4"><strong>' + _L('FATAL ERROR') + ':</strong></span> ' + data.error + "\n\n");
}
$("#update_infobox").html($("#update_infobox").html() + '\n\n<input type="button" onclick="location.reload()" value="'+_L('Reload page')+'">');
} else if (data.status >= 0) {
} else if (typeof data === "object" && data.status >= 0) {
 
if (!("update_file" in data)) {
if (!(typeof data === "object" && "update_file" in data)) {
 
output = data.content.trim();
output = output.replace(/INFO:/g, '<span class="severity_2"><strong>' + _L('INFO') + ':</strong></span>');
/trunk/plugins/viathinksoft/adminPages/910_automated_ajax_calls/OIDplusPageAdminAutomatedAJAXCalls.js
35,20 → 35,13
plugin:OIDplusPageAdminAutomatedAJAXCalls.oid,
action:"blacklistJWT"
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("OK"));
reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
}
 
/trunk/plugins/viathinksoft/captcha/hcaptcha/OIDplusCaptchaPluginHCaptcha.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/captcha/hcaptcha/OIDplusCaptchaPluginHCaptchaSetup.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/captcha/none/OIDplusCaptchaPluginNone.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/captcha/none/OIDplusCaptchaPluginNoneSetup.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/captcha/recaptcha/OIDplusCaptchaPluginRecaptchaSetup.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/captcha/vts_challenge/OIDplusCaptchaPluginVtsClientChallenge.js
76,26 → 76,21
},
error:function(jqXHR, textStatus, errorThrown) {
hide_waiting_anim();
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
oidplus_ajax_error(jqXHR, textStatus, errorThrown);
},
success:function(data) {
if ("error" in data) {
hide_waiting_anim();
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
OIDplusCaptchaPluginVtsClientChallenge.currentchallenge = data.challenge;
OIDplusCaptchaPluginVtsClientChallenge.currentresponse = null;
console.log("VTS Challenge: Loading of challenge complete");
if (data.autosolve) {
// That's ok, because the GUI is locked anyway
show_waiting_anim();
OIDplusCaptchaPluginVtsClientChallenge.currentresponse = OIDplusCaptchaPluginVtsClientChallenge.captchaResponse();
}
hide_waiting_anim();
} else {
hide_waiting_anim();
alertError(_L("Error: %1",data));
}
});
}
});
 
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/captcha/vts_challenge/OIDplusCaptchaPluginVtsClientChallengeSetup.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/database/oci/OIDplusDatabasePluginOciSetup.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/objectTypes/aid/OIDplusObjectTypePluginAid.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/objectTypes/oid/OIDplusObjectTypePluginOid.js
35,24 → 35,13
plugin:OIDplusPagePublicObjects.oid,
action:"generate_uuid"
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
if (data.status == 0/*OK*/) {
oidplus_ajax_success(data, function (data) {
$("#id").val(absolute ? "2.25." + data.intval : data.intval);
alertSuccess(_L("OK! Generated UUID %1 which resolves to OID %2", data.uuid, "2.25."+data.intval));
} else {
alertError(_L("Error: %1",data.status));
});
}
} else {
alertError(_L("Error: %1",data));
}
}
});
}
 
/trunk/plugins/viathinksoft/objectTypes/oid/WeidOidConverter.js
Property changes:
Added: svn:mime-type
+text/javascript
\ No newline at end of property
/trunk/plugins/viathinksoft/publicPages/000_objects/OIDplusPagePublicObjects.js
104,14 → 104,9
weid:($("#weid")[0] ? $("#weid")[0].checked : null),
parent:parent
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
if (data.status == 0/*OK*/) {
if (confirm(_L("Insert OK.")+"\n\n"+_L("Do you want to open the newly created object now?"))) {
openAndSelectNode(data.inserted_id, parent);
147,10 → 142,8
 
// TODO: Don't use reloadContent(); instead add a node at the tree at the left add at the right add a new row to the table
reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
},
 
179,14 → 172,9
confidential:($("#hide_"+$.escapeSelector(id))[0] ? $("#hide_"+$.escapeSelector(id))[0].checked : null),
parent:parent
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
if (data.status == 0/*OK*/) {
alertSuccess(_L("Update OK"));
}
208,10 → 196,8
 
// reloadContent();
$('#oidtree').jstree("refresh");
} else {
alertError(_L("Error: %1",data));
});
}
}
});
},
 
235,20 → 221,13
id:id,
parent:parent
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
reloadContent();
// TODO: Don't use reloadContent(); instead delete node at the left tree and remove the row at the right table
} else {
alertError(_L("Error: %1",data.error));
});
}
}
});
},
 
272,14 → 251,9
//description:($("#description")[0] ? $("#description")[0].value : null)
description:tinyMCE.get('description').getContent()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Update OK"));
//reloadContent();
$('#oidtree').jstree("refresh");
292,10 → 266,8
 
var mce = tinymce.get('description');
if (mce != null) mce.setDirty(false);
} else {
alertError(_L("Error: %1",data.error));
});
}
}
});
},
 
/trunk/plugins/viathinksoft/publicPages/001_ra_base/OIDplusPagePublicRaBaseUtils.js
39,14 → 39,9
action:"delete_ra",
email:email,
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Done"));
if (goto != null) {
$("#gotoedit").val(goto);
53,10 → 48,8
window.location.href = "?goto="+encodeURIComponent(goto);
}
// reloadContent();
} else {
alertError(_L("Error: %1",data.error));
});
}
}
});
}
 
/trunk/plugins/viathinksoft/publicPages/090_login/OIDplusPagePublicLogin.js
40,20 → 40,13
action:"ra_logout",
email:email,
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
window.location.href = '?goto=oidplus%3Asystem';
// reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
},
 
78,22 → 71,18
captcha: oidplus_captcha_response()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
oidplus_ajax_error(jqXHR, textStatus, errorThrown);
oidplus_captcha_reset();
},
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
oidplus_captcha_reset();
} else if (data.status >= 0) {
var ok = false;
oidplus_ajax_success(data, function (data) {
window.location.href = '?goto=oidplus%3Asystem';
// reloadContent();
} else {
alertError(_L("Error: %1",data));
oidplus_captcha_reset();
ok = true;
});
if (!ok) oidplus_captcha_reset();
}
}
});
},
 
125,22 → 114,18
captcha: oidplus_captcha_response()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
oidplus_ajax_error(jqXHR, textStatus, errorThrown);
oidplus_captcha_reset();
},
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
oidplus_captcha_reset();
} else if (data.status >= 0) {
var ok = false;
oidplus_ajax_success(data, function (data) {
window.location.href = '?goto=oidplus%3Asystem';
// reloadContent();
} else {
alertError(_L("Error: %1",data));
oidplus_captcha_reset();
ok = true;
});
if (!ok) oidplus_captcha_reset();
}
}
});
},
 
162,20 → 147,13
plugin:OIDplusPagePublicLogin.oid,
action:"admin_logout",
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
window.location.href = '?goto=oidplus%3Asystem';
// reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
},
 
/trunk/plugins/viathinksoft/publicPages/091_forgot_password/OIDplusPagePublicForgotPassword.js
38,23 → 38,19
captcha: oidplus_captcha_response()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
oidplus_ajax_error(jqXHR, textStatus, errorThrown);
oidplus_captcha_reset();
},
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
oidplus_captcha_reset();
} else if (data.status >= 0) {
var ok = false;
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("E-Mail sent."));
window.location.href = '?goto=oidplus%3Alogin';
//reloadContent();
} else {
alertError(_L("Error: %1",data));
oidplus_captcha_reset();
ok = true;
});
if (!ok) oidplus_captcha_reset();
}
}
});
return false;
},
80,21 → 76,14
password2: $("#password2").val(),
timestamp: $("#timestamp").val()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Password successfully changed. You can now log in."));
window.location.href = '?goto=oidplus%3Alogin';
//reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
return false;
}
/trunk/plugins/viathinksoft/publicPages/095_attachments/OIDplusPagePublicAttachments.js
47,20 → 47,13
id:id,
filename:file,
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("OK"));
reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
},
 
87,21 → 80,14
$.xhrPool.remove(jqXHR);
},
data: form_data,
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("OK"));
$('#fileAttachment').val('');
reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
},
 
/trunk/plugins/viathinksoft/publicPages/200_viathinksoft_freeoid/OIDplusPagePublicFreeOID.js
38,23 → 38,19
captcha: oidplus_captcha_response()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
oidplus_ajax_error(jqXHR, textStatus, errorThrown);
oidplus_captcha_reset();
},
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
oidplus_captcha_reset();
} else if (data.status >= 0) {
var ok = false;
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Instructions have been sent via email."));
window.location.href = '?goto=oidplus%3Asystem';
//reloadContent();
} else {
alertError(_L("Error: %1",data));
oidplus_captcha_reset();
ok = true;
});
if (!ok) oidplus_captcha_reset();
}
}
});
return false;
},
83,21 → 79,14
password2: $("#password2").val(),
timestamp: $("#timestamp").val()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Registration successful! You received OID %1 and can now start using it.",data.new_oid));
window.location.href = '?goto=oidplus%3Alogin';
//reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
return false;
}
/trunk/plugins/viathinksoft/publicPages/300_search/OIDplusPagePublicSearch.js
41,19 → 41,12
search_asn1id: $("#search_asn1id:checked").length,
search_iri: $("#search_iri:checked").length
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
$("#search_output").html(data.output)
} else {
alertError(_L("Error: %1",data));
});
}
}
});
 
return false; // Don't call the normal form submit (it is for Non-JS only)
/trunk/plugins/viathinksoft/publicPages/800_login_ldap/OIDplusPagePublicLoginLDAP.js
42,22 → 42,18
captcha: oidplus_captcha_response()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
oidplus_ajax_error(jqXHR, textStatus, errorThrown);
oidplus_captcha_reset();
},
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
oidplus_captcha_reset();
} else if (data.status >= 0) {
var ok = false;
oidplus_ajax_success(data, function (data) {
window.location.href = '?goto=oidplus%3Asystem';
// reloadContent();
} else {
alertError(_L("Error: %1",data));
oidplus_captcha_reset();
ok = true;
});
if (!ok) oidplus_captcha_reset();
}
}
});
},
 
/trunk/plugins/viathinksoft/raPages/092_invite/OIDplusPageRaInvite.js
38,23 → 38,19
captcha: oidplus_captcha_response()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
oidplus_ajax_error(jqXHR, textStatus, errorThrown);
oidplus_captcha_reset();
},
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
oidplus_captcha_reset();
} else if (data.status >= 0) {
var ok = false;
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("The RA has been invited via email."));
window.location.href = '?goto='+$("#origin").val();
//reloadContent();
} else {
alertError(_L("Error: %1",data));
oidplus_captcha_reset();
ok = true;
});
if (!ok) oidplus_captcha_reset();
}
}
});
return false;
},
80,21 → 76,14
password2: $("#password2").val(),
timestamp: $("#timestamp").val()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Registration successful! You can now log in."));
window.location.href = '?goto=oidplus%3Alogin';
//reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
return false;
}
/trunk/plugins/viathinksoft/raPages/100_edit_contact_data/OIDplusPageRaEditContactData.js
47,21 → 47,14
mobile: $("#mobile").val(),
fax: $("#fax").val()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Done"));
//window.location.href = '?goto=oidplus%3Asystem';
//reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
return false;
}
/trunk/plugins/viathinksoft/raPages/101_change_password/OIDplusPageRaChangePassword.js
39,21 → 39,14
new_password1: $("#new_password1").val(),
new_password2: $("#new_password2").val()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Done"));
//window.location.href = '?goto=oidplus%3Asystem';
//reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
return false;
}
/trunk/plugins/viathinksoft/raPages/102_change_email/OIDplusPageRaChangeEMail.js
37,14 → 37,9
old_email: $("#old_email").val(),
new_email: $("#new_email").val(),
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
if (isadmin) {
alertSuccess(_L("eMail address of RA changed"));
//openOidInPanel('oidplus:rainfo$'+$("#new_email").val(),true);
55,10 → 50,8
//window.location.href = '?goto=oidplus%3Asystem';
//reloadContent();
}
} else {
alertError(_L("Error: %1",data));
});
}
}
});
return false;
},
84,21 → 77,14
auth: $("#auth").val(),
timestamp: $("#timestamp").val()
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success: function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("Done"));
window.location.href = '?goto=oidplus%3Asystem';
//reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
return false;
}
/trunk/plugins/viathinksoft/raPages/910_automated_ajax_calls/OIDplusPageRaAutomatedAJAXCalls.js
36,20 → 36,13
action:"blacklistJWT",
user:user
},
error:function(jqXHR, textStatus, errorThrown) {
if (errorThrown == "abort") return;
alertError(_L("Error: %1",errorThrown));
},
error: oidplus_ajax_error,
success:function(data) {
if ("error" in data) {
alertError(_L("Error: %1",data.error));
} else if (data.status >= 0) {
oidplus_ajax_success(data, function (data) {
alertSuccess(_L("OK"));
reloadContent();
} else {
alertError(_L("Error: %1",data));
});
}
}
});
}
 
/trunk/setup/setup.min.js.php
37,9 → 37,9
$translation_array = OIDplus::getTranslationArray();
$files[] = 'var language_messages = '.json_encode($translation_array).';';
 
//$tbl_prefix = OIDplus::baseConfig()->getValue('OIDPLUS_TABLENAME_PREFIX','');
//$tbl_prefix = OIDplus::baseConfig()->getValue('TABLENAME_PREFIX','');
//$files[] = 'var language_tblprefix = '.json_encode($tbl_prefix).';';
$files[] = 'var language_tblprefix = "<tableprefix>";'; // hide OIDPLUS_TABLENAME_PREFIX from the client
$files[] = 'var language_tblprefix = "<tableprefix>";'; // hide TABLENAME_PREFIX from the client
 
$files[] = 'var setupdir = "'.((OIDplus::isSSL() ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"] . dirname($_SERVER['REQUEST_URI'])).'/";';
$files[] = 'var rebuild_callbacks = [];'; // Ask the database or captcha plugins for verification of their data