Forms: Provide a link to edit an item that was just created
authorMarcel Werk <burntime@woltlab.com>
Sun, 16 Aug 2020 13:36:46 +0000 (15:36 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 16 Aug 2020 13:36:46 +0000 (15:36 +0200)
Closes #3289

74 files changed:
wcfsetup/install/files/acp/templates/__form.tpl
wcfsetup/install/files/acp/templates/adAdd.tpl
wcfsetup/install/files/acp/templates/articleAdd.tpl
wcfsetup/install/files/acp/templates/bbcodeAdd.tpl
wcfsetup/install/files/acp/templates/bbcodeMediaProviderAdd.tpl
wcfsetup/install/files/acp/templates/boxAdd.tpl
wcfsetup/install/files/acp/templates/captchaQuestionAdd.tpl
wcfsetup/install/files/acp/templates/categoryAdd.tpl
wcfsetup/install/files/acp/templates/contactOptionAdd.tpl
wcfsetup/install/files/acp/templates/contactRecipientAdd.tpl
wcfsetup/install/files/acp/templates/cronjobAdd.tpl
wcfsetup/install/files/acp/templates/formSuccess.tpl [new file with mode: 0644]
wcfsetup/install/files/acp/templates/labelAdd.tpl
wcfsetup/install/files/acp/templates/labelGroupAdd.tpl
wcfsetup/install/files/acp/templates/languageAdd.tpl
wcfsetup/install/files/acp/templates/menuAdd.tpl
wcfsetup/install/files/acp/templates/menuItemAdd.tpl
wcfsetup/install/files/acp/templates/noticeAdd.tpl
wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl
wcfsetup/install/files/acp/templates/pageAdd.tpl
wcfsetup/install/files/acp/templates/paidSubscriptionAdd.tpl
wcfsetup/install/files/acp/templates/paidSubscriptionUserAdd.tpl
wcfsetup/install/files/acp/templates/smileyAdd.tpl
wcfsetup/install/files/acp/templates/styleAdd.tpl
wcfsetup/install/files/acp/templates/tagAdd.tpl
wcfsetup/install/files/acp/templates/templateAdd.tpl
wcfsetup/install/files/acp/templates/templateGroupAdd.tpl
wcfsetup/install/files/acp/templates/trophyAdd.tpl
wcfsetup/install/files/acp/templates/userAdd.tpl
wcfsetup/install/files/acp/templates/userGroupAdd.tpl
wcfsetup/install/files/acp/templates/userGroupAssignmentAdd.tpl
wcfsetup/install/files/acp/templates/userOptionAdd.tpl
wcfsetup/install/files/acp/templates/userOptionCategoryAdd.tpl
wcfsetup/install/files/acp/templates/userRankAdd.tpl
wcfsetup/install/files/acp/templates/userTrophyAdd.tpl
wcfsetup/install/files/lib/acp/form/AdAddForm.class.php
wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php
wcfsetup/install/files/lib/acp/form/ArticleCategoryAddForm.class.php
wcfsetup/install/files/lib/acp/form/BBCodeAddForm.class.php
wcfsetup/install/files/lib/acp/form/BBCodeMediaProviderAddForm.class.php
wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php
wcfsetup/install/files/lib/acp/form/CaptchaQuestionAddForm.class.php
wcfsetup/install/files/lib/acp/form/ContactOptionAddForm.class.php
wcfsetup/install/files/lib/acp/form/ContactOptionEditForm.class.php
wcfsetup/install/files/lib/acp/form/ContactRecipientAddForm.class.php
wcfsetup/install/files/lib/acp/form/CronjobAddForm.class.php
wcfsetup/install/files/lib/acp/form/LabelAddForm.class.php
wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/LanguageAddForm.class.php
wcfsetup/install/files/lib/acp/form/MediaCategoryAddForm.class.php
wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php
wcfsetup/install/files/lib/acp/form/MenuItemAddForm.class.php
wcfsetup/install/files/lib/acp/form/NoticeAddForm.class.php
wcfsetup/install/files/lib/acp/form/PackageUpdateServerAddForm.class.php
wcfsetup/install/files/lib/acp/form/PageAddForm.class.php
wcfsetup/install/files/lib/acp/form/PaidSubscriptionAddForm.class.php
wcfsetup/install/files/lib/acp/form/ReactionTypeAddForm.class.php
wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php
wcfsetup/install/files/lib/acp/form/SmileyCategoryAddForm.class.php
wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php
wcfsetup/install/files/lib/acp/form/TagAddForm.class.php
wcfsetup/install/files/lib/acp/form/TemplateAddForm.class.php
wcfsetup/install/files/lib/acp/form/TemplateGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/TrophyAddForm.class.php
wcfsetup/install/files/lib/acp/form/TrophyCategoryAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserGroupAssignmentAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserOptionCategoryAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserRankAddForm.class.php
wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index d6ad54d0e6734b2f878fc27a813382009202a20e..ace2598e2908af00a81f59007837a633888b956f 100644 (file)
 {/if}
 
 {if $form->showsSuccessMessage()}
-       <p class="success">{@$form->getSuccessMessage()}</p>
+       <p class="success">
+               <span class="icon icon16 fa fa-check green"></span>
+               <span>{@$form->getSuccessMessage()}</span>
+               {if !$objectEditLink|empty}
+                       <a href="{$objectEditLink}" class="button buttonPrimary small"><span class="icon icon16 fa-pencil"></span> <span>{lang}wcf.global.success.add.button.editCreatedObject{/lang}</span></a>
+               {/if}
+       </p>
 {/if}
 
 {if $form->isAjax()}
index c0e121044667e38d5eb211cc697942e40a98218f..39a3dbd1a9e60fbbd902b4476d6bd796ea282df3 100644 (file)
@@ -24,9 +24,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form id="adForm" method="post" action="{if $action == 'add'}{link controller='AdAdd'}{/link}{else}{link controller='AdEdit' object=$adObject}{/link}{/if}">
        <div class="section">
index 9ba2864b79c4a9b7de94b4665f617efad13ceeef..1f062f4aef2354f4130a75e94e2b09b561341bba 100644 (file)
@@ -91,9 +91,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success" role="status">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 {if $action == 'edit'}
        <p class="info jsArticleNoticeTrash"{if !$article->isDeleted} style="display: none;"{/if}>{lang}wcf.acp.article.trash.notice{/lang}</p>
index 166ac3802ae723ef5fa3d1a39db52fd06fe559d4..828a820199fabfbae1ff53091a840607a377cf68 100644 (file)
@@ -90,9 +90,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='BBCodeAdd'}{/link}{else}{link controller='BBCodeEdit' object=$bbcode}{/link}{/if}">
        <div class="section">
index b4ae4ba487a643c8b678132eced5dcb013d4b60f..c81c5a7983f11897a027166011c8074e644be92e 100644 (file)
@@ -16,9 +16,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='BBCodeMediaProviderAdd'}{/link}{else}{link controller='BBCodeMediaProviderEdit' object=$mediaProvider}{/link}{/if}">
        <div class="section">
@@ -99,4 +97,4 @@
        </div>
 </form>
 
-{include file='footer'}
\ No newline at end of file
+{include file='footer'}
index 16d172d9f18490f8b29969e7e30f913bf0196e28..b31738f01cbf2855021a68cacd79668ffa2ba737 100644 (file)
@@ -86,9 +86,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 {if $action == 'edit' && !$lastVersion|empty}
        <p class="info">{lang}wcf.acp.box.lastVersion{/lang}</p>
index eee5ffbbc65c91e1e9e8ac9cdb54e1f13d0e5eca..270c96ceec99ee239ac03246f903e732e9e5ae45 100644 (file)
@@ -16,9 +16,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form id="adForm" method="post" action="{if $action == 'add'}{link controller='CaptchaQuestionAdd'}{/link}{else}{link controller='CaptchaQuestionEdit' id=$captchaQuestion->questionID}{/link}{/if}">
        <div class="section">
index 8297538c72ddd1181d7f940076dd98d50141cffd..b95cd355f63b66b5d35d4fd322f52238f42c86ae 100644 (file)
@@ -50,9 +50,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{@$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller=$addController application=$objectType->getProcessor()->getApplication()}{/link}{else}{link controller=$editController application=$objectType->getProcessor()->getApplication() object=$category}{/link}{/if}">
        {event name='beforeSections'}
        </div>
 </form>
 
-{include file='footer'}
\ No newline at end of file
+{include file='footer'}
index 1468dd671967b03f274ff9ab190863077deea171..b759c262c960f6153a39e7d62befd9019442cac0 100644 (file)
@@ -16,9 +16,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action === 'add'}{link controller='ContactOptionAdd'}{/link}{else}{link controller='ContactOptionEdit' id=$optionID}{/link}{/if}">
        {include file='customOptionAdd'}
index 6bab6a3ea413bea9fdce2fea018909abb698df74..f67830f3039b90df4568286f885a36ed44078b57 100644 (file)
@@ -16,9 +16,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{@$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action === 'add'}{link controller='ContactRecipientAdd'}{/link}{else}{link controller='ContactRecipientEdit' id=$recipientID}{/link}{/if}">
        <div class="section">
index fe3baef0b0b7738c11c424c9529faf1cccebc16c..012189854c68871b65d343103a4ab8873a0ed63f 100644 (file)
@@ -18,9 +18,7 @@
 
 <p class="info">{lang}wcf.acp.cronjob.intro{/lang}</p>
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='CronjobAdd'}{/link}{else}{link controller='CronjobEdit' id=$cronjobID}{/link}{/if}">
        <div class="section">
diff --git a/wcfsetup/install/files/acp/templates/formSuccess.tpl b/wcfsetup/install/files/acp/templates/formSuccess.tpl
new file mode 100644 (file)
index 0000000..2150222
--- /dev/null
@@ -0,0 +1,10 @@
+{if $success|isset}
+       <p class="success" role="status">
+               <span class="icon icon16 fa fa-check green"></span>
+               <span>{lang}wcf.global.success.{$action}{/lang}</span>
+       
+               {if $action == 'add' && !$objectEditLink|empty}
+                       <a href="{$objectEditLink}" class="button buttonPrimary small"><span class="icon icon16 fa-pencil"></span> <span>{lang}wcf.global.success.add.button.editCreatedObject{/lang}</span></a>
+               {/if}
+       </p>
+{/if}
index 14ed6e733caf9434a6b0d5280c4741eef00aaf20..c28fd2de36f9993b39c33d30c2fb88692cc81b32 100644 (file)
@@ -40,9 +40,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 {if $labelGroupList|count}
        <form method="post" action="{if $action == 'add'}{link controller='LabelAdd'}{/link}{else}{link controller='LabelEdit' object=$label}{/link}{/if}">
index dbb6ef31a6229504291a773f7f8e8bc99b0cc682..faab5f8bc704e6089a8b03b6636f00f472ecef50 100644 (file)
@@ -35,9 +35,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='LabelGroupAdd'}{/link}{else}{link controller='LabelGroupEdit' object=$labelGroup}{/link}{/if}">
        <div class="section tabMenuContainer">
index bfb0d90f32f221d5e3893d1a741faaa47f6fd32d..89637d66deade7e3fde62a3587ccda38f48ef2da 100644 (file)
@@ -16,9 +16,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{@$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'edit'}{link controller='LanguageEdit' id=$languageID}{/link}{else}{link controller='LanguageAdd'}{/link}{/if}">
        <section class="section">
index ec311ca0099a71ad8e482f64ff6e30d5e66e807e..b78b08abb00966613086ee6f988e43e07db95e00 100644 (file)
@@ -19,9 +19,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='MenuAdd'}{/link}{else}{link controller='MenuEdit' id=$menuID}{/link}{/if}">
        {if $action == 'edit' && $menu->identifier == 'com.woltlab.wcf.MainMenu'}
index 016a949ca167f0f976d3023dbd0bf3a5fc4ecbf1..1e75a18083185366f22d25fdd4bd6825fb30a514 100644 (file)
@@ -44,9 +44,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='MenuItemAdd'}{/link}{else}{link controller='MenuItemEdit' id=$itemID}{/link}{/if}">
        <div class="section">
index f782945984b0ea1ce09bcfeadb25bf8696e6fc3f..67b7f9b5184340ff7acd12c8e53cb48494ac4624 100644 (file)
@@ -36,9 +36,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form id="formContainer" method="post" action="{if $action == 'add'}{link controller='NoticeAdd'}{/link}{else}{link controller='NoticeEdit' object=$notice}{/link}{/if}">
        <div class="section">
index 55cdbec297993737a175e7b3ebfd19cfcaa196d5..c47139b82cbb72bc3e99aea54458727520deea2c 100644 (file)
@@ -20,9 +20,7 @@
        <p class="warning">{lang}wcf.acp.updateServer.lastErrorMessage{/lang}<br>{$packageUpdateServer->errorMessage}</p>
 {/if}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='PackageUpdateServerAdd'}{/link}{else}{link controller='PackageUpdateServerEdit' id=$packageUpdateServerID}{/link}{/if}">
        <div class="section">
index dff6b975e4b2bdb9d2fceb5a1abb2ed6fd4d35e0..beda9e36f787c657f609e1424320d27d280b8279 100644 (file)
@@ -98,9 +98,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 {if $action == 'edit' && !$lastVersion|empty}
        <p class="info">{lang}wcf.acp.page.lastVersion{/lang}</p>
index 387ababbc65e8a46a0532c846c921c64becb7f2d..c2fee72d2e188f84dde6ed40e6f4e3caf1c40b35 100644 (file)
@@ -33,9 +33,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='PaidSubscriptionAdd'}{/link}{else}{link controller='PaidSubscriptionEdit' id=$subscriptionID}{/link}{/if}">
        <div class="section">
        </div>
 </form>
 
-{include file='footer'}
\ No newline at end of file
+{include file='footer'}
index 30832b927ff5664a401c355b070e4db41fe17633..806b95fb99f40b434e5fe9a866cbafd6b6fa9210 100644 (file)
@@ -33,9 +33,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='PaidSubscriptionUserAdd' id=$subscriptionID}{/link}{else}{link controller='PaidSubscriptionUserEdit' id=$subscriptionUserID}{/link}{/if}">
        <div class="section">
index 391495a1cdcec22aefbf4107f73f6e25145a7059..4bf6c71843a951575467d2c119b7d26e74be2238 100644 (file)
@@ -16,9 +16,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='SmileyAdd'}{/link}{else}{link controller='SmileyEdit' id=$smiley->smileyID}{/link}{/if}" enctype="multipart/form-data">
        <section class="section">
index 6c1663876c2a3a4c6589b6b9772d22313c4feb77..3ccd097e026d73da83684a19149acf79e32abe0d 100644 (file)
@@ -65,9 +65,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='StyleAdd'}{/link}{else}{link controller='StyleEdit' id=$styleID}{/link}{/if}">
        <div class="section tabMenuContainer" data-active="{$activeTabMenuItem}" data-store="activeTabMenuItem" id="styleTabMenuContainer">
index 2f1b2c97bdb1281e560bdc418ec4a76bf5853eb9..71145f81c27db28b1f94082c689f35aaa39cd900 100644 (file)
@@ -16,9 +16,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='TagAdd'}{/link}{else}{link controller='TagEdit' object=$tagObj}{/link}{/if}">
        <div class="section">
        </div>
 </form>
 
-{include file='footer'}
\ No newline at end of file
+{include file='footer'}
index c79ea5bdc0573b89173a30a1fb4c3daaec8191f2..29432046c24316be8c7a45443251e883a4a9fa4f 100644 (file)
@@ -18,9 +18,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 {if $availableTemplateGroups|count}
        <form method="post" action="{if $action == 'add'}{link controller='TemplateAdd'}{/link}{else}{link controller='TemplateEdit' id=$templateID}{/link}{/if}">
index 90607ee32a0ee3dc79676e3d603767e86cbe71f2..221154f4f7ad96b0a2898fa149edc4e6be5cad4e 100644 (file)
@@ -34,9 +34,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='TemplateGroupAdd'}{/link}{else}{link controller='TemplateGroupEdit' id=$templateGroupID}{/link}{/if}">
        <div class="section">
index 0c87dfde3afbcfe606054863e36096dcb340cd10..ff137c49fc20ccb6f611bb7f4f83abf833420977 100644 (file)
@@ -64,9 +64,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 {if $trophyCategories|count}
        <form id="trophyForm" method="post" action="{if $action == 'add'}{link controller='TrophyAdd'}{/link}{else}{link controller='TrophyEdit' id=$trophy->getObjectID()}{/link}{/if}">
index 19289ed966884a8445e50e306f7ce31db81bfe8c..644f256094807676ccd2898a5321e2d9e0c85c76 100644 (file)
@@ -21,9 +21,7 @@
        <p class="warning">{lang}wcf.acp.user.edit.warning.selfEdit{/lang}</p>
 {/if}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{@$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='UserAdd'}{/link}{else}{link controller='UserEdit' id=$userID}{/link}{/if}">
        <div class="section tabMenuContainer">
index a7e2ba314184edd6549c58cca1316d3d570bb9c3..64936d4198cb89cc2fe9d298a2f5020e37aee452 100644 (file)
@@ -79,9 +79,7 @@
        <p class="warning">{lang}wcf.acp.group.edit.warning.selfIsMember{/lang}</p>
 {/if}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{@$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='UserGroupAdd'}{/link}{else}{link controller='UserGroupEdit' id=$groupID}{/link}{/if}">
        <div class="section">
index fe1221ee474d311935d27befe0de8ed02d21e769..29a299cda397fea27877fc3474160a37149679b4 100644 (file)
@@ -16,9 +16,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{@$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='UserGroupAssignmentAdd'}{/link}{else}{link controller='UserGroupAssignmentEdit' object=$assignment}{/link}{/if}">
        <div class="section">
index df8f6fcc1a749f03f9c998b4437b633da82bf3e8..27bae71f068473c33947f8b6188baedff058f0a0 100644 (file)
@@ -17,9 +17,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 {if !$availableCategories|empty}
        <form method="post" action="{if $action == 'add'}{link controller='UserOptionAdd'}{/link}{else}{link controller='UserOptionEdit' id=$optionID}{/link}{/if}">
index b2f81558c3b682774cbfe2946aa6652d0c18cc65..1c7612b21b836fb121111993a9b85ca6ada7e14d 100644 (file)
@@ -17,9 +17,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='UserOptionCategoryAdd'}{/link}{else}{link controller='UserOptionCategoryEdit' id=$categoryID}{/link}{/if}">
        <div class="section">
index 008445caf4fd1e09a24b7586b1a6047d495d3765..677577f149007c2f649775ce81261cb1e33519f5 100644 (file)
@@ -40,9 +40,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 <form method="post" action="{if $action == 'add'}{link controller='UserRankAdd'}{/link}{else}{link controller='UserRankEdit' id=$rankID}{/link}{/if}">
        <div class="section">
index bf114a1a3745245445b4f69b062d42c397707005..3e559cbe0b9042b4ba290aa9362d3f3b29a0967a 100644 (file)
@@ -37,9 +37,7 @@
 
 {include file='formError'}
 
-{if $success|isset}
-       <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
-{/if}
+{include file='formSuccess'}
 
 {if $hasSuitableTrophy}
        <form method="post" action="{if $action == 'add'}{link controller='UserTrophyAdd'}{/link}{else}{link controller='UserTrophyEdit' id=$userTrophy->getObjectID()}{/link}{/if}">
index a4827be93e1ad365436a4a03f40a89a7eea86a38..1c9aee2a2f4e9934215291a0984d1c11c8f8cd83 100644 (file)
@@ -8,6 +8,7 @@ use wcf\system\ad\AdHandler;
 use wcf\system\ad\location\IAdLocation;
 use wcf\system\condition\ConditionHandler;
 use wcf\system\exception\UserInputException;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -216,7 +217,10 @@ class AdAddForm extends AbstractForm {
                        $condition->getProcessor()->reset();
                }
                
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('AdEdit', ['id' => $returnValues['returnValues']->adID]),
+               ]);
        }
        
        /**
index 65c7aa9e924f7b6b30df84818f1d42f996eca17c..3b05e4f65779c530b5ef260d5d673d49a528fb12 100644 (file)
@@ -454,7 +454,10 @@ class ArticleAddForm extends AbstractForm {
                $this->saved();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('ArticleEdit', ['id' => $article->getObjectID()]),
+               ]);
                
                // reset variables
                $this->publicationDate = '';
index d08f2615f8d5dfaa41654d70ee0510772fc6a632..812e987034f833663797834c46413d78c20bf677 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 namespace wcf\acp\form;
 use wcf\system\exception\UserInputException;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -84,6 +85,10 @@ class ArticleCategoryAddForm extends AbstractCategoryAddForm {
                
                parent::save();
                
+               WCF::getTPL()->assign([
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('ArticleCategoryEdit', ['id' => $this->objectAction->getReturnValues()['returnValues']->categoryID]),
+               ]);
+               
                $this->sortField = 'publicationDate';
                $this->sortOrder = 'DESC';
        }
index e9c8cd7fbe368e6efaca3c04ff49632356efed80..56c54dc1e4ac868012195e12f80c9903917254fe 100644 (file)
@@ -8,6 +8,7 @@ use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\Regex;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -269,7 +270,10 @@ class BBCodeAddForm extends AbstractForm {
                I18nHandler::getInstance()->reset();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('BBCodeEdit', ['id' => $returnValues['returnValues']->bbcodeID]),
+               ]);
        }
        
        /**
index 323109321c421bd8ae2de791de6ea70cc3349699..0748d5e5b43fc5b8990cf529ca42c3e863f010e6 100644 (file)
@@ -6,6 +6,7 @@ use wcf\data\bbcode\media\provider\BBCodeMediaProviderEditor;
 use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\Regex;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -133,7 +134,10 @@ class BBCodeMediaProviderAddForm extends AbstractForm {
                $this->title = $this->regex = $this->html = $this->className = '';
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('BBCodeMediaProviderEdit', ['id' => $provider->providerID]),
+               ]);
        }
        
        /**
index 2c36e1f543733d7025d487eb96033814d017f100..52f9d385ac0015e9293c2980b9d64fe410d977e6 100644 (file)
@@ -562,7 +562,10 @@ class BoxAddForm extends AbstractForm {
                $this->saved();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('BoxEdit', ['id' => $box->getObjectID()]),
+               ]);
                
                // reset variables
                $this->cssClassName = $this->name = '';
index 3820b04e32e751c8ec3171c0379443d8ae111612..0b51d42d18ce63177e88edff260fab332152e5ef 100644 (file)
@@ -6,6 +6,7 @@ use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\Regex;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -117,7 +118,10 @@ class CaptchaQuestionAddForm extends AbstractForm {
                $this->isDisabled = 0;
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('CaptchaQuestionEdit', ['id' => $questionID]),
+               ]);
        }
        
        /**
index 4da4864fc6a448c48b52959f68e9aaae23b8df20..95545dd4775a20f582b529036d6bddd6bbf8c215 100644 (file)
@@ -3,6 +3,8 @@ namespace wcf\acp\form;
 use wcf\data\contact\option\ContactOption;
 use wcf\data\contact\option\ContactOptionAction;
 use wcf\data\contact\option\ContactOptionEditor;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
 
 /**
  * Shows the contact option add form.
@@ -61,4 +63,15 @@ class ContactOptionAddForm extends AbstractCustomOptionForm {
                $this->getI18nValue('optionTitle')->setLanguageItem('wcf.contact.option', 'wcf.contact', 'com.woltlab.wcf');
                $this->getI18nValue('optionDescription')->setLanguageItem('wcf.contact.optionDescription', 'wcf.contact', 'com.woltlab.wcf');
        }
+       
+       /**
+        * @inheritDoc
+        */
+       public function save() {
+               parent::save();
+               
+               WCF::getTPL()->assign([
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('ContactOptionEdit', ['id' => $this->objectAction->executeAction()['returnValues']->getObjectID()]),
+               ]);
+       }
 }
index b712f2f615eb3567148287bb2cd2296841203198..f4ee58c7d9685582c616c314a528b25266393998 100644 (file)
@@ -15,4 +15,11 @@ class ContactOptionEditForm extends ContactOptionAddForm {
         * @inheritDoc
         */
        public $action = 'edit';
+       
+       /**
+        * @inheritDoc
+        */
+       public function save() {
+               AbstractCustomOptionForm::save();
+       }
 }
index bdd31f6a62975916363ffc037370ae7c99597c9f..a92fcccf6e8dee9ea5824d23429be0098e625cea 100644 (file)
@@ -7,6 +7,7 @@ use wcf\form\AbstractForm;
 use wcf\system\email\Mailbox;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 
 /**
@@ -155,7 +156,10 @@ class ContactRecipientAddForm extends AbstractForm {
                $this->saved();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('ContactRecipientEdit', ['id' => $recipientID]),
+               ]);
                
                // reset values
                $this->email = $this->name = 0;
index c91fba1f39dbff55885a402c89cb074044db53d6..402a0638da74216f2fa58f484b98d2565f60273e 100755 (executable)
@@ -7,6 +7,7 @@ use wcf\form\AbstractForm;
 use wcf\system\exception\SystemException;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\CronjobUtil;
 use wcf\util\StringUtil;
@@ -188,7 +189,10 @@ class CronjobAddForm extends AbstractForm {
                I18nHandler::getInstance()->reset();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('CronjobEdit', ['id' => $cronjobID]),
+               ]);
        }
        
        /**
index 30edd88d495e786405c1d4a4da641701dae8cd80..c76f20be8cfc2abfbb2418391cfae74d651b2952 100644 (file)
@@ -8,6 +8,7 @@ use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\Regex;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -173,10 +174,10 @@ class LabelAddForm extends AbstractForm {
                        'showOrder' => $this->showOrder
                ])]);
                $this->objectAction->executeAction();
+               $returnValues = $this->objectAction->getReturnValues();
+               $labelID = $returnValues['returnValues']->labelID;
                
                if (!I18nHandler::getInstance()->isPlainValue('label')) {
-                       $returnValues = $this->objectAction->getReturnValues();
-                       $labelID = $returnValues['returnValues']->labelID;
                        I18nHandler::getInstance()->save('label', 'wcf.acp.label.label'.$labelID, 'wcf.acp.label', 1);
                        
                        // update group name
@@ -200,7 +201,10 @@ class LabelAddForm extends AbstractForm {
                I18nHandler::getInstance()->reset();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('LabelEdit', ['id' => $labelID]),
+               ]);
        }
        
        /**
index db8a8c68d6c2003e0b4bcf8abc6bc04237a376c1..7b69464a5728cad61851626db7502b82a76b8f97 100644 (file)
@@ -9,6 +9,7 @@ use wcf\system\exception\UserInputException;
 use wcf\system\label\object\type\ILabelObjectTypeHandler;
 use wcf\system\label\object\type\LabelObjectTypeContainer;
 use wcf\system\language\I18nHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -197,7 +198,10 @@ class LabelGroupAddForm extends AbstractForm {
                $this->setObjectTypeRelations();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('LabelGroupEdit', ['id' => $returnValues['returnValues']->groupID]),
+               ]);
                
                I18nHandler::getInstance()->reset();
        }
index 2a690913e385fb8066094ca0bc09a025562a2442..5f9bb8f0e0c7dcf2f3e7c0612dc3b8b9a737b07b 100644 (file)
@@ -5,6 +5,7 @@ use wcf\data\language\LanguageEditor;
 use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\LanguageFactory;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -155,7 +156,10 @@ class LanguageAddForm extends AbstractForm {
                $this->saved();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('LanguageEdit', ['id' => $this->language->languageID]),
+               ]);
                
                // reset values
                $this->countryCode = $this->languageCode = $this->languageName = '';
index 292d2753fe9eb4932896e5c846a9cb8e9825f1c4..90a28a38a400da295f31de0c8e6361e23446ddb2 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 namespace wcf\acp\form;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
 
 /**
  * Shows the media category add form.
@@ -20,4 +22,15 @@ class MediaCategoryAddForm extends AbstractCategoryAddForm {
         * @inheritDoc
         */
        public $objectTypeName = 'com.woltlab.wcf.media.category';
+       
+       /**
+        * @inheritDoc
+        */
+       public function save() {
+               parent::save();
+               
+               WCF::getTPL()->assign([
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('MediaCategoryEdit', ['id' => $this->objectAction->getReturnValues()['returnValues']->categoryID]),
+               ]);
+       }
 }
index ff9080b2bf0e247903946f0771980f3cc4cd7a4a..fa7deb1d0b23726ce770405006b8c37a88e265e2 100644 (file)
@@ -10,6 +10,7 @@ use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\language\LanguageFactory;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\ArrayUtil;
 use wcf\util\StringUtil;
@@ -210,7 +211,10 @@ class MenuAddForm extends AbstractForm {
                $this->pageIDs = $this->aclValues = [];
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('MenuEdit', ['id' => $menuEditor->menuID]),
+               ]);
                
                I18nHandler::getInstance()->reset();
        }
index dec77ce5476ade815914956229f78c9c1471ace6..76d26de80acab5bf95e213e3295733da9ddc9711 100644 (file)
@@ -12,6 +12,7 @@ use wcf\system\exception\IllegalLinkException;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\page\handler\ILookupPageHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -269,7 +270,10 @@ class MenuItemAddForm extends AbstractForm {
                $this->saved();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('MenuItemEdit', ['id' => $menuItem->itemID]),
+               ]);
                
                // reset variables
                $this->isInternalLink = true;
index f94907456ef0032c6ebe5447e6be24621808cc9c..d2803350a90e931cae9f4cbba6140a1715a3aae6 100644 (file)
@@ -9,6 +9,7 @@ use wcf\system\condition\ConditionHandler;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\Regex;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -240,7 +241,10 @@ class NoticeAddForm extends AbstractForm {
                        $condition->getProcessor()->reset();
                }
                
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('NoticeEdit', ['id' => $returnValues['returnValues']->noticeID]),
+               ]);
        }
        
        /**
index 576b0c7e83aaf225c4f7ff5c6b87f2fba0906dcf..e67eb1830fbf5997e98f1908c690ec4122935e69 100755 (executable)
@@ -4,6 +4,7 @@ use wcf\data\package\update\server\PackageUpdateServer;
 use wcf\data\package\update\server\PackageUpdateServerAction;
 use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\system\WCFACP;
 use wcf\util\StringUtil;
@@ -83,14 +84,17 @@ class PackageUpdateServerAddForm extends AbstractForm {
                        'loginUsername' => $this->loginUsername,
                        'loginPassword' => $this->loginPassword
                ])]);
-               $this->objectAction->executeAction();
+               $returnValues = $this->objectAction->executeAction();
                $this->saved();
                
                // reset values
                $this->serverURL = $this->loginUsername = $this->loginPassword = '';
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('PackageUpdateServerEdit', ['id' => $returnValues['returnValues']->packageUpdateServerID]),
+               ]);
        }
        
        /**
index 1cdac321f9e00c5dec06acedbc703372140c0d99..aa3048c84eed406aa02e007fd5e511128eff9c98 100644 (file)
@@ -636,7 +636,10 @@ class PageAddForm extends AbstractForm {
                $this->saved();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('PageEdit', ['id' => $page->pageID]),
+               ]);
                
                // reset variables
                $this->parentPageID = $this->isDisabled = $this->isLandingPage = $this->availableDuringOfflineMode = $this->enableShareButtons = $this->addPageToMainMenu = 0;
index 188a136278ad57471660d49cd5eacb09bffed4bc..bdaf074d741d1b7423bfa11fc02388f80071a423 100644 (file)
@@ -10,6 +10,7 @@ use wcf\system\exception\NamedUserException;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\payment\method\PaymentMethodHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\ArrayUtil;
 
@@ -283,7 +284,10 @@ class PaidSubscriptionAddForm extends AbstractForm {
                I18nHandler::getInstance()->reset();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('PaidSubscriptionEdit', ['id' => $returnValues['returnValues']->subscriptionID]),
+               ]);
        }
        
        /**
index 9def60650096107587e449879ecf53983f1c5221..e416bc59c6c2c143af9f129a2353763f7d22dcb1 100644 (file)
@@ -44,6 +44,11 @@ class ReactionTypeAddForm extends AbstractFormBuilderForm {
         */
        public $neededModules = ['MODULE_LIKE'];
        
+       /**
+        * @inheritDoc
+        */
+       public $objectEditLinkController = 'ReactionTypeEdit';
+               
        /**
         * @inheritDoc
         */
index 16ad4615cbadce9774a9c292dc387e97ea2424c7..04068283ba2e1183eb39620a8f56a7db72cc77ca 100644 (file)
@@ -8,6 +8,7 @@ use wcf\form\AbstractForm;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\FileUtil;
 use wcf\util\ImageUtil;
@@ -224,7 +225,10 @@ class SmileyAddForm extends AbstractForm {
                $this->saved();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('SmileyEdit', ['id' => $smileyID]),
+               ]);
        }
        
        /**
index fe98b3b637b6a819c227c16a6da83ebc1544b54b..af8e1fcc5725aa442b99e83bd9ab26dfe838b932 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 namespace wcf\acp\form;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
 
 /**
  * Shows the smiley category add form.
@@ -29,4 +31,15 @@ class SmileyCategoryAddForm extends AbstractCategoryAddForm {
         * @inheritDoc
         */
        public $neededModules = ['MODULE_SMILEY'];
+       
+       /**
+        * @inheritDoc
+        */
+       public function save() {
+               parent::save();
+               
+               WCF::getTPL()->assign([
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('SmileyCategoryEdit', ['id' => $this->objectAction->getReturnValues()['returnValues']->categoryID]),
+               ]);
+       }
 }
index 445878a4008cc7ab808c88dcb642a36cfeb481ce..bf9598ed8edc0691f67d3803e86b3ee6665ceb24 100644 (file)
@@ -15,6 +15,7 @@ use wcf\system\file\upload\UploadHandler;
 use wcf\system\image\ImageHandler;
 use wcf\system\language\I18nHandler;
 use wcf\system\Regex;
+use wcf\system\request\LinkHandler;
 use wcf\system\style\exception\FontDownloadFailed;
 use wcf\system\style\FontManager;
 use wcf\system\WCF;
@@ -805,7 +806,10 @@ class StyleAddForm extends AbstractForm {
                // reload variables
                $this->readStyleVariables();
                
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('StyleEdit', ['id' => $style->styleID]),
+               ]);
        }
        
        /**
index 212fcb4316f515ab407b788d7b41c0469a46e773..d715438852786c30d5eabddc64545dca1bfc3e54 100644 (file)
@@ -6,6 +6,7 @@ use wcf\data\tag\TagEditor;
 use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\LanguageFactory;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\ArrayUtil;
 use wcf\util\StringUtil;
@@ -179,7 +180,10 @@ class TagAddForm extends AbstractForm {
                $this->synonyms = [];
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('TagEdit', ['id' => $returnValues['returnValues']->tagID]),
+               ]);
        }
        
        /**
index 0e1c12ed6cd1180129294c9d90f115bd8a1baadc..199e4108c10c2d823956d802f98bdd72a8fa1755 100644 (file)
@@ -9,6 +9,7 @@ use wcf\form\AbstractForm;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\IllegalLinkException;
 use wcf\system\exception\UserInputException;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -196,7 +197,7 @@ class TemplateAddForm extends AbstractForm {
                        'packageID' => $this->packageID,
                        'templateGroupID' => $this->templateGroupID
                ]), 'source' => $this->templateSource]);
-               $this->objectAction->executeAction();
+               $returnValues = $this->objectAction->executeAction();
                $this->saved();
                
                // reset values
@@ -204,7 +205,10 @@ class TemplateAddForm extends AbstractForm {
                $this->templateGroupID = 0;
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('TemplateEdit', ['id' => $returnValues['returnValues']->templateID]),
+               ]);
        }
        
        /**
index 761428def49587b3fa9b6503b3841243c599bd3c..d77b4611202297bc8583ffd8508c3c15ca9ae677 100644 (file)
@@ -4,6 +4,7 @@ use wcf\data\template\group\TemplateGroup;
 use wcf\data\template\group\TemplateGroupAction;
 use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\FileUtil;
 use wcf\util\StringUtil;
@@ -132,7 +133,7 @@ class TemplateGroupAddForm extends AbstractForm {
                        'templateGroupFolderName' => $this->templateGroupFolderName,
                        'parentTemplateGroupID' => $this->parentTemplateGroupID ?: null
                ])]);
-               $this->objectAction->executeAction();
+               $returnValues = $this->objectAction->executeAction();
                $this->saved();
                
                // reset values
@@ -140,7 +141,10 @@ class TemplateGroupAddForm extends AbstractForm {
                $this->parentTemplateGroupID = 0;
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('TemplateGroupEdit', ['id' => $returnValues['returnValues']->templateGroupID]),
+               ]);
        }
        
        /**
index 4dd41d99651c562c13dd5fc01086c32963620f01..79ccc7bdf0949a56f348a61a49e5be187afa2fa7 100644 (file)
@@ -9,6 +9,7 @@ use wcf\data\trophy\TrophyEditor;
 use wcf\system\condition\ConditionHandler;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nValue;
+use wcf\system\request\LinkHandler;
 use wcf\system\trophy\condition\TrophyConditionHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
@@ -308,9 +309,9 @@ class TrophyAddForm extends AbstractAcpForm {
                        ]),
                        'tmpHash' => $this->tmpHash
                ]);
-               $this->objectAction->executeAction();
+               $returnValues = $this->objectAction->executeAction();
                
-               $this->saveI18n($this->objectAction->getReturnValues()['returnValues'], TrophyEditor::class);
+               $this->saveI18n($returnValues['returnValues'], TrophyEditor::class);
                
                // transform conditions array into one-dimensional array
                $conditions = [];
@@ -325,9 +326,13 @@ class TrophyAddForm extends AbstractAcpForm {
                        }
                }
                
-               ConditionHandler::getInstance()->createConditions($this->objectAction->getReturnValues()['returnValues']->trophyID, $conditions);
+               ConditionHandler::getInstance()->createConditions($returnValues['returnValues']->trophyID, $conditions);
                
                $this->reset();
+               
+               WCF::getTPL()->assign([
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('TrophyEdit', ['id' => $returnValues['returnValues']->trophyID]),
+               ]);
        }
        
        /**
index 56a3e7d453033cdd618c12acc0036b4dd33e1911..64bb45b9f444c91db03a08f60e246a348f1f1c1b 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 namespace wcf\acp\form;
+use wcf\system\request\LinkHandler;
+use wcf\system\WCF;
 
 /**
  * Represents the trophy category add form.
@@ -30,4 +32,15 @@ class TrophyCategoryAddForm extends AbstractCategoryAddForm {
         * @inheritDoc
         */
        public $neededPermissions = ['admin.trophy.canManageTrophy'];
+       
+       /**
+        * @inheritDoc
+        */
+       public function save() {
+               parent::save();
+               
+               WCF::getTPL()->assign([
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('TrophyCategoryEdit', ['id' => $this->objectAction->getReturnValues()['returnValues']->categoryID]),
+               ]);
+       }
 }
index 696f4e759dda094add24a77c5ae56e811b5cb015..e79572a647562be64cb2ab06f4c6cbbb452b8d1e 100644 (file)
@@ -8,6 +8,7 @@ use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\UserInputException;
 use wcf\system\html\input\HtmlInputProcessor;
 use wcf\system\language\LanguageFactory;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\ArrayUtil;
 use wcf\util\StringUtil;
@@ -269,12 +270,13 @@ class UserAddForm extends UserOptionListForm {
                }
                
                $this->objectAction = new UserAction([], 'create', $data);
-               $this->objectAction->executeAction();
+               $returnValues = $this->objectAction->executeAction();
                $this->saved();
                
                // show empty add form
                WCF::getTPL()->assign([
-                       'success' => true
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('UserEdit', ['id' => $returnValues['returnValues']->userID]),
                ]);
                
                // reset values
index a2e74ecdb78657b4c3c11aff54432ad3ae7c2a1a..9bf9c8c63f5644d1b500711c9569d6132305140e 100755 (executable)
@@ -5,6 +5,7 @@ use wcf\data\user\group\UserGroupEditor;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\option\user\group\UserGroupOptionHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\system\WCFACP;
 use wcf\util\StringUtil;
@@ -188,7 +189,10 @@ class UserGroupAddForm extends AbstractOptionListForm {
                $this->saved();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('UserGroupEdit', ['id' => $groupID]),
+               ]);
                
                // reset values
                $this->groupName = '';
index 35436f059bd689dabcc33fb13afcf182594dd3e6..23a3aff77e0c9060e95147d1460a9112fc6e7280 100644 (file)
@@ -6,6 +6,7 @@ use wcf\data\user\group\UserGroup;
 use wcf\form\AbstractForm;
 use wcf\system\condition\ConditionHandler;
 use wcf\system\exception\UserInputException;
+use wcf\system\request\LinkHandler;
 use wcf\system\user\group\assignment\UserGroupAssignmentHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
@@ -150,7 +151,10 @@ class UserGroupAssignmentAddForm extends AbstractForm {
                        }
                }
                
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('UserGroupAssignmentEdit', ['id' => $returnValues['returnValues']->assignmentID]),
+               ]);
        }
        
        /**
index 0acc822adeaad2f612514c50f160f98ec678d94f..d99c1bce2729cfdf7c26533e11f1345fd14a24b1 100644 (file)
@@ -8,6 +8,7 @@ use wcf\data\user\option\UserOptionEditor;
 use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -331,7 +332,10 @@ class UserOptionAddForm extends AbstractForm {
                I18nHandler::getInstance()->reset();
                
                // show success
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('UserOptionEdit', ['id' => $userOption->optionID]),
+               ]);
        }
        
        /**
index d8d081ff99d7f64e8992852061ff7f2498530fc9..460833339f33c243749947668190564e4fb77bc7 100644 (file)
@@ -5,6 +5,7 @@ use wcf\data\user\option\category\UserOptionCategoryEditor;
 use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 
 /**
@@ -101,7 +102,10 @@ class UserOptionCategoryAddForm extends AbstractForm {
                I18nHandler::getInstance()->reset();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('UserOptionCategoryEdit', ['id' => $categoryID]),
+               ]);
        }
        
        /**
index 2ff6548ee6377860c7b05562b908600fc0cd71b6..86c95f9ada1d7af2abc8a9b7d5f3587b034a2fad 100644 (file)
@@ -8,6 +8,7 @@ use wcf\form\AbstractForm;
 use wcf\system\exception\UserInputException;
 use wcf\system\language\I18nHandler;
 use wcf\system\Regex;
+use wcf\system\request\LinkHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
 
@@ -201,11 +202,10 @@ class UserRankAddForm extends AbstractForm {
                        'requiredGender' => $this->requiredGender,
                        'hideTitle' => ($this->hideTitle ? 1 : 0)
                ])]);
-               $this->objectAction->executeAction();
+               $returnValues = $this->objectAction->executeAction();
+               $rankID = $returnValues['returnValues']->rankID;
                
                if (!I18nHandler::getInstance()->isPlainValue('rankTitle')) {
-                       $returnValues = $this->objectAction->getReturnValues();
-                       $rankID = $returnValues['returnValues']->rankID;
                        I18nHandler::getInstance()->save('rankTitle', 'wcf.user.rank.userRank'.$rankID, 'wcf.user', 1);
                        
                        // update name
@@ -224,7 +224,10 @@ class UserRankAddForm extends AbstractForm {
                I18nHandler::getInstance()->reset();
                
                // show success message
-               WCF::getTPL()->assign('success', true);
+               WCF::getTPL()->assign([
+                       'success' => true,
+                       'objectEditLink' => LinkHandler::getInstance()->getLink('UserRankEdit', ['id' => $rankID]),
+               ]);
        }
        
        /**
index 49e8f6802789eb6b3d06f5a7c96bcf5ace2c6d72..5281103583165a49cbbb9b481fba4c68f4f32970 100644 (file)
@@ -58,6 +58,20 @@ abstract class AbstractFormBuilderForm extends AbstractForm {
         */
        public $objectActionClass;
        
+       /**
+        * name of the controller for the link to the edit form
+        * @var string
+        * @since 5.3
+        */
+       public $objectEditLinkController = '';
+       
+       /**
+        * name of the application for the link to the edit form
+        * @var string
+        * @since 5.3
+        */
+       public $objectEditLinkApplication = 'wcf';
+       
        /**
         * @inheritDoc
         */
@@ -166,6 +180,13 @@ abstract class AbstractFormBuilderForm extends AbstractForm {
                $this->saved();
                
                WCF::getTPL()->assign('success', true);
+               
+               if ($this->formAction === 'create' && $this->objectEditLinkController) {
+                       WCF::getTPL()->assign('objectEditLink', LinkHandler::getInstance()->getLink($this->objectEditLinkController, [
+                               'application' => $this->objectEditLinkApplication,
+                               'id' => $this->objectAction->getReturnValues()['returnValues']->getObjectID(),
+                       ]));
+               }
        }
        
        /**
index 72bbf710c0fcd7ae9a244fd8dfcb146de00b7dfd..17e945e86c3883f29023e936d693a2c7bfe7fc2e 100644 (file)
@@ -3873,6 +3873,7 @@ Dateianhänge:
                <item name="wcf.global.filter.visibility.showAll"><![CDATA[Alles anzeigen]]></item>
                <item name="wcf.global.success"><![CDATA[Die Aktion wurde erfolgreich ausgeführt.]]></item>
                <item name="wcf.global.success.add"><![CDATA[Der Eintrag wurde gespeichert.]]></item>
+               <item name="wcf.global.success.add.button.editCreatedObject"><![CDATA[Erstellten Eintrag bearbeiten]]></item>
                <item name="wcf.global.success.edit"><![CDATA[Die Änderungen wurden gespeichert.]]></item>
                <item name="wcf.global.language.noSelection"><![CDATA[Keine Auswahl]]></item>
                <item name="wcf.global.loading"><![CDATA[Lädt …]]></item>
index 304620bfce02442bdfe554eadb4837aa3adce6fb..25ad5b148aea0da2d0b193c2b1a4039c2c061772 100644 (file)
@@ -3818,6 +3818,7 @@ Attachments:
                <item name="wcf.global.filter.visibility.showAll"><![CDATA[Show all]]></item>
                <item name="wcf.global.success"><![CDATA[The action completed successfully.]]></item>
                <item name="wcf.global.success.add"><![CDATA[The entry has been saved.]]></item>
+               <item name="wcf.global.success.add.button.editCreatedObject"><![CDATA[Edit Created Entry]]></item>
                <item name="wcf.global.success.edit"><![CDATA[Your changes have been saved.]]></item>
                <item name="wcf.global.language.noSelection"><![CDATA[No Selection]]></item>
                <item name="wcf.global.loading"><![CDATA[Loading …]]></item>