forked from ezsystems/ezpublish-legacy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ezsystems#1118 from ezsystems/EZP-23478-website_to…
…olbar_redirection EZP-23478: added redirection form fields in content/edit.tpl
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{* Redirection hidden inputs, based on session variables, themselves based on POST data *} | ||
{if ezhttp_hasvariable( 'RedirectURIAfterPublish', 'session' )} | ||
{def $redirect_uri_after_publish=ezhttp( 'RedirectURIAfterPublish', 'session' )} | ||
{else} | ||
{if ezhttp_hasvariable( 'LastAccessesURI', 'session' )} | ||
{def $redirect_uri_after_publish=ezhttp( 'LastAccessesURI', 'session' )} | ||
{/if} | ||
{/if} | ||
|
||
{if ezhttp_hasvariable( 'RedirectIfDiscarded', 'session' )} | ||
{def $redirect_if_discarded=ezhttp( 'RedirectIfDiscarded', 'session' )} | ||
{else} | ||
{if ezhttp_hasvariable( 'LastAccessesURI', 'session' )} | ||
{def $redirect_if_discarded=ezhttp( 'LastAccessesURI', 'session' )} | ||
{/if} | ||
{/if} | ||
|
||
{if is_set( $redirect_uri_after_publish) } | ||
<input type="hidden" name="RedirectURIAfterPublish" value="{$redirect_uri_after_publish}" /> | ||
{/if} | ||
{if is_set( $redirect_if_discarded ) } | ||
<input type="hidden" name="RedirectIfDiscarded" value="{$redirect_if_discarded}" /> | ||
{/if} |