mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge branch 'v3' of github.com:snipe/snipe-it into v3
# Conflicts: # app/Models/Ldap.php
This commit is contained in:
commit
13d250f095
|
@ -341,7 +341,7 @@ class ObjectImportCommand extends Command
|
||||||
$this->log('Asset Model ' . $asset_model_name . ' with model number ' . $asset_modelno . ' was created');
|
$this->log('Asset Model ' . $asset_model_name . ' with model number ' . $asset_modelno . ' was created');
|
||||||
return $asset_model;
|
return $asset_model;
|
||||||
} else {
|
} else {
|
||||||
$this->jsonError('Asset Model ' . $asset_model_name, $asset_model->getErrors());
|
$this->jsonError('Asset Model "' . $asset_model_name . '"', $asset_model->getErrors());
|
||||||
return $asset_model;
|
return $asset_model;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -388,7 +388,7 @@ class ObjectImportCommand extends Command
|
||||||
$this->log('Category ' . $asset_category . ' was created');
|
$this->log('Category ' . $asset_category . ' was created');
|
||||||
return $category;
|
return $category;
|
||||||
} else {
|
} else {
|
||||||
$this->jsonError('Category '. $asset_category, $category->getErrors());
|
$this->jsonError('Category "'. $asset_category. '"', $category->getErrors());
|
||||||
return $category;
|
return $category;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -463,7 +463,7 @@ class ObjectImportCommand extends Command
|
||||||
$this->log('Status ' . $asset_statuslabel_name . ' was created');
|
$this->log('Status ' . $asset_statuslabel_name . ' was created');
|
||||||
return $status;
|
return $status;
|
||||||
} else {
|
} else {
|
||||||
$this->jsonError('Status '. $asset_statuslabel_name, $status->getErrors());
|
$this->jsonError('Status "'. $asset_statuslabel_name . '"', $status->getErrors());
|
||||||
return $status;
|
return $status;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -512,7 +512,7 @@ class ObjectImportCommand extends Command
|
||||||
$this->log('Manufacturer ' . $manufacturer->name . ' was created');
|
$this->log('Manufacturer ' . $manufacturer->name . ' was created');
|
||||||
return $manufacturer;
|
return $manufacturer;
|
||||||
} else {
|
} else {
|
||||||
$this->jsonError('Manufacturer '. $manufacturer->name, $manufacturer->getErrors());
|
$this->jsonError('Manufacturer "'. $manufacturer->name . '"', $manufacturer->getErrors());
|
||||||
return $manufacturer;
|
return $manufacturer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ class ObjectImportCommand extends Command
|
||||||
if ($user->save()) {
|
if ($user->save()) {
|
||||||
$this->log('User '.$first_name.' created');
|
$this->log('User '.$first_name.' created');
|
||||||
} else {
|
} else {
|
||||||
$this->jsonError('User', $user->getErrors());
|
$this->jsonError('User "' . $first_name . '"', $user->getErrors());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -184,7 +184,6 @@ class Ldap extends Model
|
||||||
|
|
||||||
// Create user from LDAP data
|
// Create user from LDAP data
|
||||||
if (!empty($item["username"])) {
|
if (!empty($item["username"])) {
|
||||||
|
|
||||||
$user = new User;
|
$user = new User;
|
||||||
$user->first_name = $item["firstname"];
|
$user->first_name = $item["firstname"];
|
||||||
$user->last_name = $item["lastname"];
|
$user->last_name = $item["lastname"];
|
||||||
|
|
|
@ -137,13 +137,13 @@
|
||||||
// We use this instead of the fail option, since our API
|
// We use this instead of the fail option, since our API
|
||||||
// returns a 200 OK status which always shows as "success"
|
// returns a 200 OK status which always shows as "success"
|
||||||
|
|
||||||
if (data && data.jqXHR.responseJSON.error && data.jqXHR.responseJSON && data.jqXHR.responseJSON.error) {
|
if (data && data.jqXHR.responseJSON && data.jqXHR.responseJSON.error) {
|
||||||
$('#progress-bar-text').html(data.jqXHR.responseJSON.error);
|
$('#progress-bar-text').html(data.jqXHR.responseJSON.error);
|
||||||
$('.progress-bar').removeClass('progress-bar-warning').addClass('progress-bar-danger').css('width','100%');
|
$('.progress-bar').removeClass('progress-bar-warning').addClass('progress-bar-danger').css('width','100%');
|
||||||
$('.progress-checkmark').fadeIn('fast').html('<i class="fa fa-times fa-3x icon-white" style="color: #d9534f"></i>');
|
$('.progress-checkmark').fadeIn('fast').html('<i class="fa fa-times fa-3x icon-white" style="color: #d9534f"></i>');
|
||||||
//console.log(data.jqXHR.responseJSON.error);
|
//console.log(data.jqXHR.responseJSON.error);
|
||||||
} else {
|
} else {
|
||||||
$('.progress-bar').removeClass('progress-bar-warning').addClass('progress-bar-success').css('width','100%');
|
$('.progress-bar').removeClass('progress-bar-warning').removeClass('progress-bar-danger').addClass('progress-bar-success').css('width','100%');
|
||||||
$('.progress-checkmark').fadeIn('fast');
|
$('.progress-checkmark').fadeIn('fast');
|
||||||
$('#progress-container').delay(950).css('visibility', 'visible');
|
$('#progress-container').delay(950).css('visibility', 'visible');
|
||||||
$('.progress-bar-text').html('Finished!');
|
$('.progress-bar-text').html('Finished!');
|
||||||
|
|
Loading…
Reference in a new issue