Lines Matching refs:form
72 $form = new Form(['method' => 'POST', 'class' => 'plugin_twofactor_admin']);
73 $form->setHiddenField('do', 'admin');
74 $form->setHiddenField('page', 'twofactor');
75 $form->setHiddenField('start', $this->start);
77 $form->addTagOpen('div')->addClass('table');
78 $form->addTagOpen('table')->addClass('inline');
79 $form = $this->addTableHead($form);
81 $form->addTagOpen('tbody');
83 $form = $this->addTableUser($form, $user, $userinfo);
85 $form->addTagClose('tbody');
87 $form->addTagOpen('tfooter');
88 $form = $this->addTablePagination($form, $usercount, $this->start, $this->pagesize);
89 $form->addTagClose('tfooter');
91 $form->addTagClose('table');
92 $form->addTagClose('div');
94 echo $form->toHTML();
100 * Add the table headers to the table in the given form
101 * @param Form $form
104 protected function addTableHead(Form $form)
106 $form->addTagOpen('thead');
109 $form->addTagOpen('tr');
110 $form->addTagOpen('th');
111 $form->addHTML($this->getLang('user_id'));
112 $form->addTagClose('th');
113 $form->addTagOpen('th');
114 $form->addHTML($this->getLang('user_name'));
115 $form->addTagClose('th');
116 $form->addTagOpen('th');
117 $form->addHTML($this->getLang('user_mail'));
118 $form->addTagClose('th');
119 $form->addTagOpen('th');
120 $form->addHTML($this->getLang('action'));
121 $form->addTagClose('th');
122 $form->addTagClose('tr');
125 $form->addTagOpen('tr');
126 $form->addTagOpen('th');
127 $form->addTextInput('filter[user]');
128 $form->addTagClose('th');
129 $form->addTagOpen('th');
130 $form->addTextInput('filter[name]');
131 $form->addTagClose('th');
132 $form->addTagOpen('th');
133 $form->addTextInput('filter[mail]');
134 $form->addTagClose('th');
135 $form->addTagOpen('th');
136 $form->addButton('search', $this->getLang('search'))->attr('type', 'submit');
137 $form->addTagClose('th');
138 $form->addTagClose('tr');
140 $form->addTagClose('thead');
141 return $form;
147 * @param Form $form
152 protected function addTableUser(Form $form, $user, $userinfo)
154 $form->addTagOpen('tr');
155 $form->addTagOpen('td');
156 $form->addHTML(hsc($user));
157 $form->addTagClose('td');
158 $form->addTagOpen('td');
159 $form->addHTML(hsc($userinfo['name']));
160 $form->addTagClose('td');
161 $form->addTagOpen('td');
162 $form->addHTML(hsc($userinfo['mail']));
163 $form->addTagClose('td');
164 $form->addTagOpen('td');
165 $form->addButton('reset[' . $user . ']', $this->getLang('reset'))
168 $form->addTagClose('td');
169 $form->addTagClose('tr');
170 return $form;
174 * Add the pagination buttons to the form
176 * @param Form $form
182 protected function addTablePagination(Form $form, $usercount, $start, $pagesize)
184 $form->addTagOpen('tr');
185 $form->addTagOpen('td')->attr('colspan', '4');
186 $form->addTagOpen('div')->addClass('pagination');
189 $btn = $form->addButton('start', $this->getLang('start'))->val('0');
193 $btn = $form->addButton('start', $this->getLang('prev'))->val($start - $pagesize);
197 $btn = $form->addButton('start', $this->getLang('next'))->val($start + $pagesize);
201 $btn = $form->addButton('start', $this->getLang('last'))->val($usercount - $pagesize);
205 $form->addTagClose('div');
206 $form->addTagClose('td');
207 $form->addTagClose('tr');
209 return $form;