processPropertiesFromFormPost to processEditForm
This commit is contained in:
parent
ad96c88a36
commit
3c17dafeb4
32 changed files with 154 additions and 169 deletions
|
|
@ -184,6 +184,10 @@ Asset API
|
||||||
->get will still work, but will be slightly slower since inside it calls the direct Moose accessor. Similarly,
|
->get will still work, but will be slightly slower since inside it calls the direct Moose accessor. Similarly,
|
||||||
getId is slightly slower than ->assetId.
|
getId is slightly slower than ->assetId.
|
||||||
|
|
||||||
|
processPropertiesFromFormPost
|
||||||
|
-----------------------------
|
||||||
|
Absurdly long and non-descriptive name, changed to processEditForm
|
||||||
|
|
||||||
WebGUI::Shop::Vendor
|
WebGUI::Shop::Vendor
|
||||||
====================
|
====================
|
||||||
Object properties are no longer written to the database when an object is created from scratch. The write method needs
|
Object properties are no longer written to the database when an object is created from scratch. The write method needs
|
||||||
|
|
|
||||||
|
|
@ -870,53 +870,43 @@ sub getEditForm {
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
my $i18n = WebGUI::International->new( $session, "Asset" );
|
my $i18n = WebGUI::International->new( $session, "Asset" );
|
||||||
my $f = WebGUI::FormBuilder->new( $session );
|
my $f = WebGUI::FormBuilder->new( $session );
|
||||||
my $overrides = $session->config->get( "assets/" . $self->get("className") );
|
my $overrides = $session->config->get( "assets/" . $self->get("className") . '/fields' ) || {};
|
||||||
|
|
||||||
###
|
###
|
||||||
# Buttons
|
# Buttons
|
||||||
$f->addField( 'Submit',
|
my $buttonGroup = $f->addField( 'ButtonGroup', name => "saveButtons", rowClass => 'saveButtons' );
|
||||||
|
$buttonGroup->addButton( "submit", {
|
||||||
name => "save",
|
name => "save",
|
||||||
value => $i18n->get('save'),
|
value => $i18n->get('save'),
|
||||||
);
|
} );
|
||||||
|
|
||||||
if ( $session->config->get("enableSaveAndCommit") ) {
|
if ( $session->config->get("enableSaveAndCommit") ) {
|
||||||
$f->addField( 'Submit',
|
$buttonGroup->addButton( 'Submit', {
|
||||||
name => "saveAndCommit",
|
name => "saveAndCommit",
|
||||||
value => $i18n->get("save and commit"),
|
value => $i18n->get("save and commit"),
|
||||||
);
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
$f->addField( 'Submit',
|
$buttonGroup->addButton( 'Submit', {
|
||||||
name => "saveAndReturn",
|
name => "saveAndReturn",
|
||||||
value => $i18n->get("apply"),
|
value => $i18n->get("apply"),
|
||||||
);
|
} );
|
||||||
|
|
||||||
$f->addField( 'Submit',
|
$buttonGroup->addButton( 'Submit', {
|
||||||
name => 'cancel',
|
name => 'cancel',
|
||||||
value => $i18n->get('cancel'),
|
value => $i18n->get('cancel','WebGUI'),
|
||||||
);
|
} );
|
||||||
|
|
||||||
###
|
###
|
||||||
# Create the main tabset
|
# Create the main tabset
|
||||||
|
# Not using loop to maintain correct order
|
||||||
|
$f->addTab( name => "properties", label => $i18n->get("properties") );
|
||||||
|
$f->addTab( name => "display", label => $i18n->get(105) );
|
||||||
|
$f->addTab( name => "security", label => $i18n->get(107) );
|
||||||
|
$f->addTab( name => "meta", label => $i18n->get("Metadata") );
|
||||||
|
|
||||||
###
|
###
|
||||||
# Asset ID and class name
|
# Asset ID and class name
|
||||||
# assetId => {
|
|
||||||
# fieldType => "guid",
|
|
||||||
# label => [ "asset id", 'Asset' ],
|
|
||||||
# value => $assetId,
|
|
||||||
# hoverHelp => [ 'asset id description', 'Asset' ],
|
|
||||||
# uiLevel => 9,
|
|
||||||
# tab => "meta",
|
|
||||||
# },
|
|
||||||
# class => {
|
|
||||||
# fieldType => "className",
|
|
||||||
# label => [ "class name", 'WebGUI' ],
|
|
||||||
# value => $class,
|
|
||||||
# uiLevel => 9,
|
|
||||||
# tab => "meta",
|
|
||||||
# },
|
|
||||||
my $assetId;
|
my $assetId;
|
||||||
my $class;
|
my $class;
|
||||||
if ( $self->getId eq "new" ) {
|
if ( $self->getId eq "new" ) {
|
||||||
|
|
@ -927,41 +917,56 @@ sub getEditForm {
|
||||||
$assetId = $self->getId;
|
$assetId = $self->getId;
|
||||||
$class = $self->get('className');
|
$class = $self->get('className');
|
||||||
}
|
}
|
||||||
|
$f->getTab("meta")->addField( "Guid",
|
||||||
|
name => "assetId",
|
||||||
|
value => $assetId,
|
||||||
|
label => $i18n->get( 'asset id' ),
|
||||||
|
hoverHelp => $i18n->get('asset id description'),
|
||||||
|
uiLevel => 9,
|
||||||
|
);
|
||||||
|
$f->getTab("meta")->addField( "ClassName",
|
||||||
|
name => "class",
|
||||||
|
value => $class,
|
||||||
|
label => $i18n->get('class name', 'WebGUI'),
|
||||||
|
uiLevel => 9,
|
||||||
|
);
|
||||||
|
|
||||||
###
|
###
|
||||||
# Keywords
|
# Keywords
|
||||||
# keywords => {
|
$f->getTab( "meta" )->addField( 'Keywords',
|
||||||
# label => [ 'keywords', 'Asset' ],
|
name => 'keywords',
|
||||||
# hoverHelp => [ 'keywords help', 'Asset' ],
|
value => $self->get('keywords'),
|
||||||
# value => $self->get('keywords'),
|
label => $i18n->get( 'keywords' ),
|
||||||
# fieldType => 'keywords',
|
hoverHelp => $i18n->get( 'keywords help' ),
|
||||||
# tab => 'meta',
|
);
|
||||||
# },
|
|
||||||
|
|
||||||
###
|
###
|
||||||
# Properties
|
# Properties
|
||||||
foreach my $property ( $self->getProperties ) {
|
foreach my $property ( $self->getProperties ) {
|
||||||
next if $self->meta->find_attribute_by_name( $property )->noFormPost;
|
next if $self->meta->find_attribute_by_name( $property )->noFormPost;
|
||||||
$self->session->log->warn( "Property: $property" );
|
my $fieldType = $self->meta->find_attribute_by_name( $property )->fieldType;
|
||||||
$self->session->log->warn( Dumper $self->meta->find_attribute_by_name( $property )->form );
|
my $fieldOverrides = $overrides->{ $property } || {};
|
||||||
$self->session->log->warn( Dumper $self->getFormProperties( $property ) );
|
my $fieldHash = {
|
||||||
my $fieldHash = {
|
tab => "properties",
|
||||||
tab => "properties",
|
%{ $self->getFormProperties( $property ) },
|
||||||
name => $property,
|
%{ $overrides },
|
||||||
value => $self->$property,
|
name => $property,
|
||||||
%{ $self->getFormProperties( $property ) },
|
value => $self->$property,
|
||||||
};
|
};
|
||||||
my $fieldType = $self->meta->find_attribute_by_name( $property )->fieldType;
|
|
||||||
|
|
||||||
if ( !$f->getTab( $fieldHash->{tab} ) ) {
|
# Kludge...
|
||||||
$f->addTab( name => $fieldHash->{tab} );
|
if ( isIn( $fieldHash->{fieldType}, 'selectBox', 'workflow' ) and ref $fieldHash->{value} ne 'ARRAY' ) {
|
||||||
|
$fieldHash->{value} = [ $fieldHash->{value} ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Create tabs to have labels added later
|
||||||
|
if ( !$f->getTab( $fieldHash->{tab} ) ) {
|
||||||
|
$f->addTab( name => $fieldHash->{tab}, label => $fieldHash->{tab} );
|
||||||
|
}
|
||||||
|
|
||||||
$f->getTab( $fieldHash->{tab} )->addField( $fieldType, %{$fieldHash} );
|
$f->getTab( $fieldHash->{tab} )->addField( $fieldType, %{$fieldHash} );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $f;
|
|
||||||
}
|
|
||||||
=cut
|
|
||||||
###
|
###
|
||||||
# Meta data
|
# Meta data
|
||||||
if ( $session->setting->get("metaDataEnabled") ) {
|
if ( $session->setting->get("metaDataEnabled") ) {
|
||||||
|
|
@ -975,66 +980,22 @@ sub getEditForm {
|
||||||
if ( "\l$fieldType" eq "selectBox" ) {
|
if ( "\l$fieldType" eq "selectBox" ) {
|
||||||
$options = "|" . $i18n->get("Select") . "\n" . $options;
|
$options = "|" . $i18n->get("Select") . "\n" . $options;
|
||||||
}
|
}
|
||||||
push @properties, "metadata_"
|
my $fieldName = "metadata_" . $meta->{$field}{fieldId};
|
||||||
. $meta->{$field}{fieldId} => {
|
my $fieldData = {
|
||||||
tab => "meta",
|
|
||||||
label => $meta->{$field}{fieldName},
|
label => $meta->{$field}{fieldName},
|
||||||
uiLevel => 5,
|
uiLevel => 5,
|
||||||
value => $meta->{$field}{value},
|
value => $meta->{$field}{value},
|
||||||
extras => qq/title="$meta->{$field}{description}"/,
|
hoverHelp => $meta->{$field}{description},
|
||||||
options => $options,
|
options => $options,
|
||||||
defaultValue => $meta->{$field}{defaultValue},
|
defaultValue => $meta->{$field}{defaultValue},
|
||||||
fieldType => $fieldType
|
|
||||||
};
|
|
||||||
} ## end foreach my $field ( keys %$meta)
|
|
||||||
|
|
||||||
# add metadata management
|
|
||||||
if ( $session->user->isAdmin ) {
|
|
||||||
push @properties, '_metadatamanagement' => {
|
|
||||||
tab => "meta",
|
|
||||||
fieldType => "readOnly",
|
|
||||||
value => '<p><a href="'
|
|
||||||
. $self->session->url->page("func=editMetaDataField;fid=new") . '">'
|
|
||||||
. $i18n->get('Add new field')
|
|
||||||
. '</a></p>',
|
|
||||||
hoverHelp => $i18n->get('Add new field description'),
|
|
||||||
};
|
};
|
||||||
}
|
$f->getTab('meta')->addField( $fieldType, %{ $fieldData } );
|
||||||
|
} ## end foreach my $field ( keys %$meta)
|
||||||
} ## end if ( $session->setting...)
|
} ## end if ( $session->setting...)
|
||||||
|
|
||||||
# generate the form
|
return $f;
|
||||||
for ( my $i = 0; $i < @properties; $i += 2 ) {
|
|
||||||
my $fieldName = $properties[$i];
|
|
||||||
my %fieldHash = %{ $properties[ $i + 1 ] };
|
|
||||||
my %params = ( name => $fieldName, value => $self->get($fieldName) );
|
|
||||||
|
|
||||||
# apply config file changes
|
|
||||||
foreach my $key ( keys %{ $overrides->{fields}{$fieldName} } ) {
|
|
||||||
$fieldHash{$key} = $overrides->{fields}{$fieldName}{$key};
|
|
||||||
}
|
|
||||||
|
|
||||||
# Kludge.
|
|
||||||
if ( isIn( $fieldHash{fieldType}, 'selectBox', 'workflow' ) and ref $params{value} ne 'ARRAY' ) {
|
|
||||||
$params{value} = [ $params{value} ];
|
|
||||||
}
|
|
||||||
|
|
||||||
%params = ( %fieldHash, %params );
|
|
||||||
delete $params{tab};
|
|
||||||
delete $params{tableName};
|
|
||||||
|
|
||||||
# if there isnt a tab specified lets define one
|
|
||||||
my $tab = $fieldHash{tab} || "properties";
|
|
||||||
|
|
||||||
#draw the field
|
|
||||||
$tabform->getTab($tab)->dynamicField(%params);
|
|
||||||
} ## end for ( my $i = 0; $i < @properties...)
|
|
||||||
|
|
||||||
# send back the object
|
|
||||||
return $tabform;
|
|
||||||
} ## end sub getEditForm
|
} ## end sub getEditForm
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
sub setupFormField {
|
sub setupFormField {
|
||||||
my ( $self, $tabform, $fieldName, $extraFields, $overrides ) = @_;
|
my ( $self, $tabform, $fieldName, $extraFields, $overrides ) = @_;
|
||||||
my %params = %{ $extraFields->{$fieldName} };
|
my %params = %{ $extraFields->{$fieldName} };
|
||||||
|
|
@ -2083,7 +2044,7 @@ sub prepareWidgetView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Updates current Asset with data from Form. You can feed back errors by returning an
|
Updates current Asset with data from Form. You can feed back errors by returning an
|
||||||
arrayref containing the error messages. If there is no error you do not have to return
|
arrayref containing the error messages. If there is no error you do not have to return
|
||||||
|
|
@ -2091,14 +2052,14 @@ anything.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processEditForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my %data;
|
my %data;
|
||||||
my $form = $self->session->form;
|
my $form = $self->session->form;
|
||||||
my $overrides = $self->session->config->get("assets/".$self->get("className")."/fields");
|
my $overrides = $self->session->config->get("assets/".$self->get("className")."/fields");
|
||||||
|
|
||||||
foreach my $property ($self->getProperties) {
|
foreach my $property ($self->getProperties) {
|
||||||
my %params = %{$self->getProperty($property)};
|
my %params = %{$self->getFormProperties($property)};
|
||||||
|
|
||||||
# apply config file changes
|
# apply config file changes
|
||||||
foreach my $key (keys %{$overrides->{$property}}) {
|
foreach my $key (keys %{$overrides->{$property}}) {
|
||||||
|
|
@ -2115,7 +2076,7 @@ sub processPropertiesFromFormPost {
|
||||||
|
|
||||||
# process the form element
|
# process the form element
|
||||||
$params{name} = $property;
|
$params{name} = $property;
|
||||||
$params{value} = $self->get($property);
|
$params{value} = $self->$property;
|
||||||
$data{$property} = $form->process(
|
$data{$property} = $form->process(
|
||||||
$property,
|
$property,
|
||||||
$params{fieldType},
|
$params{fieldType},
|
||||||
|
|
@ -2604,10 +2565,19 @@ sub www_edit {
|
||||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||||
return $self->session->privilege->locked() unless $self->canEditIfLocked;
|
return $self->session->privilege->locked() unless $self->canEditIfLocked;
|
||||||
|
|
||||||
my $f = $self->getEditForm;
|
my $f = eval { $self->getEditForm };
|
||||||
|
return $@ if $@;
|
||||||
$f->addField( "Hidden", name => "func", value => "editSave" );
|
$f->addField( "Hidden", name => "func", value => "editSave" );
|
||||||
$f->action( $self->getUrl );
|
$f->action( $self->getUrl );
|
||||||
|
|
||||||
|
# TODO: Make this whole thing a template instead!
|
||||||
|
$self->session->style->setRawHeadTags(
|
||||||
|
'<style type="text/css">
|
||||||
|
label.formDescription { display: block; margin-top: 1em; font-weight: bold }
|
||||||
|
.saveButtons { position: absolute; top: 3px; right: 5px; z-index: 9001; }
|
||||||
|
</style>'
|
||||||
|
);
|
||||||
|
|
||||||
return $self->session->style->process(
|
return $self->session->style->process(
|
||||||
'<div class="yui-skin-sam">' . $f->toHtml . '</div>',
|
'<div class="yui-skin-sam">' . $f->toHtml . '</div>',
|
||||||
"PBtmpl0000000000000137"
|
"PBtmpl0000000000000137"
|
||||||
|
|
@ -2620,7 +2590,7 @@ sub www_edit {
|
||||||
|
|
||||||
Saves and updates history. If canEdit, returns www_manageAssets() if a new Asset is created, otherwise returns www_view(). Will return an insufficient Privilege if canEdit returns False, or if the submitted form does not pass the C<$session->form->validToken> check.
|
Saves and updates history. If canEdit, returns www_manageAssets() if a new Asset is created, otherwise returns www_view(). Will return an insufficient Privilege if canEdit returns False, or if the submitted form does not pass the C<$session->form->validToken> check.
|
||||||
|
|
||||||
NOTE: Don't try to override or overload this method. It won't work. What you are looking for is processPropertiesFromFormPost().
|
NOTE: Don't try to override or overload this method. It won't work. What you are looking for is processEditForm().
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
@ -2654,7 +2624,7 @@ sub www_editSave {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Process properties from form post
|
# Process properties from form post
|
||||||
my $errors = $object->processPropertiesFromFormPost;
|
my $errors = $object->processEditForm;
|
||||||
if (ref $errors eq 'ARRAY') {
|
if (ref $errors eq 'ARRAY') {
|
||||||
$session->stow->set('editFormErrors', $errors);
|
$session->stow->set('editFormErrors', $errors);
|
||||||
if ($session->form->process('assetId') eq 'new') {
|
if ($session->form->process('assetId') eq 'new') {
|
||||||
|
|
|
||||||
|
|
@ -484,7 +484,6 @@ the shop tab is created here to mimic the function of the sku-created
|
||||||
shop tab. this class holds data like Sku assets so that they can be assigned
|
shop tab. this class holds data like Sku assets so that they can be assigned
|
||||||
in the future when the sku asset is created from this data.
|
in the future when the sku asset is created from this data.
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
override getEditTabs => sub {
|
override getEditTabs => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
@ -492,6 +491,8 @@ override getEditTabs => sub {
|
||||||
return (super(), ['shop', $sku_i18n->get('shop'), 9],);
|
return (super(), ['shop', $sku_i18n->get('shop'), 9],);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getQueueUrl
|
=head2 getQueueUrl
|
||||||
|
|
|
||||||
|
|
@ -1297,7 +1297,7 @@ sub prepareView {
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Processes the Event Edit form.
|
Processes the Event Edit form.
|
||||||
|
|
||||||
|
|
@ -1316,7 +1316,7 @@ Requests that the events be committed
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
super();
|
super();
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
|
|
|
||||||
|
|
@ -394,13 +394,13 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extend the master method to handle file uploads and applying constraints.
|
Extend the master method to handle file uploads and applying constraints.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -715,12 +715,12 @@ sub processCommentEditForm {
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $i18n = WebGUI::International->new( $self->session,'Asset_Photo' );
|
my $i18n = WebGUI::International->new( $self->session,'Asset_Photo' );
|
||||||
my $form = $self->session->form;
|
my $form = $self->session->form;
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ These methods are available from this class:
|
||||||
=head2 applyConstraints ( options )
|
=head2 applyConstraints ( options )
|
||||||
|
|
||||||
Apply the constraints to the original file. Called automatically by C<setFile>
|
Apply the constraints to the original file. Called automatically by C<setFile>
|
||||||
and C<processPropertiesFromFormPost>.
|
and C<processEditForm>.
|
||||||
|
|
||||||
This is a sort of catch-all method for applying things to the file after it's
|
This is a sort of catch-all method for applying things to the file after it's
|
||||||
uploaded. This method simply calls other methods to do its work.
|
uploaded. This method simply calls other methods to do its work.
|
||||||
|
|
@ -411,7 +411,7 @@ sub makeResolutions {
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Process the asset edit form.
|
Process the asset edit form.
|
||||||
|
|
||||||
|
|
@ -419,7 +419,7 @@ Make the default title into the file name minus the extention.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $i18n = WebGUI::International->new( $self->session,'Asset_Photo' );
|
my $i18n = WebGUI::International->new( $self->session,'Asset_Photo' );
|
||||||
my $form = $self->session->form;
|
my $form = $self->session->form;
|
||||||
|
|
|
||||||
|
|
@ -135,14 +135,14 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Used to process properties from the form posted. In this asset, we use
|
Used to process properties from the form posted. In this asset, we use
|
||||||
this method to deflate the zip file into the proper folder
|
this method to deflate the zip file into the proper folder
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
#File should be saved here by the superclass
|
#File should be saved here by the superclass
|
||||||
super();
|
super();
|
||||||
|
|
|
||||||
|
|
@ -420,13 +420,13 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Used to process properties from the form posted.
|
Used to process properties from the form posted.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processEditForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
my $score = 0;
|
my $score = 0;
|
||||||
|
|
|
||||||
|
|
@ -1068,14 +1068,14 @@ override paste => sub {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extend the base method to handle archiving and unarchiving, making sticky and
|
Extend the base method to handle archiving and unarchiving, making sticky and
|
||||||
non-sticky, locking and unlocking posts. Calls postProcess when it is done.
|
non-sticky, locking and unlocking posts. Calls postProcess when it is done.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
super();
|
super();
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
|
|
|
||||||
|
|
@ -742,13 +742,13 @@ override postProcess => sub {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extend the base method to do captcha processing.
|
Extend the base method to do captcha processing.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
if ($self->isNew && $self->getParent->useCaptcha) {
|
if ($self->isNew && $self->getParent->useCaptcha) {
|
||||||
|
|
|
||||||
|
|
@ -808,14 +808,14 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
See WebGUI::Asset::processPropertiesFromFormPost () for details. Extends the base class to delete
|
See WebGUI::Asset::processEditForm () for details. Extends the base class to delete
|
||||||
the scratch variables, and to uncache the overrides.
|
the scratch variables, and to uncache the overrides.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
super();
|
super();
|
||||||
my $scratchId = "Shortcut_" . $self->getId;
|
my $scratchId = "Shortcut_" . $self->getId;
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,6 @@ override getEditForm => sub {
|
||||||
|
|
||||||
Not to be modified, just defines a new tab.
|
Not to be modified, just defines a new tab.
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
override getEditTabs => sub {
|
override getEditTabs => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
@ -226,6 +225,8 @@ override getEditTabs => sub {
|
||||||
return (super(), ['shop', $i18n->get('shop'), 9]);
|
return (super(), ['shop', $i18n->get('shop'), 9]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getOptions ( )
|
=head2 getOptions ( )
|
||||||
|
|
@ -565,13 +566,13 @@ sub onRemoveFromCart {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Extends the base class to process the tax data.
|
Extends the base class to process the tax data.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
my $output = super();
|
my $output = super();
|
||||||
|
|
|
||||||
|
|
@ -422,15 +422,15 @@ sub onRemoveFromCart {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Extended to support event meta fields.
|
Extended to support event meta fields.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processEditForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->SUPER::processPropertiesFromFormPost(@_);
|
$self->SUPER::processEditForm(@_);
|
||||||
my $form = $self->session->form;
|
my $form = $self->session->form;
|
||||||
my %metadata = ();
|
my %metadata = ();
|
||||||
foreach my $field (@{$self->getParent->getEventMetaFields}) {
|
foreach my $field (@{$self->getParent->getEventMetaFields}) {
|
||||||
|
|
|
||||||
|
|
@ -559,13 +559,13 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Handle photos and photo metadata, like captions, etc.
|
Handle photos and photo metadata, like captions, etc.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processEditForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
$self->next::method;
|
$self->next::method;
|
||||||
|
|
|
||||||
|
|
@ -568,13 +568,13 @@ sub process {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extends the master class to handle template parsers, namespaces and template attachments.
|
Extends the master class to handle template parsers, namespaces and template attachments.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
super();
|
super();
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
|
|
|
||||||
|
|
@ -350,13 +350,13 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extends the master method to handle properties and attachments.
|
Extends the master method to handle properties and attachments.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processEditForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
$self->next::method(@_);
|
$self->next::method(@_);
|
||||||
|
|
|
||||||
|
|
@ -243,14 +243,14 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Extend the super class to calculate total asset size from
|
Extend the super class to calculate total asset size from
|
||||||
any files stored in the storage location.
|
any files stored in the storage location.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
super();
|
super();
|
||||||
my $size = 0;
|
my $size = 0;
|
||||||
|
|
|
||||||
|
|
@ -855,7 +855,7 @@ sub prepareView {
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Process the Calendar Edit form.
|
Process the Calendar Edit form.
|
||||||
|
|
||||||
|
|
@ -865,7 +865,7 @@ Adds / removes feeds from the feed trough.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
my $form = $self->session->form;
|
my $form = $self->session->form;
|
||||||
|
|
|
||||||
|
|
@ -157,13 +157,13 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Used to process properties from the form posted.
|
Used to process properties from the form posted.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $form = $self->session->form;
|
my $form = $self->session->form;
|
||||||
my (@items,$items);
|
my (@items,$items);
|
||||||
|
|
|
||||||
|
|
@ -982,7 +982,6 @@ sub duplicateBranch {
|
||||||
|
|
||||||
Add a tab for the mail interface.
|
Add a tab for the mail interface.
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
sub getEditTabs {
|
sub getEditTabs {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
@ -990,6 +989,8 @@ sub getEditTabs {
|
||||||
return ($self->next::method, ['mail', $i18n->get('mail'), 9]);
|
return ($self->next::method, ['mail', $i18n->get('mail'), 9]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getNewThreadUrl( )
|
=head2 getNewThreadUrl( )
|
||||||
|
|
@ -1389,7 +1390,7 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extend the base method to handle creating subscription groups, propagating
|
Extend the base method to handle creating subscription groups, propagating
|
||||||
group privileges to all descendants and clearing scratch variables for sort key
|
group privileges to all descendants and clearing scratch variables for sort key
|
||||||
|
|
@ -1397,7 +1398,7 @@ and direction.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processEditForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $updatePrivs = ($self->session->form->process("groupIdView") ne $self->groupIdView || $self->session->form->process("groupIdEdit") ne $self->groupIdEdit);
|
my $updatePrivs = ($self->session->form->process("groupIdView") ne $self->groupIdView || $self->session->form->process("groupIdEdit") ne $self->groupIdEdit);
|
||||||
$self->next::method;
|
$self->next::method;
|
||||||
|
|
|
||||||
|
|
@ -280,13 +280,13 @@ override prepareView => sub {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extends the base method to handle assetsToHide.
|
Extends the base method to handle assetsToHide.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
super();
|
super();
|
||||||
if ($self->session->form->process("assetId") eq "new" && $self->session->form->process("class") eq 'WebGUI::Asset::Wobject::Dashboard') {
|
if ($self->session->form->process("assetId") eq "new" && $self->session->form->process("class") eq 'WebGUI::Asset::Wobject::Dashboard') {
|
||||||
|
|
|
||||||
|
|
@ -152,8 +152,6 @@ override getEditForm => sub {
|
||||||
|
|
||||||
Add a tab for the data table.
|
Add a tab for the data table.
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
override getEditTabs => sub {
|
override getEditTabs => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $i18n = WebGUI::International->new( $self->session, "Asset_DataTable" );
|
my $i18n = WebGUI::International->new( $self->session, "Asset_DataTable" );
|
||||||
|
|
@ -161,6 +159,8 @@ override getEditTabs => sub {
|
||||||
return ( super(), [ "data" => $i18n->get("tab label data") ], );
|
return ( super(), [ "data" => $i18n->get("tab label data") ], );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getTemplateVars ( )
|
=head2 getTemplateVars ( )
|
||||||
|
|
|
||||||
|
|
@ -803,14 +803,14 @@ sub processStyle {
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Process the form to save the asset. Request approval from the Gallery's
|
Process the form to save the asset. Request approval from the Gallery's
|
||||||
approval workflow.
|
approval workflow.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processEditForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $form = $self->session->form;
|
my $form = $self->session->form;
|
||||||
my $errors = $self->next::method || [];
|
my $errors = $self->next::method || [];
|
||||||
|
|
|
||||||
|
|
@ -353,13 +353,13 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extend the base method to handle the answers and the Graphing plugin.
|
Extend the base method to handle the answers and the Graphing plugin.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
super();
|
super();
|
||||||
my $property = {};
|
my $property = {};
|
||||||
|
|
|
||||||
|
|
@ -727,13 +727,13 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost
|
=head2 processEditForm
|
||||||
|
|
||||||
Extend the master method to propagate view and edit permissions down to the wiki pages.
|
Extend the master method to propagate view and edit permissions down to the wiki pages.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
override processPropertiesFromFormPost => sub {
|
override processEditForm => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $groupsChanged =
|
my $groupsChanged =
|
||||||
(($self->session->form->process('groupIdView') ne $self->groupIdView)
|
(($self->session->form->process('groupIdView') ne $self->groupIdView)
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 processPropertiesFromFormPost ( )
|
=head2 processEditForm ( )
|
||||||
|
|
||||||
Used to process properties from the form posted. Do custom things with
|
Used to process properties from the form posted. Do custom things with
|
||||||
noFormPost fields here, or do whatever you want. This method is called
|
noFormPost fields here, or do whatever you want. This method is called
|
||||||
|
|
@ -176,9 +176,9 @@ when /yourAssetUrl?func=editSave is requested/posted.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processEditForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->SUPER::processPropertiesFromFormPost;
|
$self->SUPER::processEditForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ A text string that will be appended after the field when toHtmlWithWrapper() is
|
||||||
|
|
||||||
=head4 labelClass
|
=head4 labelClass
|
||||||
|
|
||||||
A stylesheet class assigned to the label with toHtmlWithWrapper() is called. Defaults to "formDescription".
|
A stylesheet class assigned to the label with toHtmlWithWrapper() is called.
|
||||||
|
|
||||||
=head4 fieldClass
|
=head4 fieldClass
|
||||||
|
|
||||||
|
|
@ -176,7 +176,7 @@ sub definition {
|
||||||
defaultValue=>1
|
defaultValue=>1
|
||||||
},
|
},
|
||||||
labelClass=>{
|
labelClass=>{
|
||||||
defaultValue=>"formDescription"
|
defaultValue=>""
|
||||||
},
|
},
|
||||||
fieldClass=>{
|
fieldClass=>{
|
||||||
defaultValue=>"tableData"
|
defaultValue=>"tableData"
|
||||||
|
|
@ -333,8 +333,10 @@ sub getDatabaseFieldType {
|
||||||
sub getLabel {
|
sub getLabel {
|
||||||
my ( $self ) = @_;
|
my ( $self ) = @_;
|
||||||
|
|
||||||
my $labelClass = $self->get("labelClass");
|
return '' if !$self->get('label');
|
||||||
$labelClass = qq| class="$labelClass" | if($self->get("labelClass"));
|
|
||||||
|
my $labelClass = " " . $self->get("labelClass");
|
||||||
|
$labelClass = qq| class="formDescription${labelClass}"|;
|
||||||
|
|
||||||
my $hoverHelp = $self->get("hoverHelp") || '';
|
my $hoverHelp = $self->get("hoverHelp") || '';
|
||||||
$hoverHelp =~ s/^\s+//;
|
$hoverHelp =~ s/^\s+//;
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,8 @@ sub toHtml {
|
||||||
my ( $style, $url ) = $self->session->quick(qw{ style url });
|
my ( $style, $url ) = $self->session->quick(qw{ style url });
|
||||||
|
|
||||||
$style->setLink( $url->extras('hoverhelp.css'), { rel => "stylesheet", type => "text/css" } );
|
$style->setLink( $url->extras('hoverhelp.css'), { rel => "stylesheet", type => "text/css" } );
|
||||||
|
$style->setScript( $url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js') );
|
||||||
|
$style->setScript( $url->extras('yui/build/container/container-min.js') );
|
||||||
$style->setScript( $url->extras('hoverhelp.js') );
|
$style->setScript( $url->extras('hoverhelp.js') );
|
||||||
|
|
||||||
my $html = $self->getHeader;
|
my $html = $self->getHeader;
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,9 @@ sub toHtml {
|
||||||
|
|
||||||
for ( my $i = 0; $i < @{$self->tabs}; $i++ ) {
|
for ( my $i = 0; $i < @{$self->tabs}; $i++ ) {
|
||||||
my $tab = $self->tabs->[$i];
|
my $tab = $self->tabs->[$i];
|
||||||
$html .= sprintf '<li><a href="#tab%i"><em>%s</em></a></li>', $i, $tab->label;
|
$html .= '<li' . ( $i == 0 ? ' class="selected"' : '' ) . '>'
|
||||||
|
. sprintf( '<a href="#tab%i"><em>%s</em></a>', $i, $tab->label )
|
||||||
|
. '</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= '</ul>'
|
$html .= '</ul>'
|
||||||
|
|
|
||||||
|
|
@ -577,7 +577,6 @@ sub www_viewRss {
|
||||||
|
|
||||||
Adds an RSS tab to the Edit Tabs.
|
Adds an RSS tab to the Edit Tabs.
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
around getEditTabs => sub {
|
around getEditTabs => sub {
|
||||||
my $orig = shift;
|
my $orig = shift;
|
||||||
|
|
@ -588,5 +587,7 @@ around getEditTabs => sub {
|
||||||
return $tabs;
|
return $tabs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,14 +101,15 @@ appendToUrl
|
||||||
*/
|
*/
|
||||||
WebGUI.Admin.prototype.editAsset
|
WebGUI.Admin.prototype.editAsset
|
||||||
= function ( url ) {
|
= function ( url ) {
|
||||||
|
// Show the view tab
|
||||||
|
this.tabBar.selectTab( 0 );
|
||||||
|
this.currentTab = "view";
|
||||||
|
|
||||||
// Open the edit form
|
// Open the edit form
|
||||||
window.frames["view"].location.href = appendToUrl( url, "func=edit" );
|
window.frames["view"].location.href = appendToUrl( url, "func=edit" );
|
||||||
|
|
||||||
// Mark undirty, as we'll clean it ourselves
|
// Mark undirty, as we'll clean it ourselves
|
||||||
this.viewDirty = 0;
|
this.viewDirty = 0;
|
||||||
|
|
||||||
// Show the view tab
|
|
||||||
this.tabBar.selectTab( 0 );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue