Google2Fa ready to upload
This commit is contained in:
parent
e3495be8b8
commit
73e38a006e
127 changed files with 2637 additions and 589 deletions
|
|
@ -24,6 +24,8 @@ class CMSBookingController extends Controller
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware(['admin', '2fa']);
|
||||
|
||||
$this->identifier_general_name = config('booking.identifier_general_name');
|
||||
$this->identifier_content_name = config('booking.identifier_content_name');
|
||||
$this->identifier_general = config('booking.identifier_general');
|
||||
|
|
@ -78,12 +80,11 @@ class CMSBookingController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if($data['action'] === 'addItem'){
|
||||
$general_name = CMSContent::findOrFail($id);
|
||||
$identifier_general = $this->identifier_general.$general_name->id;
|
||||
$create = [
|
||||
'name' => 'Abschnitt',
|
||||
'name' => '#empty#',
|
||||
'field' => 'full_text',
|
||||
'decimal' => 1,
|
||||
'identifier' => $identifier_general,
|
||||
|
|
@ -102,6 +103,8 @@ class CMSBookingController extends Controller
|
|||
foreach ($data['contents'] as $content_id => $item) {
|
||||
$content = CMSContent::findOrFail($content_id);
|
||||
$content->setObjectBy('page-break', (isset($item['page-break']) ? true : false));
|
||||
$content->setObjectBy('repeat-country', (isset($item['repeat-country']) ? true : false));
|
||||
$content->setObjectBy('repeat-airline', (isset($item['repeat-airline']) ? true : false));
|
||||
$content->name = $item['name'];
|
||||
$content->slug = null;
|
||||
$content->decimal = isset($item['in_pdf']) ? 1 : 0;
|
||||
|
|
@ -121,7 +124,13 @@ class CMSBookingController extends Controller
|
|||
public function deleteAll($id, $do){
|
||||
if($do === 'name'){
|
||||
$general_name = CMSContent::findOrFail($id);
|
||||
$find = CMSContent::findObjectsBy('general_id', $general_name->id);
|
||||
if(count($find)){
|
||||
\Session()->flash('alert-error', __('Vorlage kann nicht gelöscht werden, ist bei den Inhalten noch in Verwendung.'));
|
||||
return back();
|
||||
}
|
||||
$identifier_general = $this->identifier_general.$general_name->id;
|
||||
//check is use
|
||||
$contents = CMSContent::where('identifier', '=', $identifier_general)->get();
|
||||
foreach($contents as $con){
|
||||
$con->delete();
|
||||
|
|
@ -206,7 +215,7 @@ class CMSBookingController extends Controller
|
|||
|
||||
if($data['action'] === 'addItem' && isset($data['content_pos_id'])) {
|
||||
$create = [
|
||||
'name' => 'Abschnitt',
|
||||
'name' => '#empty#',
|
||||
'field' => 'full_text',
|
||||
'decimal' => 1,
|
||||
'integer' => $data['content_pos_id'],
|
||||
|
|
@ -220,8 +229,6 @@ class CMSBookingController extends Controller
|
|||
return redirect(route('cms_booking_content_detail', [$id]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($data['action'] === 'saveAll'){
|
||||
$i = 1;
|
||||
$last_content_id = null;
|
||||
|
|
@ -233,6 +240,8 @@ class CMSBookingController extends Controller
|
|||
}
|
||||
if ($item['identifier'] === $identifier_content) {
|
||||
$content->setObjectBy('page-break', (isset($item['page-break']) ? true : false));
|
||||
$content->setObjectBy('repeat-country', (isset($item['repeat-country']) ? true : false));
|
||||
$content->setObjectBy('repeat-airline', (isset($item['repeat-airline']) ? true : false));
|
||||
$content->name = $item['name'];
|
||||
$content->slug = null;
|
||||
$content->decimal = isset($item['in_pdf']) ? 1 : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue