processPropertiesFromFormPost to processEditForm
This commit is contained in:
parent
ad96c88a36
commit
3c17dafeb4
32 changed files with 154 additions and 169 deletions
|
|
@ -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
|
||||
in the future when the sku asset is created from this data.
|
||||
|
||||
=cut
|
||||
|
||||
override getEditTabs => sub {
|
||||
my $self = shift;
|
||||
|
|
@ -492,6 +491,8 @@ override getEditTabs => sub {
|
|||
return (super(), ['shop', $sku_i18n->get('shop'), 9],);
|
||||
};
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getQueueUrl
|
||||
|
|
|
|||
|
|
@ -1297,7 +1297,7 @@ sub prepareView {
|
|||
|
||||
####################################################################
|
||||
|
||||
=head2 processPropertiesFromFormPost
|
||||
=head2 processEditForm
|
||||
|
||||
Processes the Event Edit form.
|
||||
|
||||
|
|
@ -1316,7 +1316,7 @@ Requests that the events be committed
|
|||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
super();
|
||||
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.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
|
||||
|
|
|
|||
|
|
@ -715,12 +715,12 @@ sub processCommentEditForm {
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost ( )
|
||||
=head2 processEditForm ( )
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
my $i18n = WebGUI::International->new( $self->session,'Asset_Photo' );
|
||||
my $form = $self->session->form;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ These methods are available from this class:
|
|||
=head2 applyConstraints ( options )
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
|
|
@ -419,7 +419,7 @@ Make the default title into the file name minus the extention.
|
|||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
my $i18n = WebGUI::International->new( $self->session,'Asset_Photo' );
|
||||
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
|
||||
this method to deflate the zip file into the proper folder
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
#File should be saved here by the superclass
|
||||
super();
|
||||
|
|
|
|||
|
|
@ -420,13 +420,13 @@ sub prepareView {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost ( )
|
||||
=head2 processEditForm ( )
|
||||
|
||||
Used to process properties from the form posted.
|
||||
|
||||
=cut
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
sub processEditForm {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
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
|
||||
non-sticky, locking and unlocking posts. Calls postProcess when it is done.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
super();
|
||||
my $session = $self->session;
|
||||
|
|
|
|||
|
|
@ -742,13 +742,13 @@ override postProcess => sub {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost
|
||||
=head2 processEditForm
|
||||
|
||||
Extend the base method to do captcha processing.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
|
||||
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.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
super();
|
||||
my $scratchId = "Shortcut_" . $self->getId;
|
||||
|
|
|
|||
|
|
@ -218,7 +218,6 @@ override getEditForm => sub {
|
|||
|
||||
Not to be modified, just defines a new tab.
|
||||
|
||||
=cut
|
||||
|
||||
override getEditTabs => sub {
|
||||
my $self = shift;
|
||||
|
|
@ -226,6 +225,8 @@ override getEditTabs => sub {
|
|||
return (super(), ['shop', $i18n->get('shop'), 9]);
|
||||
};
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getOptions ( )
|
||||
|
|
@ -565,13 +566,13 @@ sub onRemoveFromCart {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost ( )
|
||||
=head2 processEditForm ( )
|
||||
|
||||
Extends the base class to process the tax data.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
|
||||
my $output = super();
|
||||
|
|
|
|||
|
|
@ -422,15 +422,15 @@ sub onRemoveFromCart {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost ( )
|
||||
=head2 processEditForm ( )
|
||||
|
||||
Extended to support event meta fields.
|
||||
|
||||
=cut
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
sub processEditForm {
|
||||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost(@_);
|
||||
$self->SUPER::processEditForm(@_);
|
||||
my $form = $self->session->form;
|
||||
my %metadata = ();
|
||||
foreach my $field (@{$self->getParent->getEventMetaFields}) {
|
||||
|
|
|
|||
|
|
@ -559,13 +559,13 @@ sub prepareView {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost ( )
|
||||
=head2 processEditForm ( )
|
||||
|
||||
Handle photos and photo metadata, like captions, etc.
|
||||
|
||||
=cut
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
sub processEditForm {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
$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.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
super();
|
||||
my $session = $self->session;
|
||||
|
|
|
|||
|
|
@ -350,13 +350,13 @@ sub prepareView {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost
|
||||
=head2 processEditForm
|
||||
|
||||
Extends the master method to handle properties and attachments.
|
||||
|
||||
=cut
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
sub processEditForm {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
$self->next::method(@_);
|
||||
|
|
|
|||
|
|
@ -243,14 +243,14 @@ sub prepareView {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost ( )
|
||||
=head2 processEditForm ( )
|
||||
|
||||
Extend the super class to calculate total asset size from
|
||||
any files stored in the storage location.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
super();
|
||||
my $size = 0;
|
||||
|
|
|
|||
|
|
@ -855,7 +855,7 @@ sub prepareView {
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost ( )
|
||||
=head2 processEditForm ( )
|
||||
|
||||
Process the Calendar Edit form.
|
||||
|
||||
|
|
@ -865,7 +865,7 @@ Adds / removes feeds from the feed trough.
|
|||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $form = $self->session->form;
|
||||
|
|
|
|||
|
|
@ -157,13 +157,13 @@ sub prepareView {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost ( )
|
||||
=head2 processEditForm ( )
|
||||
|
||||
Used to process properties from the form posted.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
my $form = $self->session->form;
|
||||
my (@items,$items);
|
||||
|
|
|
|||
|
|
@ -982,7 +982,6 @@ sub duplicateBranch {
|
|||
|
||||
Add a tab for the mail interface.
|
||||
|
||||
=cut
|
||||
|
||||
sub getEditTabs {
|
||||
my $self = shift;
|
||||
|
|
@ -990,6 +989,8 @@ sub getEditTabs {
|
|||
return ($self->next::method, ['mail', $i18n->get('mail'), 9]);
|
||||
}
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getNewThreadUrl( )
|
||||
|
|
@ -1389,7 +1390,7 @@ sub prepareView {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost
|
||||
=head2 processEditForm
|
||||
|
||||
Extend the base method to handle creating subscription groups, propagating
|
||||
group privileges to all descendants and clearing scratch variables for sort key
|
||||
|
|
@ -1397,7 +1398,7 @@ and direction.
|
|||
|
||||
=cut
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
sub processEditForm {
|
||||
my $self = shift;
|
||||
my $updatePrivs = ($self->session->form->process("groupIdView") ne $self->groupIdView || $self->session->form->process("groupIdEdit") ne $self->groupIdEdit);
|
||||
$self->next::method;
|
||||
|
|
|
|||
|
|
@ -280,13 +280,13 @@ override prepareView => sub {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 processPropertiesFromFormPost
|
||||
=head2 processEditForm
|
||||
|
||||
Extends the base method to handle assetsToHide.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
super();
|
||||
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.
|
||||
|
||||
=cut
|
||||
|
||||
override getEditTabs => sub {
|
||||
my $self = shift;
|
||||
my $i18n = WebGUI::International->new( $self->session, "Asset_DataTable" );
|
||||
|
|
@ -161,6 +159,8 @@ override getEditTabs => sub {
|
|||
return ( super(), [ "data" => $i18n->get("tab label data") ], );
|
||||
};
|
||||
|
||||
=cut
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=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
|
||||
approval workflow.
|
||||
|
||||
=cut
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
sub processEditForm {
|
||||
my $self = shift;
|
||||
my $form = $self->session->form;
|
||||
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.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
super();
|
||||
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.
|
||||
|
||||
=cut
|
||||
|
||||
override processPropertiesFromFormPost => sub {
|
||||
override processEditForm => sub {
|
||||
my $self = shift;
|
||||
my $groupsChanged =
|
||||
(($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
|
||||
noFormPost fields here, or do whatever you want. This method is called
|
||||
|
|
@ -176,9 +176,9 @@ when /yourAssetUrl?func=editSave is requested/posted.
|
|||
|
||||
=cut
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
sub processEditForm {
|
||||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost;
|
||||
$self->SUPER::processEditForm;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue