mirror of
https://github.com/nasa/openmct.git
synced 2025-05-18 16:33:20 +00:00
[Forms] Use forms from DialogService
Use the mct-form when displaying a dialog for user input, replacing the placeholder textarea used prior to integration of the forms bundle. WTD-593.
This commit is contained in:
parent
2bee842509
commit
d0e29befa6
@ -12,7 +12,10 @@
|
|||||||
<div class="abs form outline editor">
|
<div class="abs form outline editor">
|
||||||
<div class='abs contents'>
|
<div class='abs contents'>
|
||||||
<!-- mct-include key="'form'" ng-model="" -->
|
<!-- mct-include key="'form'" ng-model="" -->
|
||||||
<textarea ng-model="ngModel.value"></textarea>
|
<mct-form ng-model="ngModel.value"
|
||||||
|
structure="ngModel.structure"
|
||||||
|
name="createForm">
|
||||||
|
</mct-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="abs bottom-bar">
|
<div class="abs bottom-bar">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*global define,Promise*/
|
/*global define*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module defining DialogService. Created by vwoeltje on 11/10/14.
|
* Module defining DialogService. Created by vwoeltje on 11/10/14.
|
||||||
@ -36,14 +36,8 @@ define(
|
|||||||
// overlay-dialog template and associated with a
|
// overlay-dialog template and associated with a
|
||||||
// OK button click
|
// OK button click
|
||||||
function confirm() {
|
function confirm() {
|
||||||
var resultingValue;
|
|
||||||
|
|
||||||
// Temporary workaround, in the absence of a
|
|
||||||
// forms package.
|
|
||||||
resultingValue = JSON.parse(overlayModel.value);
|
|
||||||
|
|
||||||
// Pass along the result
|
// Pass along the result
|
||||||
deferred.resolve(resultingValue);
|
deferred.resolve(overlayModel.value);
|
||||||
|
|
||||||
// Stop showing the dialog
|
// Stop showing the dialog
|
||||||
dismiss();
|
dismiss();
|
||||||
@ -73,8 +67,8 @@ define(
|
|||||||
overlayModel = {
|
overlayModel = {
|
||||||
title: formModel.name,
|
title: formModel.name,
|
||||||
message: formModel.message,
|
message: formModel.message,
|
||||||
formModel: formModel,
|
structure: formModel,
|
||||||
value: JSON.stringify(value),
|
value: value,
|
||||||
confirm: confirm,
|
confirm: confirm,
|
||||||
cancel: cancel
|
cancel: cancel
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user