- rfe: Event hover detail exclusions (#8761)
- rfe: Database Link test (#513)
This commit is contained in:
parent
e6c80922fb
commit
55da5c6889
6 changed files with 58 additions and 13 deletions
|
|
@ -4,6 +4,8 @@
|
|||
- New Profile Account module added providing a better interface for users to view and update their profile
|
||||
- New Inbox Account module added providing a better interface into WebGUI's various messaging systems
|
||||
- New Friends Account module added providing a better interface into WebGUI's friends system
|
||||
- rfe: Event hover detail exclusions (#8761)
|
||||
- rfe: Database Link test (#513)
|
||||
- The Display Account and My Purchases interfaces have been added to the new Account system
|
||||
- Added a new macro which returns the self deactivation link if the setting is enabled.
|
||||
- Added a new macro which returns the back to site link
|
||||
|
|
|
|||
|
|
@ -986,6 +986,7 @@ sub getEditForm {
|
|||
my $drawMethod = $properties->{$fieldName}{customDrawMethod};
|
||||
if ($drawMethod) {
|
||||
$params{value} = $self->$drawMethod(\%params);
|
||||
delete $params{name}; # don't want readOnly to generate a hidden field
|
||||
$params{fieldType} = "readOnly";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,8 +181,8 @@ sub drawLocationField {
|
|||
my $options = $self->session->db->buildHashRef("select distinct(location) from EMSTicket left join asset using (assetId)
|
||||
where parentId=? order by location",[$self->get('parentId')]);
|
||||
return WebGUI::Form::combo($self->session, {
|
||||
name => $params->{name},
|
||||
value => $self->get($params->{name}),
|
||||
name => 'location',
|
||||
value => $self->get('location'),
|
||||
options => $options,
|
||||
});
|
||||
}
|
||||
|
|
@ -268,10 +268,10 @@ sub getEditForm {
|
|||
}
|
||||
$form->getTab("properties")->DateTime(
|
||||
name => "startDate",
|
||||
defaultValue => $date->toDatabase,
|
||||
label => $i18n->get("add/edit event start date"),
|
||||
hoverHelp => $i18n->get("add/edit event start date help"),
|
||||
timeZone => $self->getParent->get("timezone"),
|
||||
defaultValue => $date->toDatabase,
|
||||
value => $self->get("startDate"),
|
||||
);
|
||||
return $form;
|
||||
|
|
|
|||
|
|
@ -184,7 +184,25 @@ sub getBadgeGroups {
|
|||
|
||||
=head2 getEventMetaFields ( )
|
||||
|
||||
Returns an arrayref of hash references of the metadata fields.
|
||||
Returns an arrayref of hash references of the metadata fields. Each hash in the array has the following fields:
|
||||
|
||||
fieldId - the GUID for this field.
|
||||
|
||||
assetId - the EMS that this field is attached to.
|
||||
|
||||
label - the human readable name for this field.
|
||||
|
||||
dataType - the form field type for this field.
|
||||
|
||||
visible - whether or not this field should display in public views.
|
||||
|
||||
required - whether or not this field must be filled out as part of editing the ticket/event.
|
||||
|
||||
possibleValues - a list of values that may be used to create this form field if it's a list type.
|
||||
|
||||
defaultValues - a list of default values that may be used to create this form field.
|
||||
|
||||
sequenceNumber - the order in which this field should be displayed relative to other fields.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -192,6 +210,7 @@ sub getEventMetaFields {
|
|||
my $self = shift;
|
||||
return $self->session->db->buildArrayRefOfHashRefs("select * from EMSEventMetaField where assetId=? order by sequenceNumber, assetId",[$self->getId]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getEventFieldsForImport ()
|
||||
|
|
@ -1165,8 +1184,11 @@ className='WebGUI::Asset::Sku::EMSTicket' and state='published' and revisionDate
|
|||
my $data = $ticket->get('eventMetaData');
|
||||
$data = '{}' if ($data eq "");
|
||||
my $meta = JSON->new->utf8->decode($data);
|
||||
foreach my $field (keys %{$meta}) {
|
||||
$description .= '<p><b>'.$field.'</b>: '.$meta->{$field}.'</p>' unless ($meta->{$field} eq "");
|
||||
foreach my $field (@{$self->getEventMetaFields}) {
|
||||
my $label = $field->{label};
|
||||
if ($field->{visible} && $meta->{$label} ne "") {
|
||||
$description .= '<p><b>'.$label.'</b>: '.$meta->{$label}.'</p>';
|
||||
}
|
||||
}
|
||||
my $date = WebGUI::DateTime->new($session, mysql => $ticket->get('startDate'))
|
||||
->set_time_zone($self->get("timezone"))
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use strict;
|
|||
use Tie::CPHash;
|
||||
use WebGUI::AdminConsole;
|
||||
use WebGUI::DatabaseLink;
|
||||
use WebGUI::Exception;
|
||||
use WebGUI::International;
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -281,7 +282,8 @@ sub www_editDatabaseLinkSave {
|
|||
}
|
||||
if ($session->form->process("dlid") eq "new") {
|
||||
WebGUI::DatabaseLink->create($session,$params);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
WebGUI::DatabaseLink->new($session,$session->form->process("dlid"))->set($params);
|
||||
}
|
||||
return www_listDatabaseLinks($session);
|
||||
|
|
@ -300,11 +302,10 @@ sub www_listDatabaseLinks {
|
|||
my $session = shift;
|
||||
return $session->privilege->adminOnly() unless canView($session);
|
||||
my $links = WebGUI::DatabaseLink->getList($session);
|
||||
my $output = '<table border="1" cellpadding="3" cellspacing="0" align="center">';
|
||||
my $output = '<table border="1" cellpadding="3" cellspacing="0" align="center">';
|
||||
my $i18n = WebGUI::International->new($session);
|
||||
foreach my $id (keys %{$links}) {
|
||||
# $output .= '<tr><td valign="top" class="tableData"></td><td valign="top" class="tableData">'.$i18n->get(1076).'</td></tr>';
|
||||
$output .= '<tr><td valign="top" class="tableData">';
|
||||
$output .= '<tr><td valign="top" class="tableData">';
|
||||
if ($id ne '0') {
|
||||
$output .= $session->icon->delete('op=deleteDatabaseLinkConfirm;dlid='.$id,'',$i18n->get(988))
|
||||
.$session->icon->edit('op=editDatabaseLink;dlid='.$id)
|
||||
|
|
@ -314,10 +315,23 @@ sub www_listDatabaseLinks {
|
|||
$output .= $session->icon->edit('op=editDatabaseLink;dlid='.$id);
|
||||
}
|
||||
$output .= '</td>';
|
||||
$output .= '<td valign="top" class="tableData">'.$links->{$id}.'</td></tr>';
|
||||
$output .= '<td valign="top" class="tableData">'.$links->{$id}.'</td><td valign="top" class="tableData">';
|
||||
my $connection = eval {WebGUI::DatabaseLink->new($session,$id)->db};
|
||||
my $e;
|
||||
if (($e = WebGUI::Error->caught) || $@ || not defined $connection) {
|
||||
$output .= $i18n->get('70');
|
||||
if (defined $e) {
|
||||
$output .= ': '.$e->error;
|
||||
}
|
||||
}
|
||||
$output .= '</table>';
|
||||
return _submenu($session,$output);
|
||||
else {
|
||||
$output .= $i18n->get('ok');
|
||||
$connection->disconnect;
|
||||
}
|
||||
$output .='</td></tr>';
|
||||
}
|
||||
$output .= '</table>';
|
||||
return _submenu($session,$output);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ package WebGUI::i18n::English::WebGUI;
|
|||
use strict;
|
||||
|
||||
our $I18N = {
|
||||
'ok' => {
|
||||
message => q|OK|,
|
||||
context => q|used by database link and other things to give a message to the user that a test passed|,
|
||||
lastUpdated => 0,
|
||||
},
|
||||
|
||||
'is editable' => {
|
||||
message => q|Is Editable?|,
|
||||
context => q|group property|,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue