mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 16:49:42 +00:00
Move duplicate fixes (#3947)
* Changed text of form labels; * Corrected case of "Location" in Duplicate action; * changed from objects.mutate to objects.save for duplicate action name change * handling cancel of move Co-authored-by: charlesh88 <charles.f.hacskaylo@nasa.gov>
This commit is contained in:
@ -37,7 +37,14 @@ export default class MoveAction {
|
||||
let oldParent = objectPath[1];
|
||||
let dialogService = this.openmct.$injector.get('dialogService');
|
||||
let dialogForm = this.getDialogForm(object, oldParent);
|
||||
let userInput = await dialogService.getUserInput(dialogForm, { name: object.name });
|
||||
let userInput;
|
||||
|
||||
try {
|
||||
userInput = await dialogService.getUserInput(dialogForm, { name: object.name });
|
||||
} catch (err) {
|
||||
// user canceled, most likely
|
||||
return;
|
||||
}
|
||||
|
||||
// if we need to update name
|
||||
if (object.name !== userInput.name) {
|
||||
@ -104,13 +111,13 @@ export default class MoveAction {
|
||||
{
|
||||
key: "name",
|
||||
control: "textfield",
|
||||
name: "Folder Name",
|
||||
name: "Name",
|
||||
pattern: "\\S+",
|
||||
required: true,
|
||||
cssClass: "l-input-lg"
|
||||
},
|
||||
{
|
||||
name: "location",
|
||||
name: "Location",
|
||||
control: "locator",
|
||||
validate: this.validate(object, parent),
|
||||
key: 'location'
|
||||
|
Reference in New Issue
Block a user