Compare commits
94 Commits
v5.0.0-bet
...
v5.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0e9875a50 | ||
|
|
7314bc4c4e | ||
|
|
ba70e07637 | ||
|
|
83dfa2a28c | ||
|
|
471e0fd2fc | ||
|
|
4bd140c324 | ||
|
|
0e823a962b | ||
|
|
002ca52c83 | ||
|
|
9793d75947 | ||
|
|
8331be05aa | ||
|
|
e8dfb71682 | ||
|
|
7de685a1c1 | ||
|
|
b508482441 | ||
|
|
30f8431bfb | ||
|
|
81548e581d | ||
|
|
a3e738b283 | ||
|
|
ed3afd1e2e | ||
|
|
74b96a7413 | ||
|
|
3ceff29e04 | ||
|
|
7736f12eb4 | ||
|
|
b1dda88c9d | ||
|
|
440ca686e4 | ||
|
|
4fd5358aa8 | ||
|
|
2855a9b2e8 | ||
|
|
e8befe9afd | ||
|
|
d5f8e93d7c | ||
|
|
303388e1f5 | ||
|
|
b9e19468e5 | ||
|
|
9601bf6edd | ||
|
|
3b6fb68ff1 | ||
|
|
bfd024fdfd | ||
|
|
4d6a8d48ee | ||
|
|
e464f0edf3 | ||
|
|
426897c902 | ||
|
|
cfd78fa870 | ||
|
|
501d5680ea | ||
|
|
291997c915 | ||
|
|
912401a0a0 | ||
|
|
ec5daa387b | ||
|
|
24a52eaeae | ||
|
|
e448b626e2 | ||
|
|
ac2403e8fc | ||
|
|
cf545f0ed1 | ||
|
|
52848ca8d8 | ||
|
|
a91e81fc42 | ||
|
|
e750b2b2da | ||
|
|
d3d64bd85c | ||
|
|
514e7ca072 | ||
|
|
0f22cf6807 | ||
|
|
2f435a57c1 | ||
|
|
f949a95cfb | ||
|
|
f3f7d714a6 | ||
|
|
b258f34bce | ||
|
|
3d4e1d4641 | ||
|
|
cb5104c27d | ||
|
|
5e3ccd1004 | ||
|
|
82e0b1ffd8 | ||
|
|
5b68a321a6 | ||
|
|
251ef82741 | ||
|
|
327583f055 | ||
|
|
acd15bc3e4 | ||
|
|
aabf9b6f9c | ||
|
|
10648de9af | ||
|
|
97743160ef | ||
|
|
1bea83ee5a | ||
|
|
d9e7a457d4 | ||
|
|
5f5b80acae | ||
|
|
ba06507e10 | ||
|
|
69d7000922 | ||
|
|
96abe54aad | ||
|
|
249b9b7509 | ||
|
|
25cb489b76 | ||
|
|
0eeeb24cae | ||
|
|
0503a51cae | ||
|
|
2e0f7921a8 | ||
|
|
c29ec6a100 | ||
|
|
a57ab29af6 | ||
|
|
b8ddbadd2b | ||
|
|
3e120812e3 | ||
|
|
d0124b900a | ||
|
|
3ea3e8b856 | ||
|
|
0ace7d16fb | ||
|
|
fb59405a87 | ||
|
|
3fcd83c499 | ||
|
|
9820bc6a58 | ||
|
|
ed79eacb9d | ||
|
|
408435057e | ||
|
|
7cab9f48e5 | ||
|
|
addb2bde23 | ||
|
|
a64e1be278 | ||
|
|
13216b8860 | ||
|
|
2a5cd58ad9 | ||
|
|
6a90ce523b | ||
|
|
e321aeabae |
@@ -120,7 +120,7 @@ class ImportLocations extends Command
|
||||
if (array_key_exists('Country', $row)) {
|
||||
$location->country = trim($row['Country']);
|
||||
}
|
||||
if (array_key_exists('Country', $row)) {
|
||||
if (array_key_exists('OU', $row)) {
|
||||
$location->ldap_ou = trim($row['OU']);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ use App\Http\Transformers\SelectlistTransformer;
|
||||
use App\Models\Company;
|
||||
use App\Models\Consumable;
|
||||
use App\Models\User;
|
||||
use App\Http\Transformers\ConsumablesTransformer;
|
||||
use App\Helpers\Helper;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ConsumablesController extends Controller
|
||||
{
|
||||
|
||||
@@ -6,13 +6,13 @@ use App\Http\Controllers\Controller;
|
||||
use App\Http\Transformers\LoginAttemptsTransformer;
|
||||
use App\Models\Setting;
|
||||
use App\Notifications\MailTest;
|
||||
use App\Notifications\SlackTest;
|
||||
use App\Services\LdapAd;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class SettingsController extends Controller
|
||||
{
|
||||
@@ -75,6 +75,7 @@ class SettingsController extends Controller
|
||||
// Get a sample of 10 users so user can verify the data is correct
|
||||
try {
|
||||
Log::info('Testing LDAP sync');
|
||||
error_reporting(E_ALL & ~E_DEPRECATED); // workaround for php7.4, which deprecates ldap_control_paged_result
|
||||
$users = $ldap->testUserImportSync();
|
||||
$message['user_sync'] = [
|
||||
'users' => $users
|
||||
@@ -90,24 +91,33 @@ class SettingsController extends Controller
|
||||
return response()->json($message, 200);
|
||||
}
|
||||
|
||||
public function slacktest()
|
||||
public function slacktest(Request $request)
|
||||
{
|
||||
|
||||
if ($settings = Setting::getSettings()->slack_channel=='') {
|
||||
\Log::debug('Slack is not enabled. Cannot test.');
|
||||
return response()->json(['message' => 'Slack is not enabled, cannot test.'], 400);
|
||||
}
|
||||
$slack = new Client([
|
||||
'base_url' => e($request->input('slack_endpoint')),
|
||||
'defaults' => [
|
||||
'exceptions' => false
|
||||
]
|
||||
]);
|
||||
|
||||
\Log::debug('Preparing to test slack connection');
|
||||
|
||||
$payload = json_encode(
|
||||
[
|
||||
'channel' => e($request->input('slack_channel')),
|
||||
'text' => trans('general.slack_test_msg'),
|
||||
'username' => e($request->input('slack_botname')),
|
||||
'icon_emoji' => ':heart:'
|
||||
]);
|
||||
|
||||
try {
|
||||
Notification::send($settings = Setting::getSettings(), new SlackTest());
|
||||
$slack->post($request->input('slack_endpoint'),['body' => $payload]);
|
||||
return response()->json(['message' => 'Success'], 200);
|
||||
} catch (\Exception $e) {
|
||||
\Log::debug('Slack connection failed');
|
||||
return response()->json(['message' => $e->getMessage()], 400);
|
||||
return response()->json(['message' => 'Oops! Please check the channel name and webhook endpoint URL. Slack responded with: '.$e->getMessage()], 400);
|
||||
}
|
||||
|
||||
return response()->json(['message' => 'Something went wrong :( '], 400);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -565,7 +565,7 @@ class AssetsController extends Controller
|
||||
if (!ini_get("auto_detect_line_endings")) {
|
||||
ini_set("auto_detect_line_endings", '1');
|
||||
}
|
||||
$csv = Reader::createFromPath(Input::file('user_import_csv'));
|
||||
$csv = Reader::createFromPath($request->file('user_import_csv'));
|
||||
$csv->setHeaderOffset(0);
|
||||
$results = $csv->getRecords();
|
||||
$item = array();
|
||||
|
||||
@@ -186,7 +186,7 @@ class SettingsController extends Controller
|
||||
Auth::login($user, true);
|
||||
$settings->save();
|
||||
|
||||
if ('1' == Input::get('email_creds')) {
|
||||
if ($request->input('email_creds') == '1') {
|
||||
$data = [];
|
||||
$data['email'] = $user->email;
|
||||
$data['username'] = $user->username;
|
||||
@@ -347,7 +347,7 @@ class SettingsController extends Controller
|
||||
|
||||
$setting->depreciation_method = $request->input('depreciation_method');
|
||||
|
||||
if ('' != Input::get('per_page')) {
|
||||
if ($request->input('per_page') != '') {
|
||||
$setting->per_page = $request->input('per_page');
|
||||
} else {
|
||||
$setting->per_page = 200;
|
||||
@@ -1146,10 +1146,10 @@ class SettingsController extends Controller
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function postPurge()
|
||||
public function postPurge(Request $request)
|
||||
{
|
||||
if (! config('app.lock_passwords')) {
|
||||
if ('DELETE' == Input::get('confirm_purge')) {
|
||||
if ('DELETE' == $request->input('confirm_purge')) {
|
||||
// Run a backup immediately before processing
|
||||
Artisan::call('backup:run');
|
||||
Artisan::call('snipeit:purge', ['--force' => 'true', '--no-interaction' => true]);
|
||||
|
||||
@@ -42,7 +42,8 @@ class BulkUsersController extends Controller
|
||||
->with('groups', Group::pluck('name', 'id'));
|
||||
|
||||
} elseif ($request->input('bulk_actions') == 'delete') {
|
||||
return view('users/confirm-bulk-delete', compact('users', Helper::statusLabelList()));
|
||||
return view('users/confirm-bulk-delete')->with('users', $users)->with('statuslabel_list', Helper::statusLabelList());
|
||||
|
||||
|
||||
} elseif ($request->input('bulk_actions') == 'bulkpasswordreset') {
|
||||
foreach ($users as $user) {
|
||||
|
||||
@@ -28,6 +28,7 @@ class CategoriesTransformer
|
||||
'name' => e($category->name),
|
||||
'image' => ($category->image) ? Storage::disk('public')->url('categories/'.e($category->image)) : null,
|
||||
'category_type' => ucwords(e($category->category_type)),
|
||||
'has_eula' => ($category->getEula() ? true : false),
|
||||
'eula' => ($category->getEula()),
|
||||
'checkin_email' => ($category->checkin_email =='1'),
|
||||
'require_acceptance' => ($category->require_acceptance == '1'),
|
||||
|
||||
@@ -36,6 +36,7 @@ class LicensesTransformer
|
||||
'free_seats_count' => (int) $license->free_seats_count,
|
||||
'license_name' => e($license->license_name),
|
||||
'license_email' => e($license->license_email),
|
||||
'reassignable' => ($license->reassignable == 1) ? true : false,
|
||||
'maintained' => ($license->maintained == 1) ? true : false,
|
||||
'supplier' => ($license->supplier) ? ['id' => (int) $license->supplier->id,'name'=> e($license->supplier->name)] : null,
|
||||
'category' => ($license->category) ? ['id' => (int) $license->category->id,'name'=> e($license->category->name)] : null,
|
||||
|
||||
@@ -57,22 +57,32 @@ class CheckoutableListener
|
||||
* Notify the user about the checked in checkoutable
|
||||
*/
|
||||
public function onCheckedIn($event) {
|
||||
|
||||
\Log::debug('checkin fired');
|
||||
|
||||
/**
|
||||
* When the item wasn't checked out to a user, we can't send notifications
|
||||
*/
|
||||
if(!$event->checkedOutTo instanceof User) {
|
||||
\Log::debug('checked out to not a user');
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the appropriate notification
|
||||
*/
|
||||
|
||||
|
||||
\Log::debug('checked out to a user');
|
||||
if(!$event->checkedOutTo->locale){
|
||||
\Log::debug('Use default settings locale');
|
||||
Notification::locale(Setting::getSettings()->locale)->send(
|
||||
$this->getNotifiables($event),
|
||||
$this->getCheckinNotification($event)
|
||||
);
|
||||
} else {
|
||||
\Log::debug('Use user locale? I do not think this works as expected yet');
|
||||
// \Log::debug(print_r($this->getNotifiables($event), true));
|
||||
Notification::send(
|
||||
$this->getNotifiables($event),
|
||||
$this->getCheckinNotification($event)
|
||||
@@ -130,7 +140,9 @@ class CheckoutableListener
|
||||
*/
|
||||
private function getCheckinNotification($event) {
|
||||
|
||||
$model = get_class($event->checkoutable);
|
||||
// $model = get_class($event->checkoutable);
|
||||
|
||||
|
||||
|
||||
$notificationClass = null;
|
||||
|
||||
@@ -145,7 +157,8 @@ class CheckoutableListener
|
||||
$notificationClass = CheckinLicenseSeatNotification::class;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
\Log::debug('Notification class: '.$notificationClass);
|
||||
return new $notificationClass($event->checkoutable, $event->checkedOutTo, $event->checkedInBy, $event->note);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Models;
|
||||
|
||||
use App\Notifications\AuditNotification;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Models\Setting;
|
||||
|
||||
trait Loggable
|
||||
{
|
||||
@@ -90,6 +91,7 @@ trait Loggable
|
||||
*/
|
||||
public function logCheckin($target, $note, $action_date = null)
|
||||
{
|
||||
$settings = Setting::getSettings();
|
||||
$log = new Actionlog;
|
||||
$log->target_type = get_class($target);
|
||||
$log->target_id = $target->id;
|
||||
@@ -120,38 +122,38 @@ trait Loggable
|
||||
|
||||
$log->logaction('checkin from');
|
||||
|
||||
$params = [
|
||||
'target' => $target,
|
||||
'item' => $log->item,
|
||||
'admin' => $log->user,
|
||||
'note' => $note,
|
||||
'target_type' => $log->target_type,
|
||||
'settings' => $settings,
|
||||
];
|
||||
|
||||
|
||||
$checkinClass = null;
|
||||
|
||||
if (method_exists($target, 'notify')) {
|
||||
try {
|
||||
$target->notify(new static::$checkinClass($params));
|
||||
} catch (\Exception $e) {
|
||||
\Log::debug($e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Send to the admin, if settings dictate
|
||||
$recipient = new \App\Models\Recipients\AdminRecipient();
|
||||
|
||||
if (($settings->admin_cc_email!='') && (static::$checkinClass!='')) {
|
||||
try {
|
||||
$recipient->notify(new static::$checkinClass($params));
|
||||
} catch (\Exception $e) {
|
||||
\Log::debug($e);
|
||||
}
|
||||
|
||||
}
|
||||
// $params = [
|
||||
// 'target' => $target,
|
||||
// 'item' => $log->item,
|
||||
// 'admin' => $log->user,
|
||||
// 'note' => $note,
|
||||
// 'target_type' => $log->target_type,
|
||||
// 'settings' => $settings,
|
||||
// ];
|
||||
//
|
||||
//
|
||||
// $checkinClass = null;
|
||||
//
|
||||
// if (method_exists($target, 'notify')) {
|
||||
// try {
|
||||
// $target->notify(new static::$checkinClass($params));
|
||||
// } catch (\Exception $e) {
|
||||
// \Log::debug($e);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// // Send to the admin, if settings dictate
|
||||
// $recipient = new \App\Models\Recipients\AdminRecipient();
|
||||
//
|
||||
// if (($settings->admin_cc_email!='') && (static::$checkinClass!='')) {
|
||||
// try {
|
||||
// $recipient->notify(new static::$checkinClass($params));
|
||||
// } catch (\Exception $e) {
|
||||
// \Log::debug($e);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
return $log;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ class CheckinAccessoryNotification extends Notification
|
||||
$this->admin = $checkedInby;
|
||||
$this->note = $note;
|
||||
$this->settings = Setting::getSettings();
|
||||
\Log::debug('Constructor for notification fired');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,23 +36,63 @@ class CheckinAccessoryNotification extends Notification
|
||||
*/
|
||||
public function via()
|
||||
{
|
||||
|
||||
\Log::debug('via called');
|
||||
$notifyBy = [];
|
||||
|
||||
if (Setting::getSettings()->slack_endpoint) {
|
||||
$notifyBy[] = 'slack';
|
||||
}
|
||||
|
||||
/**
|
||||
* Only send checkin notifications to users if the category
|
||||
* has the corresponding checkbox checked.
|
||||
*/
|
||||
if ($this->item->checkin_email() && $this->target instanceof User && $this->target->email != '')
|
||||
{
|
||||
\Log::debug('use email');
|
||||
$notifyBy[] = 'mail';
|
||||
if (Setting::getSettings()->slack_endpoint!='') {
|
||||
$notifyBy[] = 'slack';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Only send notifications to users that have email addresses
|
||||
*/
|
||||
if ($this->target instanceof User && $this->target->email != '') {
|
||||
|
||||
\Log::debug('The target is a user');
|
||||
|
||||
/**
|
||||
* Send an email if the asset requires acceptance,
|
||||
* so the user can accept or decline the asset
|
||||
*/
|
||||
if (($this->item->requireAcceptance()) || ($this->item->getEula()) || ($this->item->checkin_email())) {
|
||||
$notifyBy[] = 'mail';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Send an email if the asset requires acceptance,
|
||||
* so the user can accept or decline the asset
|
||||
*/
|
||||
if ($this->item->requireAcceptance()) {
|
||||
\Log::debug('This accessory requires acceptance');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an email if the item has a EULA, since the user should always receive it
|
||||
*/
|
||||
if ($this->item->getEula()) {
|
||||
\Log::debug('This accessory has a EULA');
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an email if an email should be sent at checkin/checkout
|
||||
*/
|
||||
if ($this->item->checkin_email()) {
|
||||
\Log::debug('This accessory has a checkin_email()');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
\Log::debug('checkin_email on this category is '.$this->item->checkin_email());
|
||||
|
||||
return $notifyBy;
|
||||
}
|
||||
|
||||
@@ -86,6 +127,7 @@ class CheckinAccessoryNotification extends Notification
|
||||
*/
|
||||
public function toMail()
|
||||
{
|
||||
\Log::debug('to email called');
|
||||
return (new MailMessage)->markdown('notifications.markdown.checkin-accessory',
|
||||
[
|
||||
'item' => $this->item,
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class SlackTest extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['slack'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Slack representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
* @return SlackMessage
|
||||
*/
|
||||
public function toSlack()
|
||||
{
|
||||
$settings = Setting::getSettings();
|
||||
return (new SlackMessage)
|
||||
->from($settings->slack_botname, ':heart:')
|
||||
->to($settings->slack_channel)
|
||||
->image('https://snipeitapp.com/favicon.ico')
|
||||
->content('Oh hai! Looks like your Slack integration with Snipe-IT is working!');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,12 +50,20 @@ class CategoryPresenter extends Presenter
|
||||
"title" => trans('general.qty'),
|
||||
"visible" => true
|
||||
],[
|
||||
"field" => "eula",
|
||||
"field" => "has_eula",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"title" => trans('admin/categories/table.eula_text'),
|
||||
"visible" => false,
|
||||
"formatter" => 'trueFalseFormatter',
|
||||
],[
|
||||
"field" => "checkin_email",
|
||||
"searchable" => false,
|
||||
"sortable" => true,
|
||||
"class" => 'css-envelope',
|
||||
"title" => 'Send Email',
|
||||
"visible" => true,
|
||||
"formatter" => 'trueFalseFormatter',
|
||||
],[
|
||||
"field" => "require_acceptance",
|
||||
"searchable" => false,
|
||||
|
||||
@@ -82,12 +82,14 @@ class CompanyPresenter extends Presenter
|
||||
"sortable" => true,
|
||||
"visible" => false,
|
||||
"title" => trans('general.updated_at'),
|
||||
"formatter" => 'createdAtFormatter',
|
||||
],[
|
||||
"field" => "created_at",
|
||||
"searchable" => false,
|
||||
"sortable" => true,
|
||||
"visible" => false,
|
||||
"title" => trans('general.created_at'),
|
||||
"formatter" => 'createdAtFormatter',
|
||||
],[
|
||||
"field" => "actions",
|
||||
"searchable" => false,
|
||||
|
||||
@@ -98,6 +98,21 @@ class LicensePresenter extends Presenter
|
||||
"title" => trans('general.purchase_date'),
|
||||
'formatter' => 'dateDisplayFormatter'
|
||||
], [
|
||||
"field" => "maintained",
|
||||
"searchable" => false,
|
||||
"sortable" => true,
|
||||
"visible" => false,
|
||||
"title" => trans('admin/licenses/form.maintained'),
|
||||
"formatter" => "trueFalseFormatter"
|
||||
], [
|
||||
"field" => "reassignable",
|
||||
"searchable" => false,
|
||||
"sortable" => true,
|
||||
"visible" => false,
|
||||
"title" => trans('admin/licenses/form.reassignable'),
|
||||
"formatter" => "trueFalseFormatter"
|
||||
],
|
||||
[
|
||||
"field" => "purchase_cost",
|
||||
"searchable" => true,
|
||||
"sortable" => true,
|
||||
|
||||
@@ -57,7 +57,7 @@ class LdapAd extends LdapAdConfiguration
|
||||
public function init()
|
||||
{
|
||||
// Already initialized
|
||||
if($this->ldap) {
|
||||
if ($this->ldap) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,10 +52,19 @@ class LdapAdConfiguration
|
||||
* @since 5.0.0
|
||||
*/
|
||||
public function init() {
|
||||
$this->ldapSettings = $this->getSnipeItLdapSettings();
|
||||
if ($this->isLdapEnabled()) {
|
||||
$this->setSnipeItConfig();
|
||||
|
||||
// This try/catch is dumb, but is necessary to run initial migrations, since
|
||||
// this service provider is booted even during migrations. :( - snipe
|
||||
try {
|
||||
$this->ldapSettings = $this->getSnipeItLdapSettings();
|
||||
if ($this->isLdapEnabled()) {
|
||||
$this->setSnipeItConfig();
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
\Log::debug($e);
|
||||
$this->ldapSettings = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,33 +91,35 @@ class LdapAdConfiguration
|
||||
*/
|
||||
private function getSnipeItLdapSettings(): Collection
|
||||
{
|
||||
$ldapSettings = Setting::getLdapSettings()
|
||||
->map(function ($item, $key) {
|
||||
// Trim the items
|
||||
if (is_string($item)) {
|
||||
$item = trim($item);
|
||||
}
|
||||
// Get the boolean value of the LDAP setting, makes it easier to work with them
|
||||
if (in_array($key, self::LDAP_BOOLEAN_SETTINGS)) {
|
||||
return boolval($item);
|
||||
}
|
||||
|
||||
// Decrypt the admin password
|
||||
if ('ldap_pword' === $key && !empty($item)) {
|
||||
try {
|
||||
return decrypt($item);
|
||||
} catch (Exception $e) {
|
||||
throw new Exception('Your app key has changed! Could not decrypt LDAP password using your current app key, so LDAP authentication has been disabled. Login with a local account, update the LDAP password and re-enable it in Admin > Settings.');
|
||||
$ldapSettings = collect();
|
||||
if(Setting::first()) { // during early migration steps, there may be no settings table entry to start with
|
||||
$ldapSettings = Setting::getLdapSettings()
|
||||
->map(function ($item, $key) {
|
||||
// Trim the items
|
||||
if (is_string($item)) {
|
||||
$item = trim($item);
|
||||
}
|
||||
// Get the boolean value of the LDAP setting, makes it easier to work with them
|
||||
if (in_array($key, self::LDAP_BOOLEAN_SETTINGS)) {
|
||||
return boolval($item);
|
||||
}
|
||||
}
|
||||
|
||||
if ($item && 'ldap_server' === $key) {
|
||||
return collect(parse_url($item));
|
||||
}
|
||||
// Decrypt the admin password
|
||||
if ('ldap_pword' === $key && !empty($item)) {
|
||||
try {
|
||||
return decrypt($item);
|
||||
} catch (Exception $e) {
|
||||
throw new Exception('Your app key has changed! Could not decrypt LDAP password using your current app key, so LDAP authentication has been disabled. Login with a local account, update the LDAP password and re-enable it in Admin > Settings.');
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
});
|
||||
if ($item && 'ldap_server' === $key) {
|
||||
return collect(parse_url($item));
|
||||
}
|
||||
|
||||
return $item;
|
||||
});
|
||||
}
|
||||
return $ldapSettings;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v5.0.0-beta-3',
|
||||
'full_app_version' => 'v5.0.0-beta-3 - build 4352-gec723a3da',
|
||||
'build_version' => '4190',
|
||||
'app_version' => 'v5.0.0-beta-5 RC',
|
||||
'full_app_version' => 'v5.0.0-beta-5 RC - build 4483-',
|
||||
'build_version' => '4483',
|
||||
'prerelease_version' => '',
|
||||
'hash_version' => 'gec723a3da',
|
||||
'full_hash' => 'v5.0.0-beta-3-gec723a3da',
|
||||
'hash_version' => '',
|
||||
'full_hash' => 'v5.0.0-beta-5 RC',
|
||||
'branch' => 'develop',
|
||||
);
|
||||
);
|
||||
@@ -19,7 +19,7 @@ class AddAdAppendDomainSettings extends Migration
|
||||
});
|
||||
|
||||
$s = Setting::first(); // we are deliberately *not* using the ::getSettings() method, as it caches things, and our Settings table is being migrated right now
|
||||
if($s->is_ad && $s->ldap_enabled && $s->ad_domain) { //backwards-compatibility setting; < v5 always appended AD Domains
|
||||
if ($s && $s->is_ad && $s->ldap_enabled && $s->ad_domain) { //backwards-compatibility setting; < v5 always appended AD Domains
|
||||
$s->ad_append_domain = 1;
|
||||
$s->save();
|
||||
}
|
||||
|
||||
@@ -48,6 +48,9 @@ class DatabaseSeeder extends Seeder
|
||||
Model::reguard();
|
||||
|
||||
DB::table('imports')->truncate();
|
||||
DB::table('asset_maintenances')->truncate();
|
||||
DB::table('requested_assets')->truncate();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/css/dist/all.css
vendored
2
public/css/dist/all.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
53
public/js/dist/all.js
vendored
53
public/js/dist/all.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"/js/build/app.js": "/js/build/app.js?id=041c2c23e0a7e285999d",
|
||||
"/js/build/app.js": "/js/build/app.js?id=edf4823a58f20c4e41fc",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=59413334823616b81341",
|
||||
"/css/build/app.css": "/css/build/app.css?id=3911a887c2bdc7d0b528",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=688f59cd273484405f9b",
|
||||
"/css/build/app.css": "/css/build/app.css?id=032fd8c3fce99c7fd862",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=0b4aefd7ef0c117ef23a",
|
||||
"/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=9fa704134cfacfacab93",
|
||||
"/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=747948e5f269f64047f7",
|
||||
"/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=d7996d850e8bcdc4e167",
|
||||
@@ -18,7 +18,7 @@
|
||||
"/css/dist/skins/skin-blue-dark.css": "/css/dist/skins/skin-blue-dark.css?id=2f665cf40d7348b3f94c",
|
||||
"/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=71c178700d68294e3413",
|
||||
"/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=b4fc4a74e1f6367dc3e2",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=cd644954b1fc39b7f25b",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=23029d15778815d3c35a",
|
||||
"/css/blue.png": "/css/blue.png?id=4c85d6a97173123bd14a",
|
||||
"/css/blue@2x.png": "/css/blue@2x.png?id=62c67c6a822439e8a4ac",
|
||||
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=0cfa39cacd9c83b4f53b",
|
||||
@@ -34,5 +34,5 @@
|
||||
"/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=a534edb9f7179f6dcf62",
|
||||
"/js/build/vendor.js": "/js/build/vendor.js?id=ac70ab5fd89efc2aa7d0",
|
||||
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=9407782198cbc29f23d1",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=451bd5a52c473c82fd71"
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=29881ddb42a1bf849280"
|
||||
}
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
<template>
|
||||
|
||||
<div v-show="processDetail" class="col-md-6 col-md-offset-3">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-5 col-xs-12">
|
||||
<label for="import-type">Import Type:</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<select2 :options="options.importTypes" v-model="options.importType" required>
|
||||
<option disabled value="0"></option>
|
||||
</select2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /dynamic-form-row -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-5 col-xs-12">
|
||||
<label for="import-update">Update Existing Values?:</label>
|
||||
@@ -19,7 +22,8 @@
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<input type="checkbox" class="minimal" name="import-update" v-model="options.update">
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /dynamic-form-row -->
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-5 col-xs-12">
|
||||
<label for="send-welcome">Send Welcome Email for new Users?</label>
|
||||
@@ -27,7 +31,8 @@
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<input type="checkbox" class="minimal" name="send-welcome" v-model="options.send_welcome">
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /dynamic-form-row -->
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-5 col-xs-12">
|
||||
<label for="run-backup">Backup before importing?</label>
|
||||
@@ -35,14 +40,15 @@
|
||||
<div class="col-md-7 col-xs-12">
|
||||
<input type="checkbox" class="minimal" name="run-backup" v-model="options.run_backup">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert col-md-8 col-md-offset-2" style="text-align:left"
|
||||
:class="alertClass"
|
||||
v-if="statusText">
|
||||
{{ this.statusText }}
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /dynamic-form-row -->
|
||||
|
||||
<div class="alert col-md-8 col-md-offset-2" style="text-align:left"
|
||||
:class="alertClass"
|
||||
v-if="statusText">
|
||||
{{ this.statusText }}
|
||||
</div><!-- /alert -->
|
||||
</div> <!-- /div row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8" style="padding-top: 30px;">
|
||||
@@ -50,7 +56,7 @@
|
||||
<div class="col-md-4"><h4>Import Field</h4></div>
|
||||
<div class="col-md-4"><h4>Sample Value</h4></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /div row -->
|
||||
|
||||
<template v-for="(header, index) in file.header_row">
|
||||
<div class="row">
|
||||
@@ -69,8 +75,8 @@
|
||||
<div class="col-md-4">
|
||||
<p class="form-control-static">{{ activeFile.first_row[index] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /div col-md-8 -->
|
||||
</div><!-- /div row -->
|
||||
</template>
|
||||
|
||||
<div class="row">
|
||||
@@ -79,17 +85,17 @@
|
||||
<button type="submit" class="btn btn-sm btn-primary" @click="postSave">Import</button>
|
||||
<br><br>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /div row -->
|
||||
<div class="row">
|
||||
<div class="alert col-md-8 col-md-offset-2" style="padding-top: 20px;"
|
||||
:class="alertClass"
|
||||
v-if="statusText">
|
||||
{{ this.statusText }}
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /div row -->
|
||||
|
||||
</div><!-- /div v-show -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<div class="modal-header">
|
||||
<button type="button " class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<h4 class="modal-title">
|
||||
<h2 class="modal-title">
|
||||
Create Client
|
||||
</h2>
|
||||
</div>
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
<h4 class="modal-title">
|
||||
Edit Client
|
||||
</h2>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -465,9 +465,13 @@ $(document).ready(function () {
|
||||
$(id + '-info').append('<span class="label label-default">' + this.files[i].name + ' (' + formatBytes(this.files[i].size) + ')</span> ');
|
||||
}
|
||||
|
||||
console.log('Max size is: ' + max_size);
|
||||
console.log('Real size is: ' + total_size);
|
||||
|
||||
if (total_size > max_size) {
|
||||
$status.addClass('text-danger').removeClass('help-block').prepend('<i class="badfile fa fa-times"></i> ').append('<span class="previewSize"> Upload is ' + formatBytes(total_size) + '.</span>');
|
||||
} else {
|
||||
|
||||
$status.addClass('text-success').removeClass('help-block').prepend('<i class="goodfile fa fa-check"></i> ');
|
||||
var $preview = $(id + '-imagePreview');
|
||||
readURL(this, $preview);
|
||||
|
||||
@@ -137,13 +137,13 @@ a.accordion-header {
|
||||
width: 100%;
|
||||
}
|
||||
.error input {
|
||||
color: #dd4b39;
|
||||
border: 2px solid #dd4b39 !important;
|
||||
color: #a94442;
|
||||
border: 2px solid #a94442 !important;
|
||||
}
|
||||
|
||||
.error label,
|
||||
.alert-msg {
|
||||
color: #dd4b39;
|
||||
color: #a94442;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,12 +156,12 @@ a.accordion-header {
|
||||
width: 100%;
|
||||
}
|
||||
.error input {
|
||||
color: #dd4b39;
|
||||
border: 2px solid #dd4b39 !important;
|
||||
color: #a94442;
|
||||
border: 2px solid #a94442 !important;
|
||||
}
|
||||
|
||||
.error label, .alert-msg {
|
||||
color: #dd4b39;
|
||||
color: #a94442;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -486,6 +486,7 @@ h4 {
|
||||
th.css-barcode > .th-inner,
|
||||
th.css-license > .th-inner,
|
||||
th.css-consumable > .th-inner,
|
||||
th.css-envelope > .th-inner,
|
||||
th.css-accessory > .th-inner
|
||||
{
|
||||
font-size: 0px;
|
||||
@@ -501,6 +502,7 @@ th.css-padlock > .th-inner::before,
|
||||
th.css-barcode > .th-inner::before,
|
||||
th.css-license > .th-inner::before,
|
||||
th.css-consumable > .th-inner::before,
|
||||
th.css-envelope > .th-inner::before,
|
||||
th.css-accessory > .th-inner::before
|
||||
|
||||
{
|
||||
@@ -530,6 +532,12 @@ th.css-consumable > .th-inner::before
|
||||
content: "\f043";
|
||||
}
|
||||
|
||||
th.css-envelope > .th-inner::before
|
||||
{
|
||||
content: "\f003";
|
||||
}
|
||||
|
||||
|
||||
th.css-accessory > .th-inner::before
|
||||
{
|
||||
content: "\f11c";
|
||||
@@ -552,3 +560,7 @@ th.css-accessory > .th-inner::before
|
||||
padding: 6px 12px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.form-group.has-error label {
|
||||
color: #a94442;
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'about_kits' => 'About Predefined Kits',
|
||||
'about_kits_title' => 'About Predefined Kits',
|
||||
'about_kits_text' => 'Predefined Kits let you quickly check out a collection of items (assets, licenses, etc) to a user. This can be helpful when your onboarding process is consistent across many users and all users receive the same items.',
|
||||
'checkout' => 'Checkout Kit ',
|
||||
'create_success' => 'Kit was successfully created.',
|
||||
'create' => 'Create Predefined Kit',
|
||||
|
||||
@@ -25,7 +25,7 @@ return array(
|
||||
'backups' => 'Backups',
|
||||
'barcode_settings' => 'Barcode Settings',
|
||||
'confirm_purge' => 'Confirm Purge',
|
||||
'confirm_purge_help' => 'Enter the text "DELETE" in the box below to purge your deleted records. This action cannot be undone.',
|
||||
'confirm_purge_help' => 'Enter the text "DELETE" in the box below to purge your deleted records. This action cannot be undone and will PERMANENTLY delete all soft-deleted items and users. (You should make a backup first, just to be safe.)',
|
||||
'custom_css' => 'Custom CSS',
|
||||
'custom_css_help' => 'Enter any custom CSS overrides you would like to use. Do not include the <style></style> tags.',
|
||||
'custom_forgot_pass_url' => 'Custom Password Reset URL',
|
||||
@@ -150,7 +150,7 @@ return array(
|
||||
'slack_channel' => 'Slack Channel',
|
||||
'slack_endpoint' => 'Slack Endpoint',
|
||||
'slack_integration' => 'Slack Settings',
|
||||
'slack_integration_help' => 'Slack integration is optional, however the endpoint and channel are required if you wish to use it. To configure Slack integration, you must first <a href=":slack_link" target="_new" rel="noopener">create an incoming webhook</a> on your Slack account.',
|
||||
'slack_integration_help' => 'Slack integration is optional, however the endpoint and channel are required if you wish to use it. To configure Slack integration, you must first <a href=":slack_link" target="_new" rel="noopener">create an incoming webhook</a> on your Slack account. Click on the <strong>Test Slack Integration</strong> button to confirm your settings are correct before saving. ',
|
||||
'slack_integration_help_button' => 'Once you have saved your Slack information, a test button will appear.',
|
||||
'slack_test_help' => 'Test whether your Slack integration is configured correctly. YOU MUST SAVE YOUR UPDATED SLACK SETTINGS FIRST.',
|
||||
'snipe_version' => 'Snipe-IT version',
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
'licenses' => 'Licenses',
|
||||
'list_all' => 'List All',
|
||||
'loading' => 'Loading',
|
||||
'lock_passwords' => 'This field cannot be edited in this installation.',
|
||||
'lock_passwords' => 'This field value will not be saved in a demo installation.',
|
||||
'feature_disabled' => 'This feature has been disabled for the demo installation.',
|
||||
'location' => 'Location',
|
||||
'locations' => 'Locations',
|
||||
@@ -202,6 +202,7 @@
|
||||
'sign_in' => 'Sign in',
|
||||
'signature' => 'Signature',
|
||||
'skin' => 'Skin',
|
||||
'slack_test_msg' => 'Oh hai! Looks like your Slack integration with Snipe-IT is working!',
|
||||
'some_features_disabled' => 'DEMO MODE: Some features are disabled for this installation.',
|
||||
'site_name' => 'Site Name',
|
||||
'state' => 'State',
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-7">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
@@ -37,7 +37,7 @@
|
||||
@if ($accessory->name)
|
||||
<!-- accessory name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $accessory->name }}</p>
|
||||
</div>
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
<label for="note" class="col-md-2 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<label for="note" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<div class="col-md-7">
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ old('note', $accessory->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
@@ -55,8 +55,8 @@
|
||||
<!-- Checkout/Checkin Date -->
|
||||
<div class="form-group{{ $errors->has('checkin_at') ? ' has-error' : '' }}">
|
||||
{{ Form::label('checkin_at', trans('admin/hardware/form.checkin_date'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<div class="input-group col-md-5 required">
|
||||
<div class="col-md-7">
|
||||
<div class="input-group col-md-5 required" style="padding-left: 0px;">
|
||||
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-end-date="0d" data-autoclose="true">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkin_at" id="checkin_at" value="{{ Request::old('checkin_at', date('Y-m-d')) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/accessories/general.accessory_name')])
|
||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true','category_type' => 'accessory'])
|
||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
@include ('partials.forms.edit.model_number')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
|
||||
@@ -41,7 +41,7 @@ Accept assets {{ $user->present()->fullName() }}
|
||||
<tbody>
|
||||
@foreach ($acceptances as $acceptance)
|
||||
<tr>
|
||||
<td>{{ $acceptance->checkoutable->present()->name }}</td>
|
||||
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }}</td>
|
||||
<td><a href="{{ route('account.accept.item', $acceptance) }}" class="btn btn-default btn-sm">Accept/Decline</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="password" name="current_password" id="current_password" {{ (config('app.lock_passwords') ? ' disabled' : '') }}>
|
||||
{!! $errors->first('current_password', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,6 +36,9 @@
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="password" name="password" id="password" {{ (config('app.lock_passwords') ? ' disabled' : '') }}>
|
||||
{!! $errors->first('password', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,8 +48,8 @@
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="password" name="password_confirmation" id="password_confirmation" {{ (config('app.lock_passwords') ? ' disabled' : '') }} aria-label="password_confirmation">
|
||||
{!! $errors->first('password_confirmation', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
@if (config('app.lock_passwords'))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/consumables/table.title')])
|
||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('general.category'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'consumable'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id'])
|
||||
@include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'location_id'])
|
||||
@include ('partials.forms.edit.model_number')
|
||||
@include ('partials.forms.edit.item_number')
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</td>
|
||||
<td>
|
||||
@foreach($fieldset->models as $model)
|
||||
<a href="{{ route('models.show', $model->id) }}" class="label label-default">{{ $model->name }}</a>
|
||||
<a href="{{ route('models.show', $model->id) }}" class="label label-default">{{ $model->name }}{{ ($model->model_number) ? ' ('.$model->model_number.')' : '' }}</a>
|
||||
|
||||
@endforeach
|
||||
</td>
|
||||
@@ -140,7 +140,7 @@
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td>{{ $field->help_text }}</td>
|
||||
<td>{!! ($field->show_in_email=='1') ? '<i class="fa fa-check text-success"></i>' : '<i class="fa fa-times text-danger"></i>' !!}</td>
|
||||
<td>{!! ($field->show_in_email=='1') ? '<i class="fa fa-check text-success" aria-hidden="true"><span class="sr-only">'.trans('general.yes').'</span></i>' : '<i class="fa fa-times text-danger" aria-hidden="true"><span class="sr-only">'.trans('general.no').'</span></i>' !!}</td>
|
||||
<td>
|
||||
<code>{{ $field->convertUnicodeDbSlug() }}</code>
|
||||
@if ($field->convertUnicodeDbSlug()!=$field->db_column)
|
||||
|
||||
@@ -178,8 +178,6 @@
|
||||
<table
|
||||
data-cookie-id-table="dashActivityReport"
|
||||
data-height="400"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="desc"
|
||||
data-sort-name="created_at"
|
||||
id="dashActivityReport"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<label for="purchase_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.date') }}</label>
|
||||
<div class="input-group col-md-3">
|
||||
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date') }}">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ old('purchase_date') }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
@@ -44,7 +44,7 @@
|
||||
<label for="expected_checkin" class="col-md-3 control-label">{{ trans('admin/hardware/form.expected_checkin') }}</label>
|
||||
<div class="input-group col-md-3">
|
||||
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
||||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ old('expected_checkin') }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('expected_checkin', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
<label for="first_name" class="col-sm-3 control-label">{{ trans('admin/users/general.usercsv') }}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="file" name="user_import_csv" id="user_import_csv"{{ (config('app.lock_passwords')===true) ? ' disabled' : '' }}>
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
@extends('layouts/edit-form', [
|
||||
'createText' => trans('admin/kits/general.create'),
|
||||
'updateText' => trans('admin/kits/general.update'),
|
||||
'helpTitle' => trans('admin/kits/table.about_kits_title'),
|
||||
'helpText' => trans('admin/kits/table.about_kits_text'),
|
||||
'formAction' => (isset($item->id)) ? route('kits.update', ['kit' => $item->id]) : route('kits.store'),
|
||||
])
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('inputFields')
|
||||
@include ('partials.forms.edit.name', ['translated_name' => 'Name']) {{-- TODO: trans --}}
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')])
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
@extends('layouts/default')
|
||||
@extends('layouts/default', [
|
||||
'helpTitle' => trans('admin/kits/general.about_kits_title'),
|
||||
'helpText' => trans('admin/kits/general.about_kits_text')])
|
||||
|
||||
{{-- Web site Title --}}
|
||||
@section('title')
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<link rel="shortcut icon" type="image/ico" href="{{ ($snipeSettings) && ($snipeSettings->favicon!='') ? Storage::disk('public')->url('').e($snipeSettings->favicon) : 'favicon.ico' }} ">
|
||||
{{-- stylesheets --}}
|
||||
<link rel="stylesheet" href="{{ url('css/all.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="{{ url('css/dist/all.css') }}">
|
||||
|
||||
@@ -742,7 +742,17 @@
|
||||
<section class="content-header" style="padding-bottom: 30px;">
|
||||
<h1 class="pull-left">
|
||||
@yield('title')
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
@if (isset($helpText))
|
||||
@include ('partials.more-info',
|
||||
[
|
||||
'helpText' => $helpText,
|
||||
'helpPosition' => (isset($helpPosition)) ? $helpPosition : 'left'
|
||||
])
|
||||
@endif
|
||||
<div class="pull-right">
|
||||
@yield('header_right')
|
||||
</div>
|
||||
@@ -839,6 +849,10 @@
|
||||
|
||||
{{-- Javascript files --}}
|
||||
<script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>
|
||||
|
||||
<!-- v5-beta: This pGenerator call must remain here for v5 - until fixed - so that the JS password generator works for the user create modal. -->
|
||||
<script src="{{ url('js/pGenerator.jquery.js') }}"></script>
|
||||
|
||||
{{-- Page level javascript --}}
|
||||
@stack('js')
|
||||
|
||||
@@ -847,13 +861,21 @@
|
||||
|
||||
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
|
||||
// ignore: 'input[type=hidden]' is required here to validate the select2 lists
|
||||
$.validate({
|
||||
form : '#create-form',
|
||||
modules : 'date, toggleDisabled',
|
||||
disabledFormFilter : '#create-form',
|
||||
showErrorDialogs : true
|
||||
showErrorDialogs : true,
|
||||
ignore: 'input[type=hidden]'
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
@@ -24,48 +24,37 @@
|
||||
<!-- row -->
|
||||
<div class="row">
|
||||
<!-- col-md-8 -->
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0">
|
||||
|
||||
<form id="create-form" class="form-horizontal" method="post" action="{{ (isset($formAction)) ? $formAction : \Request::url() }}" autocomplete="off" role="form" enctype="multipart/form-data">
|
||||
|
||||
<!-- box -->
|
||||
<div class="box box-default">
|
||||
<!-- box-header -->
|
||||
<div class="box-header{{ ($item->id) ? ' with-border' : '' }}">
|
||||
<div class="box-header with-border text-right">
|
||||
|
||||
<div class="box-title col-md-12" style="min-height: 20px;">
|
||||
<div class="col-md-12 box-title text-right" style="padding: 0px; margin: 0px;">
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
@if (isset($helpText))
|
||||
<div class="col-md-1 text-left" style="horiz-align: center;">
|
||||
@include ('partials.more-info',
|
||||
[
|
||||
'helpText' => $helpText,
|
||||
'helpPosition' => (isset($helpPosition)) ? $helpPosition : 'left'
|
||||
])
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($item->id)
|
||||
<div class="col-md-9">
|
||||
<h2 class="box-title">
|
||||
<div class="col-md-12" style="padding: 0px; margin: 0px;">
|
||||
<div class="col-md-9 text-left">
|
||||
@if ($item->id)
|
||||
<h2 class="box-title text-left" style="padding-top: 8px;">
|
||||
{{ $item->display_name }}
|
||||
</h2>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-3 text-right" style="padding-right: 10px;">
|
||||
<a class="btn btn-link text-left" href="{{ URL::previous() }}">
|
||||
{{ trans('button.cancel') }}
|
||||
</a>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fa fa-check icon-white" aria-hidden="true"></i>
|
||||
{{ trans('general.save') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ((isset($topSubmit)) && ($topSubmit =='true'))
|
||||
<div class="col-md-2 text-right">
|
||||
@include('partials.forms.edit.submit-button')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div> <!-- /div.row -->
|
||||
|
||||
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<!-- box-body -->
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Snipe-IT Setup
|
||||
@show
|
||||
</title>
|
||||
<link rel="stylesheet" href="{{ url('css/all.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
|
||||
|
||||
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
@if (($location->state!='') && ($location->country!='') && (config('services.google.maps_api_key')))
|
||||
<div class="col-md-12 text-center">
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?center={{ urlencode($location->city.','.$location->city.' '.$location->state.' '.$location->country.' '.$location->zip) }}&size=500x300&maptype=roadmap&key={{ config('services.google.maps_api_key') }}" class="img-responsive img-thumbnail" alt="Map">
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?markers={{ urlencode($location->address.','.$location->city.' '.$location->state.' '.$location->country.' '.$location->zip) }}&size=500x300&maptype=roadmap&key={{ config('services.google.maps_api_key') }}" class="img-responsive img-thumbnail" alt="Map">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{-- Page content --}}
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name')])
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/models/table.name'), 'required' => 'true'])
|
||||
@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true'])
|
||||
@include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'asset'])
|
||||
@include ('partials.forms.edit.model_number')
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
| | |
|
||||
| ------------- | ------------- |
|
||||
| **{{ trans('mail.asset_name') }}** | {{ $item->name }} |
|
||||
| **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} |
|
||||
@if (isset($item->manufacturer))
|
||||
| **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} |
|
||||
@endif
|
||||
|
||||
@@ -391,8 +391,8 @@
|
||||
|
||||
|
||||
function createdAtFormatter(value) {
|
||||
if ((value) && (value.date)) {
|
||||
return value.date;
|
||||
if ((value) && (value.formatted)) {
|
||||
return value.formatted;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
<div class="col-md-7">
|
||||
{{Form::text('state', old('state', $item->state), array('class' => 'form-control', 'aria-label'=>'state')) }}
|
||||
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
{{Form::text('state', Request::old('state', $item->state), array('class' => 'form-control')) }}
|
||||
{!! $errors->first('state', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}">
|
||||
<select class="js-data-ajax" data-endpoint="categories/{{ (isset($category_type)) ? $category_type : 'assets' }}" data-placeholder="{{ trans('general.select_category') }}" name="{{ $fieldname }}" style="width: 100%" id="category_select_id" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
|
||||
@if ($category_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $category_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
{{ (\App\Models\Category::find($category_id)) ? \App\Models\Category::find($category_id)->name : '' }}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-6{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('general.select_location') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}">
|
||||
<select class="js-data-ajax" data-endpoint="locations" data-placeholder="{{ trans('general.select_location') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
|
||||
@if ($location_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $location_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
{{ (\App\Models\Location::find($location_id)) ? \App\Models\Location::find($location_id)->name : '' }}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="manufacturers" data-placeholder="{{ trans('general.select_manufacturer') }}" name="{{ $fieldname }}" style="width: 100%" id="manufacturer_select_id" aria-label="{{ $fieldname }}">
|
||||
<select class="js-data-ajax" data-endpoint="manufacturers" data-placeholder="{{ trans('general.select_manufacturer') }}" name="{{ $fieldname }}" style="width: 100%" id="manufacturer_select_id" aria-label="{{ $fieldname }}" {!! ((isset($item)) && (\App\Helpers\Helper::checkIfRequired($item, $fieldname))) ? ' data-validation="required" required' : '' !!}>
|
||||
@if ($manufacturer_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $manufacturer_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
||||
{{ (\App\Models\Manufacturer::find($manufacturer_id)) ? \App\Models\Manufacturer::find($manufacturer_id)->name : '' }}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}">
|
||||
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}" data-validation="required" required>
|
||||
@if ($model_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $model_id }}" selected="selected">
|
||||
{{ (\App\Models\AssetModel::find($model_id)) ? \App\Models\AssetModel::find($model_id)->name : '' }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ $translated_name }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}" />
|
||||
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (\App\Helpers\Helper::checkIfRequired($item, 'name')) ? ' data-validation="required" required' : '' !!} />
|
||||
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<label for="qty" class="col-md-3 control-label">{{ trans('general.quantity') }}</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'qty')) ? ' required' : '' }}">
|
||||
<div class="col-md-2" style="padding-left:0px">
|
||||
<input class="form-control" type="text" name="qty" aria-label="qty" id="qty" value="{{ old('qty', $item->qty) }}" />
|
||||
<input class="form-control" type="text" name="qty" aria-label="qty" id="qty" value="{{ old('qty', $item->qty) }}" {!! (\App\Helpers\Helper::checkIfRequired($item, 'qty')) ? ' data-validation="required" required' : '' !!}/>
|
||||
</div>
|
||||
{!! $errors->first('qty', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
|
||||
<div class="col-md-7 col-sm-11{{ (\App\Helpers\Helper::checkIfRequired($item, 'status_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('status_id', $statuslabel_list , old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id')) }}
|
||||
{{ Form::select('status_id', $statuslabel_list , old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id', 'data-validation' => "required")) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fa fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2 text-left">
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
<div class="form-group {{ $errors->has($logoVariable) ? 'has-error' : '' }}">
|
||||
<label class="col-md-3" for="{{ $logoVariable }}">
|
||||
{{ Form::label($logoVariable, $logoLabel) }}</label>
|
||||
{{ Form::label($logoVariable, $logoLabel) }}</label>
|
||||
|
||||
@if ($setting->$logoVariable!='')
|
||||
|
||||
<div class="col-md-9">
|
||||
{{ Form::checkbox($logoClearVariable, '1', Request::old($logoClearVariable),array('class' => 'minimal')) }} Remove current {{ str_replace('_', ' ', $logoVariable) }} image
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
|
||||
<div class="col-md-9">
|
||||
<label class="btn btn-default">
|
||||
{{ trans('button.select_file') }}
|
||||
<input type="file" name="{{ $logoVariable }}" class="js-uploadFile" id="{{ $logoId }}"
|
||||
@@ -14,16 +22,16 @@
|
||||
<p class="help-block" id="{{ $logoId }}-status">
|
||||
{{ $helpBlock }}
|
||||
</p>
|
||||
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
{!! $errors->first($logoVariable, '<span class="alert-msg">:message</span>') !!}
|
||||
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<img id="{{ $logoId }}-imagePreview" style="max-width: 500px; max-height: 50px">
|
||||
<img id="{{ $logoId }}-imagePreview" style="max-width: 500px; max-height: 50px;">
|
||||
</div>
|
||||
|
||||
@if ($setting->$logoVariable!='')
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
{{ Form::checkbox($logoClearVariable, '1', Request::old($logoClearVariable),array('class' => 'minimal')) }} Remove current image
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
<a href="#" class="text-dark-gray pull-left" tabindex="0" role="button" data-toggle="popover" data-trigger="focus" data-placement="{{ (isset($helpPosition)) ? $helpPosition : 'right' }}" data-html="true" data-content="{{ (isset($helpText)) ? $helpText : 'Info Missing' }}"><i class="fa fa-life-ring fa-2x"></i></a>
|
||||
<a style="padding-left: 10px; font-size: 18px;" class="text-dark-gray" data-trigger="focus" tabindex="0" role="button" data-toggle="popover" title="More Info" data-placement="right" data-html="true" data-content="{{ (isset($helpText)) ? $helpText : 'Help Info Missing' }}">
|
||||
<i class="fa fa-life-ring" aria-hidden="true"><span class="sr-only">More Info</span></i>
|
||||
</a>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="company" data-sortable="false" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-field="company" data-sortable="false" data-visible="false" data-formatter="companiesLinkObjFormatter">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-sortable="true" data-field="asset_tag" data-formatter="assetTagLinkFormatter" data-visible="false">{{ trans('general.asset_tag') }}</th>
|
||||
<th data-sortable="false" data-field="asset_name" data-formatter="assetNameLinkFormatter">{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<passport-authorized-clients clients-url="{{ url('oauth/clients') }}" tokens-url="{{ url('oauth/tokens') }}"></passport-authorized-clients>
|
||||
</div>
|
||||
@else
|
||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
@stop
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
</p>
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<div class="col-md-7 required">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('site_name', Request::old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Snipe-IT Asset Management')) }}
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{{ Form::text('site_name',
|
||||
Request::old('site_name', $setting->site_name), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management', 'data-validation' => 'required')) }}
|
||||
@@ -103,9 +104,9 @@
|
||||
"logoId" => "uploadFavicon",
|
||||
"logoLabel" => trans('admin/settings/general.favicon'),
|
||||
"logoClearVariable" => "clear_favicon",
|
||||
"helpBlock" => trans('admin/settings/general.favicon_size') . trans('admin/settings/general.favicon_format'),
|
||||
"allowedTypes" => "image/x-icon,image/gif,image/jpeg,image/png,image/svg",
|
||||
"maxSize" => 1000
|
||||
"helpBlock" => trans('admin/settings/general.favicon_size') .' '. trans('admin/settings/general.favicon_format'),
|
||||
"allowedTypes" => "image/x-icon,image/gif,image/jpeg,image/png,image/svg,image/vnd.microsoft.icon",
|
||||
"maxSize" => 20000
|
||||
])
|
||||
|
||||
<!-- Include logo in print assets -->
|
||||
@@ -170,7 +171,7 @@
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS','disabled'=>'disabled', 'aria-label'=>'custom_css')) }}
|
||||
{!! $errors->first('custom_css', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{{ Form::textarea('custom_css', old('custom_css', $setting->custom_css), array('class' => 'form-control','placeholder' => 'Add your custom CSS', 'aria-label'=>'custom_css')) }}
|
||||
{!! $errors->first('custom_css', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@@ -188,11 +189,12 @@
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('support_footer', $setting->support_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{!! Form::select('support_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('support_footer', $setting->support_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
|
||||
@endif
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.support_footer_help') }}</p>
|
||||
|
||||
{!! $errors->first('support_footer', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -206,6 +208,7 @@
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('version_footer', $setting->version_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{!! Form::select('version_footer', array('on'=>'Enabled','off'=>'Disabled','admin'=>'Superadmin Only'), Request::old('version_footer', $setting->version_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
|
||||
@endif
|
||||
@@ -223,7 +226,7 @@
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::textarea('footer_text', Request::old('footer_text', $setting->footer_text), array('class' => 'form-control', 'rows' => '4', 'placeholder' => 'Optional footer text','disabled'=>'disabled')) }}
|
||||
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{{ Form::textarea('footer_text', Request::old('footer_text', $setting->footer_text), array('class' => 'form-control','rows' => '4','placeholder' => 'Optional footer text')) }}
|
||||
@endif
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
<textarea class="form-control disabled" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2" aria-label="login_note" readonly>{{ old('login_note', $setting->login_note) }}</textarea>
|
||||
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
<textarea class="form-control" name="login_note" aria-label="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2">{{ old('login_note', $setting->login_note) }}</textarea>
|
||||
{!! $errors->first('login_note', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
<textarea class="form-control disabled" name="login_note" placeholder="If you do not have a login or have found a device belonging to this company, please call technical support at 888-555-1212. Thank you." rows="2" aria-label="dashboard_message" readonly>{{ old('dashboard_message', $setting->login_note) }}</textarea>
|
||||
{!! $errors->first('dashboard_message', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<p class="help-block">{{ trans('general.lock_passwords') }}</p>
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
<textarea class="form-control" aria-label="dashboard_message" name="dashboard_message" rows="2">{{ old('login_note', $setting->dashboard_message) }}</textarea>
|
||||
{!! $errors->first('dashboard_message', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@@ -317,6 +317,11 @@
|
||||
|
||||
<span class="help-block">{{ trans('admin/settings/general.privacy_policy_link_help') }}</span>
|
||||
{!! $errors->first('privacy_policy_link', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.logins.index') }}">
|
||||
<i class="fa fa-sign-in fa-4x" aria-hidden="true"></i>
|
||||
<i class="fa fa-crosshairs fa-4x" aria-hidden="true"></i>
|
||||
<br><br>
|
||||
<span class="name">Login Attempts</span>
|
||||
</a>
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
if( $('#is_ad').prop('checked') === false) {
|
||||
$('#ad_domain').prop('disabled', 'disabled');
|
||||
} else {
|
||||
$('#ldap_server').prop('disabled', 'disabled');
|
||||
//$('#ldap_server').prop('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
*/
|
||||
$('#is_ad').on('ifClicked', function(){
|
||||
$('#ad_domain').toggleDisabled();
|
||||
$('#ldap_server').toggleDisabled();
|
||||
//$('#ldap_server').toggleDisabled();
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -30,15 +30,18 @@
|
||||
</div>
|
||||
<div class="col-md-9{{ $errors->has('confirm_purge') ? 'error' : '' }}">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('confirm_purge', Request::old('confirm_purge'), array('class' => 'form-control', 'disabled'=>'disabled')) }}
|
||||
{{ Form::text('confirm_purge', Request::old('confirm_purge'), array('class' => 'form-control', 'disabled'=>'true')) }}
|
||||
@else
|
||||
{{ Form::text('confirm_purge', Request::old('confirm_purge'), array('class' => 'form-control')) }}
|
||||
@endif
|
||||
{!! $errors->first('ldap_version', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-danger">{{ trans('admin/settings/general.purge') }}</button>
|
||||
<button type="submit" class="btn btn-danger" {{ (config('app.lock_passwords')===true) ? ' disabled' : '' }}>{{ trans('admin/settings/general.purge') }}</button>
|
||||
</div> <!--/box-footer-->
|
||||
{{ Form::close() }}
|
||||
</div> <!--/.box-solid-->
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_enabled_warning') }}</p>
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
{!! $errors->first('two_factor_enabled', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@@ -127,7 +127,7 @@
|
||||
<!-- Enable Remote User Login -->
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{{ Form::checkbox('login_remote_user_enabled', '1', old('login_remote_user_enabled', $setting->login_remote_user_enabled),array('class' => 'minimal', 'aria-label'=>'login_remote_user')) }}
|
||||
{{ Form::label('login_remote_user_enabled', trans('admin/settings/general.login_remote_user_enabled_text')) }}
|
||||
|
||||
@@ -47,32 +47,36 @@
|
||||
</p>
|
||||
|
||||
|
||||
<div class="col-md-11 col-md-offset-1" style="border-top: 0px;">
|
||||
<div class="col-md-12" style="border-top: 0px;">
|
||||
|
||||
|
||||
<!-- slack endpoint -->
|
||||
<div class="form-group {{ $errors->has('slack_endpoint') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group required {{ $errors->has('slack_endpoint') ? 'error' : '' }}">
|
||||
<div class="col-md-2">
|
||||
{{ Form::label('slack_endpoint', trans('admin/settings/general.slack_endpoint')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-10">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('slack_endpoint', Request::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX')) }}
|
||||
{{ Form::text('slack_endpoint', Request::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX', 'id' => 'slack_endpoint')) }}
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
|
||||
@else
|
||||
{{ Form::text('slack_endpoint', Request::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX')) }}
|
||||
{{ Form::text('slack_endpoint', Request::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX', 'id' => 'slack_endpoint')) }}
|
||||
@endif
|
||||
{!! $errors->first('slack_endpoint', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- slack channel -->
|
||||
<div class="form-group {{ $errors->has('slack_channel') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group required {{ $errors->has('slack_channel') ? 'error' : '' }}">
|
||||
<div class="col-md-2">
|
||||
{{ Form::label('slack_channel', trans('admin/settings/general.slack_channel')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-10">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('slack_channel', Request::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','disabled'=>'disabled','placeholder' => '#IT-Ops')) }}
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
|
||||
@else
|
||||
{{ Form::text('slack_channel', Request::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','placeholder' => '#IT-Ops')) }}
|
||||
@endif
|
||||
@@ -81,13 +85,15 @@
|
||||
</div>
|
||||
|
||||
<!-- slack botname -->
|
||||
<div class="form-group {{ $errors->has('slack_botname') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group required {{ $errors->has('slack_botname') ? 'error' : '' }}">
|
||||
<div class="col-md-2">
|
||||
{{ Form::label('slack_botname', trans('admin/settings/general.slack_botname')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-10">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('slack_botname', Request::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'Snipe-Bot')) }}
|
||||
<p class="text-warning"><i class="fa fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
|
||||
@else
|
||||
{{ Form::text('slack_botname', Request::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','placeholder' => 'Snipe-Bot')) }}
|
||||
@endif
|
||||
@@ -95,25 +101,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (($setting->slack_channel!='') && ($setting->slack_endpoint))
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('est_slack', 'Test Slack') }}
|
||||
<div class="form-group" id="slacktestcontainer" style="display: none">
|
||||
<div class="col-md-2">
|
||||
{{ Form::label('test_slack', 'Test Slack') }}
|
||||
</div>
|
||||
<div class="col-md-8" id="slacktestrow">
|
||||
<div class="col-md-10" id="slacktestrow">
|
||||
<a class="btn btn-default btn-sm pull-left" id="slacktest" style="margin-right: 10px;">Test <i class="fa fa-slack"></i> Integration</a>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<div class="col-md-10 col-md-offset-2">
|
||||
<span id="slacktesticon"></span>
|
||||
<span id="slacktestresult"></span>
|
||||
<span id="slackteststatus"></span>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<p class="help-block">{{ trans('admin/settings/general.slack_test_help') }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</div> <!--/-->
|
||||
</div> <!--/.box-body-->
|
||||
<div class="box-footer">
|
||||
@@ -121,7 +123,7 @@
|
||||
<a class="btn btn-link text-left" href="{{ route('settings.index') }}">{{ trans('button.cancel') }}</a>
|
||||
</div>
|
||||
<div class="text-right col-md-6">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
<button type="submit" id="save_slack" class="btn btn-primary" disabled><i class="fa fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -133,9 +135,32 @@
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@push('js')
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
var fieldcheck = function (event) {
|
||||
if($('#slack_endpoint').val() != "" && $('#slack_channel').val() != "" && $('#slack_botname').val() != "") {
|
||||
//enable test button *only* if all three fields are filled in
|
||||
$('#slacktestcontainer').fadeIn(500);
|
||||
} else {
|
||||
//otherwise it's hidden
|
||||
$('#slacktestcontainer').fadeOut(500);
|
||||
}
|
||||
|
||||
if(event) { //on 'initial load' we don't *have* an 'event', but in the regular keyup callback, we *do*. So this only fires on 'real' callback events, not on first load
|
||||
if($('#slack_endpoint').val() == "" && $('#slack_channel').val() == "" && $('#slack_botname').val() == "") {
|
||||
// if all three fields are blank, the user may want to disable Slack integration; enable the Save button
|
||||
$('#save_slack').removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
fieldcheck(); //run our field-checker once on page-load to set the initial state correctly.
|
||||
|
||||
$('input:text').keyup(fieldcheck); // if *any* text field changes, we recalculate button states
|
||||
|
||||
|
||||
$("#slacktest").click(function() {
|
||||
|
||||
$("#slacktestrow").removeClass('text-success');
|
||||
$("#slacktestrow").removeClass('text-danger');
|
||||
$("#slackteststatus").removeClass('text-danger');
|
||||
@@ -149,21 +174,25 @@
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: {
|
||||
'ldaptest_user': $('#ldaptest_user').val(),
|
||||
'ldaptest_password': $('#ldaptest_password').val()
|
||||
'slack_endpoint': $('#slack_endpoint').val(),
|
||||
'slack_channel': $('#slack_channel').val(),
|
||||
'slack_botname': $('#slack_botname').val(),
|
||||
|
||||
},
|
||||
|
||||
dataType: 'json',
|
||||
|
||||
success: function (data) {
|
||||
$('#save_slack').removeAttr('disabled');
|
||||
$("#slacktesticon").html('');
|
||||
$("#slacktestrow").addClass('text-success');
|
||||
$("#slackteststatus").addClass('text-success');
|
||||
$("#slackteststatus").html('<i class="fa fa-check text-success"></i> Success! Check the {{ $setting->slack_channel}} channel for your test message');
|
||||
$("#slackteststatus").html('<i class="fa fa-check text-success"></i> Success! Check the ' + $('#slack_channel').val() + ' channel for your test message, and be sure to click SAVE below to store your settings.');
|
||||
},
|
||||
|
||||
error: function (data) {
|
||||
|
||||
|
||||
if (data.responseJSON) {
|
||||
var errors = data.responseJSON.message;
|
||||
} else {
|
||||
@@ -172,6 +201,7 @@
|
||||
|
||||
var error_text = '';
|
||||
|
||||
$('#save_slack').attr("disabled", true);
|
||||
$("#slacktesticon").html('');
|
||||
$("#slackteststatus").addClass('text-danger');
|
||||
$("#slacktesticon").html('<i class="fa fa-exclamation-triangle text-danger"></i>');
|
||||
@@ -202,8 +232,9 @@
|
||||
|
||||
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@stop
|
||||
@endpush
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
@if (($supplier->state!='') && ($supplier->country!='') && (config('services.google.maps_api_key')))
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 20px;">
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?center={{ urlencode($supplier->city.','.$supplier->city.' '.$supplier->state.' '.$supplier->country.' '.$supplier->zip) }}&size=500x300&maptype=roadmap&key={{ config('services.google.maps_api_key') }}" class="img-responsive img-thumbnail" alt="Map">
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?markers={{ urlencode($supplier->address.','.$supplier->city.' '.$supplier->state.' '.$supplier->country.' '.$supplier->zip) }}&size=500x300&maptype=roadmap&key={{ config('services.google.maps_api_key') }}" class="img-responsive img-thumbnail" alt="Map">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
'class' => 'form-inline',
|
||||
'id' => 'bulkForm']) }}
|
||||
|
||||
@if (Input::get('status')!='deleted')
|
||||
@if (request('status')!='deleted')
|
||||
@can('delete', \App\Models\User::class)
|
||||
<div id="toolbar">
|
||||
<label for="bulk_actions" class="sr-only">Bulk Actions</label>
|
||||
|
||||
@@ -262,30 +262,34 @@
|
||||
@endif
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('general.login_enabled') }}</td>
|
||||
<td>{{ ($user->activated=='1') ? trans('general.yes') : trans('general.no') }}</td>
|
||||
<td>
|
||||
{!! ($user->activated=='1') ? '<i class="fa fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fa fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
|
||||
</tr>
|
||||
@if ($user->ldap_import!='1')
|
||||
<tr>
|
||||
<td class="text-nowrap">LDAP</td>
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
<td>
|
||||
{!! ($user->ldap_import=='1') ? '<i class="fa fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fa fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($user->activated=='1')
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('admin/users/general.two_factor_active') }}</td>
|
||||
<td>{{ ($user->two_factor_active()) ? trans('general.yes') : trans('general.no') }}</td>
|
||||
<td>
|
||||
{!! ($user->two_factor_active()) ? '<i class="fa fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fa fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('admin/users/general.two_factor_enrolled') }}</td>
|
||||
<td class="two_factor_resetrow">
|
||||
<div class="row">
|
||||
<div class="col-md-1" id="two_factor_reset_toggle">
|
||||
{{ ($user->two_factor_active_and_enrolled()) ? trans('general.yes') : trans('general.no') }}
|
||||
{!! ($user->two_factor_active_and_enrolled()) ? '<i class="fa fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fa fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
|
||||
</div>
|
||||
|
||||
@if ((Auth::user()->isSuperUser()) && ($snipeSettings->two_factor_enabled!='0'))
|
||||
@if ((Auth::user()->isSuperUser()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!=''))
|
||||
<div class="col-md-11">
|
||||
<a class="btn btn-default btn-sm pull-left" id="two_factor_reset" style="margin-right: 10px;"> {{ trans('admin/settings/general.two_factor_reset') }}</a>
|
||||
<span id="two_factor_reseticon">
|
||||
@@ -366,90 +370,79 @@
|
||||
|
||||
<div class="tab-pane" id="asset">
|
||||
<!-- checked out assets table -->
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-md-2">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($user->assets)
|
||||
@foreach ($user->assets as $asset)
|
||||
<tr>
|
||||
<td>
|
||||
@if (($asset->model) && ($asset->physical=='1'))
|
||||
<a href="{{ route('models.show', $asset->model->id) }}">{{ $asset->model->name }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('view', $asset)
|
||||
<a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->asset_tag }}</a>
|
||||
@endcan
|
||||
</td>
|
||||
<td>{!! $asset->present()->nameUrl() !!}</td>
|
||||
<td class="hidden-print">
|
||||
@can('checkin', $asset)
|
||||
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@if($settings->show_assigned_assets)
|
||||
@foreach ($asset->assignedAssets as $asset)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($asset->physical=='1')
|
||||
<a href="{{ route('models.show', $asset->model->id) }}">{{ ' – '.$asset->model->name }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('view', $asset)
|
||||
<a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->asset_tag }}</a>
|
||||
@endcan
|
||||
</td>
|
||||
<td>{!! $asset->present()->nameUrl() !!}</td>
|
||||
<td class="hidden-print">
|
||||
@can('checkin', $asset)
|
||||
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<div class="table-responsive table-striped">
|
||||
<table
|
||||
data-click-to-select="true"
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="userAssetsListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="userAssetsListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-footer="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
data-toolbar="#toolbar"
|
||||
id="userAssetsListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.assets.index',['assigned_to' => e($user->id), 'assigned_type' => 'App\Models\User']) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-{{ str_slug($user->present()->fullName()) }}-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /asset -->
|
||||
|
||||
<div class="tab-pane" id="licenses">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<table
|
||||
data-cookie-id-table="userLicenseTable"
|
||||
data-id-table="userLicenseTable"
|
||||
id="userLicenseTable"
|
||||
data-search="true"
|
||||
data-pagination="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-footer="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
class="table table-striped snipe-table table-hover"
|
||||
data-export-options='{
|
||||
"fileName": "export-license-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
|
||||
}'>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-6">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->licenses as $license)
|
||||
<tr>
|
||||
<td>
|
||||
<td class="col-md-4">
|
||||
{!! $license->present()->nameUrl() !!}
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-md-4">
|
||||
@can('viewKeys', $license)
|
||||
{!! $license->present()->serialUrl() !!}
|
||||
@else
|
||||
------------
|
||||
@endcan
|
||||
</td>
|
||||
<td class="hidden-print">
|
||||
<td class="col-md-2">
|
||||
{!! $license->purchase_cost !!}
|
||||
</td>
|
||||
<td class="hidden-print col-md-2">
|
||||
@can('update', $license)
|
||||
<a href="{{ route('licenses.checkin', array('licenseSeatId'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||
@endcan
|
||||
@@ -463,10 +456,28 @@
|
||||
|
||||
<div class="tab-pane" id="accessories">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<table
|
||||
data-cookie-id-table="userAccessoryTable"
|
||||
data-id-table="userAccessoryTable"
|
||||
id="userAccessoryTable"
|
||||
data-search="true"
|
||||
data-pagination="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-footer="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
class="table table-striped snipe-table table-hover"
|
||||
data-export-options='{
|
||||
"fileName": "export-accessory-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -474,9 +485,12 @@
|
||||
@foreach ($user->accessories as $accessory)
|
||||
<tr>
|
||||
<td>{!!$accessory->present()->nameUrl()!!}</td>
|
||||
<td>
|
||||
{!! $accessory->purchase_cost !!}
|
||||
</td>
|
||||
<td class="hidden-print">
|
||||
@can('checkin', $accessory)
|
||||
<a href="{{ route('checkin/accessory', array('accessory_id'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||
<a href="{{ route('checkin/accessory', array('accessoryID'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@@ -488,10 +502,28 @@
|
||||
|
||||
<div class="tab-pane" id="consumables">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-striped">
|
||||
<table
|
||||
data-cookie-id-table="userConsumableTable"
|
||||
data-id-table="userConsumableTable"
|
||||
id="userConsumableTable"
|
||||
data-search="true"
|
||||
data-pagination="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-footer="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
class="table table-striped snipe-table table-hover"
|
||||
data-export-options='{
|
||||
"fileName": "export-consumable-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-8">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-6">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-2" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
<th class="col-md-4">{{ trans('general.date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -499,6 +531,9 @@
|
||||
@foreach ($user->consumables as $consumable)
|
||||
<tr>
|
||||
<td>{!! $consumable->present()->nameUrl() !!}</td>
|
||||
<td>
|
||||
{!! $consumable->purchase_cost !!}
|
||||
</td>
|
||||
<td>{{ $consumable->created_at }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
22
resources/views/vendor/mail/html/panel.blade.php
vendored
22
resources/views/vendor/mail/html/panel.blade.php
vendored
@@ -1,13 +1,13 @@
|
||||
<table class="panel" width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="panel-content">
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="panel-item">
|
||||
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="panel-content">
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="panel-item">
|
||||
{{ Illuminate\Mail\Markdown::parse($slot) }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
2
storage/framework/cache/data/.gitignore
vendored
2
storage/framework/cache/data/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
@@ -27,7 +27,6 @@ mix
|
||||
'./node_modules/ekko-lightbox/dist/ekko-lightbox.css',
|
||||
'./node_modules/bootstrap-table/dist/bootstrap-table.css',
|
||||
'./public/css/build/app.css',
|
||||
//'./resources/assets/css/lib/select2.css',
|
||||
'./node_modules/select2/dist/css/select2.css',
|
||||
'./public/css/build/overrides.css'
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user