added: ThingyRecord allows you to sell records in a Thing (like a classified ad)
This commit is contained in:
parent
724675c71c
commit
6d20e7f5df
12 changed files with 1014 additions and 8 deletions
23
lib/WebGUI/Form/ThingFieldsList.pm
Normal file
23
lib/WebGUI/Form/ThingFieldsList.pm
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package WebGUI::Form::ThingFieldsList;
|
||||
|
||||
use strict;
|
||||
use base 'WebGUI::Form::SelectList';
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
sub www_getThingFields {
|
||||
my ( $session ) = @_;
|
||||
|
||||
my $thingId = $session->form->get('thingId');
|
||||
my %fields
|
||||
= $session->db->buildHash(
|
||||
"SELECT fieldId, label FROM Thingy_fields WHERE thingId=?",
|
||||
[$thingId]
|
||||
);
|
||||
|
||||
$session->http->setMimeType( 'application/json' );
|
||||
return JSON->new->encode( \%fields );
|
||||
}
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue