forked from GNUsocial/gnu-social
Added XHR for form_entity_flag
This commit is contained in:
parent
dbe02049a8
commit
686c2e5e06
@ -140,4 +140,12 @@ class UserFlagPlugin extends Plugin
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function onEndShowScripts($action)
|
||||
{
|
||||
$action->elementStart('script', array('type' => 'text/javascript'));
|
||||
$action->raw('/*<![CDATA[*/ SN.U.FormXHR($(".form_entity_flag")); /*]]>*/');
|
||||
$action->elementEnd('script');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -108,7 +108,21 @@ class FlagprofileAction extends Action
|
||||
parent::handle($args);
|
||||
|
||||
$this->flagProfile();
|
||||
$this->returnTo();
|
||||
|
||||
if ($this->boolean('ajax')) {
|
||||
header('Content-Type: text/xml;charset=utf-8');
|
||||
$this->xw->startDocument('1.0', 'UTF-8');
|
||||
$this->elementStart('html');
|
||||
$this->elementStart('head');
|
||||
$this->element('title', null, _('Flagged for review'));
|
||||
$this->elementEnd('head');
|
||||
$this->elementStart('body');
|
||||
$this->element('p', 'flagged', _('Flagged'));
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
} else {
|
||||
$this->returnTo();
|
||||
}
|
||||
}
|
||||
|
||||
function title() {
|
||||
|
@ -94,7 +94,7 @@ class FlagProfileForm extends Form
|
||||
|
||||
function formClass()
|
||||
{
|
||||
return 'form_profile_flag';
|
||||
return 'form_entity_flag';
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user