Changeset 174
- Timestamp:
- 05/23/09 17:51:33 (15 years ago)
- Location:
- LATMOS-Accounts-Web
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm
r173 r174 240 240 } 241 241 242 sub submit { 243 my ($self) = @_; 244 return sprintf( 245 '<input type="submit" name="%s">', 246 $self->escape($self->label), 247 ); 248 } 249 242 250 sub set_attrs { 243 251 my ($self) = @_; 252 $self->{c}->req->param($self->label) or return; 244 253 $self->{object}->set_c_fields( 245 254 map { 246 255 $_ => 247 256 ($attrs->{$_}[1] || '') eq 'checkbox' 248 ? ($self->{c}->req->param($_) ? 1 : undef)257 ? ($self->{c}->req->param($_) ? 1 : 0) 249 258 : $self->{c}->req->param($_) 250 } grep {251 exists $self->{c}->req->params->{$_}252 259 } $self->attributes 253 260 ); -
LATMOS-Accounts-Web/root/html/includes/form.tt
r136 r174 10 10 <tr><th>[% form.attr_label(attr) %]</th><td>[% form.attr_field(attr) %]</td> 11 11 [% IF loop.last %] 12 <tr><td colspan=2> <input type="submit"></td></tr>12 <tr><td colspan=2>[% form.submit %]</td></tr> 13 13 </table> 14 14 </form>
Note: See TracChangeset
for help on using the changeset viewer.