mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +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 contents'>
|
||||
<!-- 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 class="abs bottom-bar">
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*global define,Promise*/
|
||||
/*global define*/
|
||||
|
||||
/**
|
||||
* Module defining DialogService. Created by vwoeltje on 11/10/14.
|
||||
@ -36,14 +36,8 @@ define(
|
||||
// overlay-dialog template and associated with a
|
||||
// OK button click
|
||||
function confirm() {
|
||||
var resultingValue;
|
||||
|
||||
// Temporary workaround, in the absence of a
|
||||
// forms package.
|
||||
resultingValue = JSON.parse(overlayModel.value);
|
||||
|
||||
// Pass along the result
|
||||
deferred.resolve(resultingValue);
|
||||
deferred.resolve(overlayModel.value);
|
||||
|
||||
// Stop showing the dialog
|
||||
dismiss();
|
||||
@ -73,8 +67,8 @@ define(
|
||||
overlayModel = {
|
||||
title: formModel.name,
|
||||
message: formModel.message,
|
||||
formModel: formModel,
|
||||
value: JSON.stringify(value),
|
||||
structure: formModel,
|
||||
value: value,
|
||||
confirm: confirm,
|
||||
cancel: cancel
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user