Resolve redirect problem in schedule import

main
msquare 5 years ago
parent 2a18f6758b
commit d70d7c6436

@ -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');
} }
); );
} }

@ -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;

@ -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',
]; ];

@ -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">

@ -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) }}

Loading…
Cancel
Save