Esempio n. 1
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Oauth\\Request')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('request', 'Request');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $status = new Input('status', 'Status', $record->status);
     $status->setType('text');
     $status->setDisabled(true);
     $panel->add($status);
     $callback = new Input('callback', 'Callback', $record->callback);
     $callback->setType('text');
     $callback->setDisabled(true);
     $panel->add($callback);
     $expire = new Input('expire', 'Expire', $record->expire);
     $expire->setType('text');
     $expire->setDisabled(true);
     $panel->add($expire);
     $date = new Input('date', 'Date', $record->date);
     $date->setType('text');
     $date->setDisabled(true);
     $panel->add($date);
     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;
 }
Esempio n. 2
0
File: Form.php Progetto: visapi/amun
 public function update($id)
 {
     $record = $this->hm->getHandler('AmunService\\Core\\Registry')->getRecord($id);
     $form = new AmunForm('PUT', $this->url);
     $panel = new Panel('registry', 'Registry');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $name = new Input('name', 'Name', $record->name);
     $name->setType('text');
     $name->setDisabled(true);
     $panel->add($name);
     $value = new Input('value', 'Value', $record->value);
     $value->setType('text');
     $panel->add($value);
     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;
 }
Esempio n. 3
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Oauth\\Access')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('access', 'Access');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $api = new Input('api', 'API', $record->getApi()->name);
     $api->setType('text');
     $api->setDisabled(true);
     $panel->add($api);
     $user = new Input('user', 'User', $record->getUser()->name);
     $user->setType('text');
     $user->setDisabled(true);
     $panel->add($user);
     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;
 }
Esempio n. 4
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Core\\Service')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('service', 'Service');
     $id = new Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $name = new Input('name', 'Name', $record->name);
     $name->setType('text');
     $name->setDisabled(true);
     $panel->add($name);
     $type = new Input('type', 'Type', $record->type);
     $type->setType('text');
     $type->setDisabled(true);
     $panel->add($type);
     $link = new Input('link', 'Link', $record->link);
     $link->setType('text');
     $link->setDisabled(true);
     $panel->add($link);
     $license = new Input('license', 'License', $record->license);
     $license->setType('text');
     $license->setDisabled(true);
     $panel->add($license);
     $version = new Input('version', 'Version', $record->version);
     $version->setType('text');
     $version->setDisabled(true);
     $panel->add($version);
     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;
 }
Esempio n. 5
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\User\\Friend\\Group')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('group', 'Group');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $title = new Input('title', 'Title', $record->title);
     $title->setType('text');
     $title->setDisabled(true);
     $panel->add($title);
     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;
 }
Esempio n. 6
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Openid')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('connect', 'Connect');
     $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);
     $claimedId = new Input('claimedId', 'Claimed Id', $record->claimedId);
     $claimedId->setType('url');
     $claimedId->setDisabled(true);
     $panel->add($claimedId);
     $identity = new Input('identity', 'Identity', $record->identity);
     $identity->setType('url');
     $identity->setDisabled(true);
     $panel->add($identity);
     $returnTo = new Input('returnTo', 'Return to', $record->returnTo);
     $returnTo->setType('url');
     $returnTo->setDisabled(true);
     $panel->add($returnTo);
     $expire = new Input('expire', 'Expire', $record->expire);
     $expire->setType('text');
     $expire->setDisabled(true);
     $panel->add($expire);
     $date = new Input('date', 'Date', $record->date);
     $date->setType('text');
     $date->setDisabled(true);
     $panel->add($date);
     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;
 }
Esempio n. 7
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\User\\Friend')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('friend', 'Friend');
     $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);
     $userId = new Input('userId', 'User', $record->getUser()->name);
     $userId->setType('text');
     $userId->setDisabled(true);
     $panel->add($userId);
     $friendId = new Input('friendId', 'Friend ID', $record->getFriend()->name);
     $friendId->setType('text');
     $friendId->setDisabled(true);
     $panel->add($friendId);
     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;
 }
Esempio n. 8
0
File: Form.php Progetto: visapi/amun
 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;
 }
Esempio n. 9
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Content\\Gadget')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('gadget', 'Gadget');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $name = new Input('name', 'Name', $record->name);
     $name->setType('text');
     $name->setDisabled(true);
     $panel->add($name);
     $title = new Input('title', 'Title', $record->title);
     $title->setType('text');
     $title->setDisabled(true);
     $panel->add($title);
     $class = new Select('class', 'Class', $record->class);
     $class->setOptions($this->getGadget());
     $class->setDisabled(true);
     $panel->add($class);
     $type = new Select('type', 'Type', $record->type);
     $type->setOptions($this->getType());
     $panel->add($type);
     $right = new Select('rightId', 'Right', $record->rightId);
     $right->setOptions($this->getRights());
     $panel->add($right);
     $cache = new Input('cache', 'Cache', $record->cache);
     $cache->setType('checkbox');
     $cache->setDisabled(true);
     $panel->add($cache);
     $expire = new Input('expire', 'Expire', $record->expire);
     $expire->setType('text');
     $expire->setDisabled(true);
     $panel->add($expire);
     $param = new Input('param', 'Param', $record->getParam());
     $param->setType('text');
     $param->setDisabled(true);
     $panel->add($param);
     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;
 }
Esempio n. 10
0
File: Form.php Progetto: visapi/amun
 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;
 }
Esempio n. 11
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Core\\Host')->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);
     $consumerKey = new Input('consumerKey', 'Consumer key', $record->consumerKey);
     $consumerKey->setType('text');
     $consumerKey->setDisabled(true);
     $panel->add($consumerKey);
     $consumerSecret = new Input('consumerSecret', 'Consumer secret', $record->consumerSecret);
     $consumerSecret->setType('text');
     $consumerSecret->setDisabled(true);
     $panel->add($consumerSecret);
     $url = new Input('url', 'Url', $record->url);
     $url->setType('url');
     $url->setDisabled(true);
     $panel->add($url);
     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;
 }
Esempio n. 12
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Content\\Page')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $tabbedPane = new TabbedPane('page', 'Page');
     $panel = new Panel('settings', 'Settings');
     // settings
     $id = new Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $parentId = new Reference('parentId', 'Parent ID', $record->parentId);
     $parentId->setValueField('id');
     $parentId->setLabelField('title');
     $parentId->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/content/page');
     $parentId->setDisabled(true);
     $panel->add($parentId);
     $service = new Select('serviceId', 'Service', $record->serviceId);
     $service->setOptions($this->getService());
     $service->setDisabled(true);
     $panel->add($service);
     $status = new Select('status', 'Status', $record->status);
     $status->setOptions($this->getStatus());
     $status->setDisabled(true);
     $panel->add($status);
     $title = new Input('title', 'Title', $record->title);
     $title->setType('text');
     $title->setDisabled(true);
     $panel->add($title);
     $template = new Select('template', 'Template', $record->template);
     $template->setOptions($this->getTemplate());
     $template->setDisabled(true);
     $panel->add($template);
     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);
     }
     $tabbedPane->add($panel);
     // extras
     $panel = new Panel('extras', 'Extras');
     $description = new Input('description', 'Description', $record->description);
     $description->setType('text');
     $description->setDisabled(true);
     $panel->add($description);
     $keywords = new Input('keywords', 'Keywords', $record->keywords);
     $keywords->setType('text');
     $keywords->setDisabled(true);
     $panel->add($keywords);
     $right = new Select('rightId', 'Right', $record->rightId);
     $right->setOptions($this->getRights());
     $right->setDisabled(true);
     $panel->add($right);
     $sort = new Input('sort', 'Sort', $record->sort);
     $sort->setType('text');
     $sort->setDisabled(true);
     $panel->add($sort);
     $load = new Input('load', 'Load', $record->load);
     $load->setType('text');
     $load->setDisabled(true);
     $panel->add($load);
     $cache = new Input('cache', 'Cache', $record->cache);
     $cache->setType('text');
     $cache->setDisabled(true);
     $panel->add($cache);
     $expire = new Input('expire', 'Expire', $record->expire);
     $expire->setType('text');
     $expire->setDisabled(true);
     $panel->add($expire);
     $publishDate = new Input('publishDate', 'Publish date', $record->publishDate);
     $publishDate->setType('datetime');
     $expire->setDisabled(true);
     $panel->add($publishDate);
     $tabbedPane->add($panel);
     $form->setContainer($tabbedPane);
     return $form;
 }
Esempio n. 13
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Core\\Approval\\Record')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('record', 'Record');
     $id = new Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $type = new Select('type', 'Type', $record->type);
     $type->setOptions($this->getType());
     $type->setDisabled(true);
     $panel->add($type);
     $table = new Select('table', 'Table', $record->table);
     $table->setOptions($this->getTable());
     $table->setDisabled(true);
     $panel->add($table);
     /*
     $rec = new Input('record', 'Record', $record->record);
     $rec->setType('text');
     $rec->setDisabled(true);
     
     $panel->add($rec);
     */
     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;
 }
Esempio n. 14
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Content\\Page\\Gadget')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('gadget', 'Gadget');
     $id = new Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $pageId = new Reference('pageId', 'Page ID', $record->pageId);
     $pageId->setValueField('id');
     $pageId->setLabelField('title');
     $pageId->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/content/page');
     $pageId->setDisabled(true);
     $panel->add($pageId);
     $gadgetId = new Reference('gadgetId', 'Gadget ID', $record->gadgetId);
     $gadgetId->setValueField('id');
     $gadgetId->setLabelField('name');
     $gadgetId->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/content/gadget');
     $gadgetId->setDisabled(true);
     $panel->add($gadgetId);
     $sort = new Input('sort', 'Sort', $record->sort);
     $sort->setType('text');
     $sort->setDisabled(true);
     $panel->add($sort);
     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;
 }
Esempio n. 15
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\User\\Right')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('right', 'Right');
     $id = new Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $name = new Input('name', 'Name', $record->name);
     $name->setType('text');
     $name->setDisabled(true);
     $panel->add($name);
     $description = new Input('description', 'Description', $record->description);
     $description->setType('text');
     $description->setDisabled(true);
     $panel->add($description);
     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;
 }
Esempio n. 16
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Pipe')->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);
     $media = new Select('mediaId', 'Media', $record->mediaId);
     $media->setOptions($this->getMedia());
     $media->setDisabled(true);
     $panel->add($media);
     $processor = new Select('processor', 'Processor', $record->processor);
     $processor->setOptions($this->getProcessor());
     $processor->setDisabled(true);
     $panel->add($processor);
     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;
 }
Esempio n. 17
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\User\\Account')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('account', 'Account');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     if ($this->user->isAdministrator()) {
         $groupId = new Select('groupId', 'Group', $record->groupId);
         $groupId->setOptions($this->getGroup());
         $groupId->setDisabled(true);
         $panel->add($groupId);
         $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);
     $country = new Select('countryId', 'Country', $record->countryId);
     $country->setOptions($this->getCountry());
     $country->setDisabled(true);
     $panel->add($country);
     $gender = new Select('gender', 'Gender', $record->gender);
     $gender->setOptions($this->getGender());
     $gender->setDisabled(true);
     $panel->add($gender);
     $timezone = new Select('timezone', 'Timezone', $record->timezone);
     $timezone->setOptions($this->getTimezone());
     $timezone->setDisabled(true);
     $panel->add($timezone);
     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;
 }
Esempio n. 18
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Media')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Panel('media', 'Media');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $rightId = new Select('rightId', 'Right ID', $record->rightId);
     $rightId->setOptions($this->getRight());
     $rightId->setDisabled(true);
     $panel->add($rightId);
     $path = new Input('path', 'Path', $record->path);
     $path->setType('text');
     $path->setDisabled(true);
     $panel->add($path);
     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;
 }
Esempio n. 19
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Vcshook')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Element\Panel('vcshook', 'Vcshook');
     $id = new Element\Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $type = new Element\Select('type', 'Type', $record->type);
     $type->setOptions($this->getType());
     $type->setDisabled(true);
     $panel->add($type);
     $url = new Element\Input('url', 'Url', $record->url);
     $url->setType('url');
     $url->setDisabled(true);
     $panel->add($url);
     if ($this->user->isAnonymous() || $this->user->hasInputExceeded()) {
         $captcha = new Element\Captcha('captcha', 'Captcha');
         $captcha->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/system/captcha');
         $panel->add($captcha);
     }
     $form->setContainer($panel);
     return $form;
 }
Esempio n. 20
0
File: Form.php Progetto: visapi/amun
 public function delete($id)
 {
     $record = $this->hm->getHandler('AmunService\\Vcshook\\Author')->getRecord($id);
     $form = new AmunForm('DELETE', $this->url);
     $panel = new Element\Panel('author', 'Author');
     $id = new Element\Input('id', 'ID', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $userId = new Element\Reference('userId', 'User ID', $record->userId);
     $userId->setValueField('id');
     $userId->setLabelField('name');
     $userId->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/user/account');
     $userId->setDisabled(true);
     $panel->add($userId);
     $name = new Element\Input('name', 'Name', $record->name);
     $name->setType('text');
     $name->setDisabled(true);
     $panel->add($name);
     if ($this->user->isAnonymous() || $this->user->hasInputExceeded()) {
         $captcha = new Element\Captcha('captcha', 'Captcha');
         $captcha->setSrc($this->config['psx_url'] . '/' . $this->config['psx_dispatch'] . 'api/core/captcha');
         $panel->add($captcha);
     }
     $form->setContainer($panel);
     return $form;
 }
Esempio n. 21
0
File: Form.php Progetto: visapi/amun
 public function update($id)
 {
     $record = $this->hm->getHandler('AmunService\\Mail')->getRecord($id);
     $form = new AmunForm('PUT', $this->url);
     $panel = new Panel('mail', 'Mail');
     $id = new Input('id', 'Id', $record->id);
     $id->setType('hidden');
     $panel->add($id);
     $name = new Input('name', 'Name', $record->name);
     $name->setType('text');
     $panel->add($name);
     $from = new Input('from', 'From', $record->from);
     $from->setType('text');
     $panel->add($from);
     $subject = new Input('subject', 'Subject', $record->subject);
     $subject->setType('text');
     $panel->add($subject);
     $text = new Textarea('text', 'Text', $record->text);
     $panel->add($text);
     $html = new Textarea('html', 'Html', $record->html);
     $panel->add($html);
     $values = new Input('values', 'Values', $record->values);
     $values->setType('text');
     $panel->add($values);
     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;
 }