123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- class ProfileActionForm extends Form
- {
-
- var $profile = null;
-
- var $args = null;
-
- function __construct($out=null, $profile=null, $args=null)
- {
- parent::__construct($out);
- $this->profile = $profile;
- $this->args = $args;
- }
-
- function id()
- {
- return $this->target() . '-' . $this->profile->id;
- }
-
- function formClass()
- {
- return 'form_user_'.$this->target();
- }
-
- function action()
- {
- return common_local_url($this->target());
- }
-
- function formLegend()
- {
- $this->out->element('legend', null, $this->description());
- }
-
- function formData()
- {
- $action = $this->target();
- $this->out->hidden($action.'to-' . $this->profile->id,
- $this->profile->id,
- 'profileid');
- if ($this->args) {
- foreach ($this->args as $k => $v) {
- $this->out->hidden('returnto-' . $k, $v);
- }
- }
- }
-
- function formActions()
- {
- $this->out->submit('submit', $this->title(), 'submit',
- null, $this->description());
- }
-
- function target()
- {
- return null;
- }
-
- function title()
- {
- return null;
- }
-
- function description()
- {
- return null;
- }
- }
|