Add a cancel button to the edit story form.
This commit is contained in:
parent
40d17b7be9
commit
e0f46517bb
2 changed files with 27 additions and 22 deletions
Binary file not shown.
|
|
@ -212,28 +212,28 @@ sub getEditForm {
|
||||||
my $url = $isNew ? $archive->getUrl : $self->getUrl;
|
my $url = $isNew ? $archive->getUrl : $self->getUrl;
|
||||||
my $title = $self->getTitle;
|
my $title = $self->getTitle;
|
||||||
my $var = {
|
my $var = {
|
||||||
formHeader => WebGUI::Form::formHeader($session, {action => $url})
|
formHeader => WebGUI::Form::formHeader($session, {action => $url})
|
||||||
. WebGUI::Form::hidden($session, { name => 'func', value => 'editSave' })
|
. WebGUI::Form::hidden($session, { name => 'func', value => 'editSave' })
|
||||||
. WebGUI::Form::hidden($session, { name => 'proceed', value => 'showConfirmation' }),
|
. WebGUI::Form::hidden($session, { name => 'proceed', value => 'showConfirmation' }),
|
||||||
formFooter => WebGUI::Form::formFooter($session),
|
formFooter => WebGUI::Form::formFooter($session),
|
||||||
formTitle => $i18n->get('editing','Asset_WikiPage').' '.$title,
|
formTitle => $i18n->get('editing','Asset_WikiPage').' '.$title,
|
||||||
titleForm => WebGUI::Form::text($session, {
|
titleForm => WebGUI::Form::text($session, {
|
||||||
name => 'title',
|
name => 'title',
|
||||||
value => $form->get('title') || $self->get('title'),
|
value => $form->get('title') || $self->get('title'),
|
||||||
} ),
|
} ),
|
||||||
subTitleForm => WebGUI::Form::text($session, {
|
subTitleForm => WebGUI::Form::text($session, {
|
||||||
name => 'subtitle',
|
name => 'subtitle',
|
||||||
value => $form->get('subtitle') || $self->get('subtitle')
|
value => $form->get('subtitle') || $self->get('subtitle')
|
||||||
} ),
|
} ),
|
||||||
bylineForm => WebGUI::Form::text($session, {
|
bylineForm => WebGUI::Form::text($session, {
|
||||||
name => 'byline',
|
name => 'byline',
|
||||||
value => $form->get('byline') || $self->get('byline')
|
value => $form->get('byline') || $self->get('byline')
|
||||||
} ),
|
} ),
|
||||||
locationForm => WebGUI::Form::text($session, {
|
locationForm => WebGUI::Form::text($session, {
|
||||||
name => 'location',
|
name => 'location',
|
||||||
value => $form->get('location') || $self->get('location')
|
value => $form->get('location') || $self->get('location')
|
||||||
} ),
|
} ),
|
||||||
keywordsForm => WebGUI::Form::text($session, {
|
keywordsForm => WebGUI::Form::text($session, {
|
||||||
name => 'keywords',
|
name => 'keywords',
|
||||||
value => $form->get('keywords') || WebGUI::Keyword->new($session)->getKeywordsForAsset({ asset => $self })
|
value => $form->get('keywords') || WebGUI::Keyword->new($session)->getKeywordsForAsset({ asset => $self })
|
||||||
} ),
|
} ),
|
||||||
|
|
@ -258,6 +258,11 @@ sub getEditForm {
|
||||||
name => 'saveAndPreview',
|
name => 'saveAndPreview',
|
||||||
value => $i18n->get('save and preview'),
|
value => $i18n->get('save and preview'),
|
||||||
}),
|
}),
|
||||||
|
cancelButton => WebGUI::Form::button($session, {
|
||||||
|
name => 'cancel',
|
||||||
|
value => $i18n->get('cancel','WebGUI'),
|
||||||
|
extras => q|onclick="history.go(-1);" class="backwardButton"|,
|
||||||
|
}),
|
||||||
saveAndAddButton => WebGUI::Form::submit($session, {
|
saveAndAddButton => WebGUI::Form::submit($session, {
|
||||||
name => 'saveAndAddPhoto',
|
name => 'saveAndAddPhoto',
|
||||||
value => $i18n->get('save and add another photo'),
|
value => $i18n->get('save and add another photo'),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue