Beispiel #1
0
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\User\\Activity')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('activity', 'Activity');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $summary = new Textarea('summary', 'Summary', $record->summary);
     $summary->setDisabled(true);
     $panel->add($summary);
     if ($this->user->isAnonymous() || $this->user->hasInputExceeded()) {
         $captcha = new Captcha('captcha', 'Captcha');
         $captcha->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/core/captcha');
         $panel->add($captcha);
     }
     $form->setContainer($panel);
     return $form;
 }
Beispiel #2
0
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Oauth')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('api', 'API');
     $id = new Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $status = new Select('status', 'Status', $record->status);
     $status->setOptions($this->getStatus());
     $status->setDisabled(true);
     $panel->add($status);
     $name = new Input('name', 'Name', $record->name);
     $name->setType('text');
     $name->setDisabled(true);
     $panel->add($name);
     $email = new Input('email', 'Email', $record->email);
     $email->setType('email');
     $email->setDisabled(true);
     $panel->add($email);
     $url = new Input('url', 'Url', $record->url);
     $url->setType('url');
     $url->setDisabled(true);
     $panel->add($url);
     $title = new Input('title', 'Title', $record->title);
     $title->setType('text');
     $title->setDisabled(true);
     $panel->add($title);
     $description = new Textarea('description', 'Description', $record->description);
     $description->setDisabled(true);
     $panel->add($description);
     $callback = new Input('callback', 'Callback', $record->callback);
     $callback->setType('url');
     $callback->setDisabled(true);
     $panel->add($callback);
     if ($this->user->isAnonymous() || $this->user->hasInputExceeded()) {
         $captcha = new Captcha('captcha', 'Captcha');
         $captcha->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/core/captcha');
         $panel->add($captcha);
     }
     $form->setContainer($panel);
     return $form;
 }
Beispiel #3
0
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\File')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('page', 'Page');
     $id = new Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $contentType = new Input('contentType', 'Content Type', $record->contentType);
     $contentType->setType('text');
     $contentType->setDisabled(true);
     $panel->add($contentType);
     $content = new Textarea('content', 'Content', $record->content);
     $content->setDisabled(true);
     $panel->add($content);
     if ($this->user->isAnonymous() || $this->user->hasInputExceeded()) {
         $captcha = new Captcha('captcha', 'Captcha');
         $captcha->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/core/captcha');
         $panel->add($captcha);
     }
     $form->setContainer($panel);
     return $form;
 }