Version 3.0.5
This commit is contained in:
1 parent
19b38c7c74
commit
1d4720f3e2
3755 files changed
+508378
-664541
No files matched your search
@@ -0,0 +1,64 @@
|
||||
/************************************************/
|
||||
/* IPB3 Javascript */
|
||||
/* -------------------------------------------- */
|
||||
/* ips.subscriptions.js - Subs Manager Public */
|
||||
/* (c) IPS, Inc 2009 */
|
||||
/* -------------------------------------------- */
|
||||
/* Author: Matt Mecham, Rikki Tissier */
|
||||
/************************************************/
|
||||
|
||||
var _subscriptions = window.IPBoard;
|
||||
|
||||
_subscriptions.prototype.subscriptions = {
|
||||
initDone: false,
|
||||
|
||||
/*------------------------------*/
|
||||
/* Constructor */
|
||||
init: function()
|
||||
{
|
||||
document.observe("dom:loaded", function()
|
||||
{
|
||||
if ( ipb.subscriptions.initDone === false )
|
||||
{
|
||||
/* Set up submit handler */
|
||||
$('register').observe( 'submit', ipb.subscriptions.formSubmit );
|
||||
|
||||
ipb.subscriptions.initDone = true;
|
||||
|
||||
Debug.write("Initializing ips.subscriptions.js");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* handle a form submit
|
||||
*/
|
||||
formSubmit: function(e)
|
||||
{
|
||||
Event.stop(e);
|
||||
|
||||
var _go = false;
|
||||
|
||||
/* Did we check a radio button? */
|
||||
$$('.sm__radio').each( function( element )
|
||||
{
|
||||
if ( element.checked )
|
||||
{
|
||||
_go = true;
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
if ( _go !== true )
|
||||
{
|
||||
alert( 'Please choose a subscriptions package before continuing' );
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('register').submit();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ipb.subscriptions.init();
|
||||
Reference in new issue
Block a user