Resolve redirect problem in schedule import

This commit is contained in:
msquare 2019-12-08 12:56:36 +01:00
parent 2a18f6758b
commit d70d7c6436
5 changed files with 7 additions and 7 deletions

View File

@ -32,11 +32,11 @@ $route->addGroup(
function (RouteCollector $route) { function (RouteCollector $route) {
// Schedule // Schedule
$route->addGroup( $route->addGroup(
'/schedule', '-schedule',
function (RouteCollector $route) { function (RouteCollector $route) {
$route->get('', 'Admin\\Schedule\\ImportSchedule@index'); $route->get('', 'Admin\\Schedule\\ImportSchedule@index');
$route->post('/load', 'Admin\\Schedule\\ImportSchedule@loadSchedule'); $route->post('-load', 'Admin\\Schedule\\ImportSchedule@loadSchedule');
$route->post('/import', 'Admin\\Schedule\\ImportSchedule@importSchedule'); $route->post('-import', 'Admin\\Schedule\\ImportSchedule@importSchedule');
} }
); );
} }

View File

@ -48,7 +48,7 @@ class ImportSchedule extends BaseController
protected $session; protected $session;
/** @var string */ /** @var string */
protected $url = '/admin/schedule'; protected $url = 'admin-schedule';
/** @var GuzzleClient */ /** @var GuzzleClient */
protected $guzzle; protected $guzzle;

View File

@ -117,7 +117,7 @@ function make_navigation()
'admin_shifts' => 'Create shifts', 'admin_shifts' => 'Create shifts',
'admin_rooms' => 'Rooms', 'admin_rooms' => 'Rooms',
'admin_groups' => 'Grouprights', 'admin_groups' => 'Grouprights',
'admin/schedule' => ['schedule.import', 'schedule.import'], 'admin-schedule' => ['schedule.import', 'schedule.import'],
'admin_log' => 'Log', 'admin_log' => 'Log',
'admin_event_config' => 'Event config', 'admin_event_config' => 'Event config',
]; ];

View File

@ -17,7 +17,7 @@
<div class="row"> <div class="row">
{% block row_content %} {% block row_content %}
<form method="POST" action="{{ url('/admin/schedule/load') }}"> <form method="POST" action="{{ url('/admin-schedule-load') }}">
{{ csrf() }} {{ csrf() }}
<div class="col-md-12"> <div class="col-md-12">

View File

@ -4,7 +4,7 @@
{% block title %}{{ __('schedule.import.load.title') }}{% endblock %} {% block title %}{{ __('schedule.import.load.title') }}{% endblock %}
{% block row_content %} {% block row_content %}
<form method="POST" action="{{ url('/admin/schedule/import') }}"> <form method="POST" action="{{ url('/admin-schedule-import') }}">
{{ csrf() }} {{ csrf() }}
{{ f.hidden('schedule-url', schedule_url) }} {{ f.hidden('schedule-url', schedule_url) }}
{{ f.hidden('shift-type', shift_type) }} {{ f.hidden('shift-type', shift_type) }}