[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:
Victor Woeltjen 2014-12-03 12:32:00 -08:00
parent 2bee842509
commit d0e29befa6
2 changed files with 8 additions and 11 deletions

View File

@ -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">

View File

@ -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
};