10 'class' =>
'elgg-button-cancel mlm',
14 if (0) { ?><script><?php }
17 elgg.provide(
'elgg.walled_garden');
19 elgg.walled_garden.init =
function () {
21 require([
'elgg/spinner']);
22 $(
'.forgot_link').click(elgg.walled_garden.load(
'lost_password'));
23 $(
'.registration_link').click(elgg.walled_garden.load(
'register'));
25 $(
'input.elgg-button-cancel').live(
'click',
function(event) {
26 var $wgs = $(
'.elgg-walledgarden-single');
27 if ($wgs.is(
':visible')) {
28 $(
'.elgg-walledgarden-double').fadeToggle();
32 event.preventDefault();
42 elgg.walled_garden.load =
function(
view) {
43 return function(event) {
44 require([
'elgg/spinner'],
function(spinner) {
45 var
id =
'#elgg-walledgarden-' +
view;
46 id =
id.replace(
'_',
'-');
48 elgg.get(
'walled_garden/' +
view, {
49 beforeSend: spinner.start,
50 complete: spinner.stop,
52 var $wg = $(
'.elgg-body-walledgarden');
54 $(id).find(
'input.elgg-button-submit').after(<?php echo
$cancel_button; ?>);
56 if (
view ==
'register' && $wg.hasClass(
'hidden')) {
58 $(
'#elgg-walledgarden-login').toggle(
false);
60 $wg.removeClass(
'hidden');
62 $(
'#elgg-walledgarden-login').fadeToggle();
70 event.preventDefault();
74 elgg.register_hook_handler(
'init',
'system', elgg.walled_garden.init);
$CONFIG view
The current view type.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
$cancel_button
Walled garden JavaScript.
elgg message elgg state success
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype='')
Return a parsed view.