Commit cd096561 authored by Tino Goratsch's avatar Tino Goratsch

When inside the administration and creating/edition a resultset, you can now...

When inside the administration and creating/edition a resultset, you can now choose between save and close and save and continue
parent deaead4a
......@@ -132,7 +132,8 @@ class ControllerActionDispatcher
private function getCallable(ActionInterface $controller)
{
$callable = [$controller, 'execute'];
if ($this->request->getPost()->has('submit') && method_exists($controller, 'executePost')) {
if (($this->request->getPost()->has('submit') || $this->request->getPost()->has('continue'))
&& method_exists($controller, 'executePost')) {
$reflection = new \ReflectionMethod($controller, 'executePost');
if ($reflection->isPublic()) {
......
......@@ -90,7 +90,7 @@ class Action
{
$errors = $this->alerts->errorBox($exception->getMessage());
if ($this->request->isXmlHttpRequest()) {
return new Response($errors, 400);
return new Response($errors, Response::HTTP_BAD_REQUEST);
}
return ['error_msg' => $errors];
......@@ -222,7 +222,7 @@ class Action
return $this->redirectMessages->setMessage(
$result,
$this->translator->t('system', $phrase . ($result !== false ? '_success' : '_error')),
$path
$this->request->getPost()->has('continue') ? $this->request->getPathInfo() : $path
);
}
......
......@@ -21,7 +21,7 @@
{event name="seo.layout.render_form_fields" uri_pattern=$SEO_URI_PATTERN path=$SEO_ROUTE_NAME}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/articles"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/articles"}}
{javascripts}
{include_js module="articles" file="admin/index.create"}
{/javascripts}
......
......@@ -3,5 +3,5 @@
{block CONTENT_AJAX_FORM}
{include file="asset:System/Partials/form_group.select.tpl" options=$captchas required=true label={lang t="captcha|captcha_type"}}
{event name="captcha.admin_settings.custom_fields" form=$form}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/captcha"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/captcha"}}
{/block}
......@@ -19,5 +19,5 @@
</div>
</div>
{/block}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/categories"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/categories"}}
{/block}
......@@ -4,5 +4,5 @@
{include file="asset:System/Partials/form_group.input_number.tpl" name="width" value=$form.width required=true label={lang t="categories|image_width"} input_group_after={lang t="system|pixel"}}
{include file="asset:System/Partials/form_group.input_number.tpl" name="height" value=$form.height required=true label={lang t="categories|image_height"} input_group_after={lang t="system|pixel"}}
{include file="asset:System/Partials/form_group.input_number.tpl" name="filesize" value=$form.filesize required=true label={lang t="categories|image_filesize"} input_group_after={lang t="system|byte"}}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/categories"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/categories"}}
{/block}
......@@ -16,5 +16,5 @@
<textarea class="form-control" name="message" id="message" cols="50" rows="5" required>{$form.message}</textarea>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/comments/details/index/id_`$module_id`"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/comments/details/index/id_`$module_id`"}}
{/block}
......@@ -5,5 +5,5 @@
{if isset($allow_emoticons)}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$allow_emoticons required=true label={lang t="comments|allow_emoticons"}}
{/if}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/comments"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/comments"}}
{/block}
......@@ -22,5 +22,5 @@
</div>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/contact"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/contact"}}
{/block}
......@@ -8,5 +8,5 @@
{block EMOTICONS_PICTURE_UPLOAD}
{include file="asset:System/Partials/form_group.input_file.tpl" name="picture" required=true label={lang t="emoticons|picture"}}
{/block}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/emoticons"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/emoticons"}}
{/block}
......@@ -4,5 +4,5 @@
{include file="asset:System/Partials/form_group.input_number.tpl" name="width" value=$form.width required=true label={lang t="emoticons|image_width"} input_group_after={lang t="system|pixel"}}
{include file="asset:System/Partials/form_group.input_number.tpl" name="height" value=$form.height required=true label={lang t="emoticons|image_height"} input_group_after={lang t="system|pixel"}}
{include file="asset:System/Partials/form_group.input_number.tpl" name="filesize" value=$form.filesize required=true label={lang t="emoticons|image_filesize"} input_group_after={lang t="system|byte"}}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/emoticons"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/emoticons"}}
{/block}
......@@ -3,5 +3,5 @@
{block CONTENT_AJAX_FORM}
{include file="asset:System/Partials/form_group.input_text.tpl" name="feed_image" value=$form.feed_image maxlength=120 label={lang t="feeds|feed_image"}}
{include file="asset:System/Partials/form_group.select.tpl" options=$feed_types required=true label={lang t="feeds|feed_type"}}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/feeds"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/feeds"}}
{/block}
......@@ -60,7 +60,7 @@
{event name="seo.layout.render_form_fields" uri_pattern=$SEO_URI_PATTERN path=$SEO_ROUTE_NAME}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/files"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/files"}}
{javascripts}
{include_js module="files" file="admin/index.create"}
{/javascripts}
......
......@@ -7,5 +7,5 @@
{if isset($comments)}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$comments required=true label={lang t="system|allow_comments"}}
{/if}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/files"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/files"}}
{/block}
......@@ -13,5 +13,5 @@
{event name="seo.layout.render_form_fields" uri_pattern=$SEO_URI_PATTERN path=$SEO_ROUTE_NAME}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/gallery"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/gallery"}}
{/block}
......@@ -25,7 +25,7 @@
</div>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/gallery"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/gallery"}}
{javascripts}
{include_js module="gallery" file="admin/index.settings"}
{/javascripts}
......
......@@ -10,5 +10,5 @@
{if isset($options)}
{include file="asset:System/Partials/form_group.checkbox.tpl" options=$options label={lang t="system|options"}}
{/if}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/gallery/index/edit/id_`$gallery_id`"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/gallery/index/edit/id_`$gallery_id`"}}
{/block}
......@@ -10,5 +10,5 @@
{if !empty($activate)}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$activate required=true label={lang t="guestbook|activate_entry"}}
{/if}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/guestbook"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/guestbook"}}
{/block}
......@@ -11,7 +11,7 @@
{if isset($newsletter_integration)}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$newsletter_integration required=true label={lang t="guestbook|newsletter_integration"}}
{/if}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/guestbook"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/guestbook"}}
{javascripts}
{include_js module="guestbook" file="admin/index.settings"}
{/javascripts}
......
......@@ -3,5 +3,5 @@
{block CONTENT_AJAX_FORM}
{include file="asset:System/Partials/form_group.input_text.tpl" name="title" value=$form.title required=true maxlength=120 label={lang t="menus|menu_bar_title"}}
{include file="asset:System/Partials/form_group.input_text.tpl" name="index_name" value=$form.index_name required=true maxlength=20 label={lang t="menus|index_name"}}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/menus"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/menus"}}
{/block}
......@@ -75,7 +75,7 @@
</div>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/menus"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/menus"}}
{javascripts}
{include_js module="menus" file="admin/items.create"}
{include_js module="menus" file="manage-menu-item"}
......
......@@ -36,7 +36,7 @@
{event name="seo.layout.render_form_fields" uri_pattern=$SEO_URI_PATTERN path=$SEO_ROUTE_NAME}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/news"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/news"}}
{javascripts}
{include_js module="articles" file="admin/index.create"}
{/javascripts}
......
......@@ -9,7 +9,7 @@
{if isset($allow_comments)}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$allow_comments required=true label={lang t="system|allow_comments"}}
{/if}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/news"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/news"}}
{javascripts}
{include_js module="news" file="admin/index.settings"}
{/javascripts}
......
......@@ -9,5 +9,5 @@
{include file="asset:System/Partials/form_group.textarea.tpl" name="text" value=$form.text required=true label={lang t="newsletter|text"}}
{/if}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$test required=true label={lang t="newsletter|test_newsletter"} help={lang t="newsletter|test_newsletter_description"}}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/newsletter"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/newsletter"}}
{/block}
......@@ -4,5 +4,5 @@
{include file="asset:System/Partials/form_group.input_email.tpl" name="mail" value=$form.mail required=true maxlength=120 label={lang t="system|email_address"}}
{include file="asset:System/Partials/form_group.wysiwyg.tpl" name="mailsig" value=$form.mailsig label={lang t="newsletter|mailsig"}}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$html required=true label={lang t="newsletter|send_html_emails"}}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/newsletter"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/newsletter"}}
{/block}
......@@ -56,5 +56,5 @@
</div>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/permissions"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/permissions"}}
{/block}
......@@ -28,5 +28,5 @@
</select>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/permissions/resources"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/permissions/resources"}}
{/block}
......@@ -52,7 +52,7 @@
</div>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/polls"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/polls"}}
</form>
{javascripts}
{include_js module="system" file="ajax-form"}
......
......@@ -3,5 +3,5 @@
{block CONTENT_AJAX_FORM}
{include file="asset:System/Partials/form_group.input_text.tpl" name="uri" value=$form.uri required=true maxlength=120 label={lang t="seo|uri"}}
{include file="asset:Seo/Partials/seo_fields.tpl" seo=$SEO_FORM_FIELDS disable_alias_suggest=true}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/seo"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/seo"}}
{/block}
......@@ -33,7 +33,7 @@
</div>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/seo"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/seo"}}
{javascripts}
{include_js module="seo" file="admin/index.settings"}
{/javascripts}
......
......@@ -195,6 +195,9 @@ input[placeholder],
textarea[placeholder] {
font-style: italic;
}
.btn-block.text-left {
text-align: left;
}
/* Pagination */
.pagination {
margin: 0 0 10px;
......
......@@ -39,6 +39,10 @@ textarea {
}
}
.btn-block.text-left {
text-align: left;
}
/* Pagination */
.pagination {
margin: 0 0 10px;
......
......@@ -91,7 +91,7 @@
</div>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token}
{javascripts}
{include_js module="system" file="admin/index.settings"}
{/javascripts}
......
{extends file="asset:System/Partials/form_group.base.tpl"}
{block FORM_GROUP_FORM_FIELD}
<button type="submit" name="submit" class="btn{if !empty($submit_btn_class)} {$submit_btn_class}{else} btn-primary{/if}">
{if !empty($submit_label)}
{$submit_label}
{else}
{lang t="system|submit"}
{/if}
</button>
{block FORM_GROUP_FORM_FIELD_SUBMIT}
<button type="submit" name="submit" class="btn{if !empty($submit_btn_class)} {$submit_btn_class}{else} btn-primary{/if}">
{if !empty($submit_label)}
{$submit_label}
{else}
{lang t="system|submit"}
{/if}
</button>
{/block}
{if !empty($back_url)}
<a href="{$back_url}" class="btn{if !empty($back_btn_class)} {$back_btn_class}{else} btn-default{/if}">
{if !empty($back_label)}
......
{extends file="asset:System/Partials/form_group.submit.tpl"}
{block FORM_GROUP_FORM_FIELD_SUBMIT}
<div class="btn-group">
<button type="submit"
name="submit"
class="btn{if !empty($submit_btn_class)} {$submit_btn_class}{else} btn-primary{/if}">
{lang t="system|save_and_close"}
</button>
<button type="button"
class="btn{if !empty($submit_btn_class)} {$submit_btn_class}{else} btn-primary{/if} dropdown-toggle"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">{lang t="system|toggle_dropdown"}</span>
</button>
<ul class="dropdown-menu">
<li>
<button type="submit" name="continue" class="btn btn-link btn-block text-left">
{lang t="system|save_and_continue"}
</button>
</li>
</ul>
</div>
{/block}
{extends file="asset:`$LAYOUT`"}
{block CONTENT}
{block CONTENT_BEFORE_AJAX_FORM}{/block}
{block CONTENT_BEFORE_AJAX_FORM}
{redirect_message}
{/block}
{if !empty($error_msg)}
{$error_msg}
{else}
......
......@@ -259,6 +259,8 @@
<item key="refresh">Aktualisieren</item>
<item key="reset">Zurücksetzen</item>
<item key="result">Ergebnis</item>
<item key="save_and_close">Speichern und schließen</item>
<item key="save_and_continue">Speichern und weiter</item>
<item key="save_error">Beim Speichern des Eintrages ist ein Fehler aufgetreten.</item>
<item key="save_success">Der Eintrag wurde erfolgreich gespeichert.</item>
<item key="seconds">Sekunden</item>
......@@ -303,6 +305,7 @@
<item key="title_for_toc">Seitentitel für das Inhaltsverzeichnis</item>
<item key="title_to_short">Bitte geben Sie einen Seitentitel ein.</item>
<item key="toc_page">Seite %page%</item>
<item key="toggle_dropdown">Dropdown-Menü einblenden/ausblenden</item>
<item key="toggle_navigation">Navigation einblenden/ausblenden</item>
<item key="type_in_flood_barrier">Bitte geben Sie ein, für wie viele Sekunden ein Benutzer keine Beiträge abschicken kann.</item>
<item key="type_in_long_date_format">Bitte geben Sie die lange Datumsformatierung ein.</item>
......
......@@ -259,6 +259,8 @@
<item key="refresh">Refresh</item>
<item key="reset">Reset</item>
<item key="result">Result</item>
<item key="save_and_close">Save and close</item>
<item key="save_and_continue">Save and continue</item>
<item key="save_error">While saving the entry an error has occurred.</item>
<item key="save_success">The entry has been successfully saved.</item>
<item key="seconds">Seconds</item>
......@@ -303,11 +305,12 @@
<item key="title_for_toc">Title for table of contents</item>
<item key="title_to_short">Please type in a title.</item>
<item key="toc_page">Page %page%</item>
<item key="toggle_navigation">Toggle Navigation</item>
<item key="toggle_dropdown">Toggle dropdown</item>
<item key="toggle_navigation">Toggle navigation</item>
<item key="type_in_flood_barrier">Please enter the number in seconds a user can not submit posts.</item>
<item key="type_in_long_date_format">Please type in the long date format.</item>
<item key="type_in_mailer_smtp_host">Please type in the hostname of the SMTP server.</item>
<item key="type_in_mailer_smtp_port">Please type in the portnumber of the SMTP server.</item>
<item key="type_in_mailer_smtp_port">Please type in the port number of the SMTP server.</item>
<item key="type_in_mailer_smtp_username">Please type in the username of the SMTP server.</item>
<item key="type_in_cache_lifetime">Please type in the page-cache lifetime.</item>
<item key="type_in_short_date_format">Please type in the short date format.</item>
......
......@@ -43,5 +43,5 @@
</div>
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/users"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/users"}}
{/block}
......@@ -3,5 +3,5 @@
{block CONTENT_AJAX_FORM}
{include file="asset:System/Partials/form_group.input_email.tpl" name="mail" value=$form.mail required=true maxlength=120 label={lang t="system|email_address"}}
{include file="asset:System/Partials/form_group.button_group.tpl" options=$registration required=true label={lang t="users|enable_registration"}}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/users"}}
{include file="asset:System/Partials/form_group.submit_split.tpl" form_token=$form_token back_url={uri args="acp/users"}}
{/block}
......@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Added the schema.org `BreadcrumbList` markup to the breadcrumb template file
- Added the possibility to add a separate page title via the SEO form fields
- Added the new Smarty function `site_subtitle` which exposes the site's subtitle to the frontend
- When inside the administration and creating/edition a resultset, you can now choose between `save and close` and `save and continue`
## [4.14.0] - 2017-10-22
### Changed
......
......@@ -84,6 +84,9 @@ input[placeholder],
textarea[placeholder] {
font-style: italic;
}
.btn-block.text-left {
text-align: left;
}
/* Pagination */
.pagination {
margin: 0 0 10px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment