Skip to content

Commit

Permalink
Merge pull request #2072 from LuckyCyborg/4.0
Browse files Browse the repository at this point in the history
[4.0] Overall improvements
  • Loading branch information
LuckyCyborg authored Apr 30, 2018
2 parents 722a92d + cc679ea commit d96b30a
Show file tree
Hide file tree
Showing 25 changed files with 107 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Platform/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Define The Application Version
//--------------------------------------------------------------------------

define('VERSION', '4.0.56');
define('VERSION', '4.0.57');

//--------------------------------------------------------------------------
// Set PHP Error Reporting Options
Expand Down
1 change: 1 addition & 0 deletions modules/Contacts/Controllers/Admin/FieldGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public function update(Request $request, $contactId, $id)
$group->content = $input['content'];
$group->order = $input['order'];

//
$group->updated_by = Auth::id();

$group->save();
Expand Down
10 changes: 10 additions & 0 deletions modules/Contacts/Controllers/Admin/FieldItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,13 @@ public function store(Request $request, $id)
'rules' => $input['field_rules'],
'options' => $options,

'visible' => $request->has('visible') ? 1 : 0,

// Resolve the fieldGroup relationship.
'field_group_id' => $group->id,

//
'created_by' => Auth::id(),
));

// Invalidate the cached information.
Expand Down Expand Up @@ -413,8 +418,13 @@ public function update(Request $request, $groupId, $id)
$item->order = $input['field_order'];
$item->rules = $input['field_rules'];

$item->visible = $request->has('visible') ? 1 : 0;

$item->options = $options;

//
$item->updated_by = Auth::id();

$item->save();

// Invalidate the cached information.
Expand Down
4 changes: 3 additions & 1 deletion modules/Contacts/Controllers/Admin/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ public function index($id)
return Redirect::back()->with('danger', __d('contacts', 'Contact not found: #{0}', $id));
}

$fields = $contact->fieldItems->where('visible', 1)->lists('title', 'name');

$messages = $contact->messages()->orderBy('created_at', 'DESC')->paginate(15);

return $this->createView()
->shares('title', __d('contacts', 'Messages received by : {0}', $contact->name))
->with(compact('contact', 'messages'))
->with(compact('contact', 'fields', 'messages'))
->with('search', '')
->with('searching', false);
}
Expand Down
2 changes: 2 additions & 0 deletions modules/Contacts/Controllers/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ protected function validator(Contact $contact, Request $request)
// Add the custom Validation Rule commands.
$validator->addExtension('recaptcha', function($attribute, $value, $parameters) use ($request)
{
if (Auth::check()) return true;

return ReCaptcha::check($value, $request->ip());
});

Expand Down
8 changes: 8 additions & 0 deletions modules/Contacts/Database/Seeds/FieldItemsTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public function run()
'default' => '',
),

'visibble' => 1,

'field_group_id' => 1,
'created_by' => 1,
));
Expand All @@ -54,6 +56,8 @@ public function run()
'default' => '',
),

'visibble' => 1,

'field_group_id' => 1,
'created_by' => 1,
));
Expand All @@ -71,6 +75,8 @@ public function run()
'default' => '',
),

'visibble' => 0,

'field_group_id' => 1,
'created_by' => 1,
));
Expand All @@ -88,6 +94,8 @@ public function run()
'rows' => 10,
),

'visibble' => 1,

'field_group_id' => 1,
'created_by' => 1,
));
Expand Down
4 changes: 4 additions & 0 deletions modules/Contacts/Language/CS/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/DA/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/DE/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/EN/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/ES/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/FA/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/FR/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/IT/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/JA/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/NL/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/PL/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
4 changes: 4 additions & 0 deletions modules/Contacts/Language/RO/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
'Messages received by : {0}' => '',
'Name' => '',
'New message received via {0}' => '',
'No' => '',
'No Field Groups' => '',
'No Messages' => '',
'No description' => '',
Expand Down Expand Up @@ -109,6 +110,7 @@
'Show Field Item' => '',
'Show Message' => '',
'Show Role' => '',
'Show in lists' => '',
'Show the Details' => '',
'Show this Attachment' => '',
'Site Path' => '',
Expand Down Expand Up @@ -146,5 +148,7 @@
'View the Messages received by this Contact' => '',
'View this Contact' => '',
'View this Message' => '',
'Visible' => '',
'Yes' => '',
'Your message was successfully sent.' => '',
);
Loading

0 comments on commit d96b30a

Please sign in to comment.