got everything to work
This commit is contained in:
parent
2e5ccc9869
commit
60aef4204b
|
@ -119,15 +119,18 @@ var FormSchema = new Schema({
|
||||||
colors:{
|
colors:{
|
||||||
backgroundColor: {
|
backgroundColor: {
|
||||||
type: String,
|
type: String,
|
||||||
match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/]
|
match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/],
|
||||||
|
default: '#fff'
|
||||||
},
|
},
|
||||||
questionColor: {
|
questionColor: {
|
||||||
type: String,
|
type: String,
|
||||||
match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/]
|
match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/],
|
||||||
|
default: '#333',
|
||||||
},
|
},
|
||||||
answerColor: {
|
answerColor: {
|
||||||
type: String,
|
type: String,
|
||||||
match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/]
|
match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/],
|
||||||
|
default: '#333',
|
||||||
},
|
},
|
||||||
buttonColor: {
|
buttonColor: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
"angular-busy": "~4.1.3",
|
"angular-busy": "~4.1.3",
|
||||||
"angular-permission": "~0.3.1",
|
"angular-permission": "~0.3.1",
|
||||||
"angular-input-stars": "*",
|
"angular-input-stars": "*",
|
||||||
"file-saver.js": "~1.20150507.2"
|
"file-saver.js": "~1.20150507.2",
|
||||||
|
"angular-bootstrap-colorpicker": "~3.0.19"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"angular": "~1.3.17"
|
"angular": "~1.3.17"
|
||||||
|
|
|
@ -62,8 +62,6 @@ angular.module(ApplicationConfiguration.applicationModuleName).run(['$rootScope'
|
||||||
Auth.ensureHasCurrentUser(User);
|
Auth.ensureHasCurrentUser(User);
|
||||||
user = Auth.currentUser;
|
user = Auth.currentUser;
|
||||||
|
|
||||||
console.log(user.roles);
|
|
||||||
|
|
||||||
if(user){
|
if(user){
|
||||||
authenticator = new Authorizer(user);
|
authenticator = new Authorizer(user);
|
||||||
console.log('access denied: '+!authenticator.canAccess(permissions));
|
console.log('access denied: '+!authenticator.canAccess(permissions));
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
border-width:3px;
|
border-width:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
section.public-form {
|
||||||
|
margin-top: -70px;
|
||||||
|
}
|
||||||
|
|
||||||
section.content p.breakwords {
|
section.content p.breakwords {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
@ -120,20 +124,20 @@ form .row.field {
|
||||||
padding: 0.45em 0.9em;
|
padding: 0.45em 0.9em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 160%;
|
line-height: 160%;
|
||||||
border: 2px dashed #ddd;
|
border: 3px dashed #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
form .field-input > input.hasDatepicker{
|
form .field-input > input.hasDatepicker{
|
||||||
padding: 0.45em 0.9em;
|
padding: 0.45em 0.9em;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
line-height: 160%;
|
line-height: 160%;
|
||||||
border: 2px dashed #ddd;
|
border: 3px dashed #ddd;
|
||||||
}
|
}
|
||||||
form .field-input > input.text-field-input{
|
form .field-input > input.text-field-input{
|
||||||
padding: 0.45em 0.9em;
|
padding: 0.45em 0.9em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 160%;
|
line-height: 160%;
|
||||||
border: 2px dashed #ddd;
|
border: 3px dashed #ddd;
|
||||||
}
|
}
|
||||||
form .field-input > input.text-field-input:focus{
|
form .field-input > input.text-field-input:focus{
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
|
@ -67,7 +67,8 @@ angular.module('forms').directive('fieldDirective', ['$templateCache', '$http',
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
field: '=',
|
field: '=',
|
||||||
required: '&'
|
required: '&',
|
||||||
|
design: '='
|
||||||
},
|
},
|
||||||
link: linker
|
link: linker
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Use Application configuration module to register a new module
|
// Use Application configuration module to register a new module
|
||||||
ApplicationConfiguration.registerModule('forms', ['ngFileUpload', 'ui.date', 'ui.sortable', 'angular-input-stars', 'users']);
|
ApplicationConfiguration.registerModule('forms', ['ngFileUpload', 'colorpicker.module', 'ui.date', 'ui.sortable', 'angular-input-stars', 'users']);
|
|
@ -70,10 +70,75 @@
|
||||||
<edit-form-directive myform="myform">
|
<edit-form-directive myform="myform">
|
||||||
</edit-form-directive>
|
</edit-form-directive>
|
||||||
</tab>
|
</tab>
|
||||||
<tab disabled="true">
|
<tab>
|
||||||
<tab-heading >
|
<tab-heading >
|
||||||
Edit Design
|
Design
|
||||||
</tab-heading>
|
</tab-heading>
|
||||||
|
<div class="config-form container">
|
||||||
|
<!-- Design Settings -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 container">
|
||||||
|
<!-- Title -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h2 class="hidden-sm hidden-xs">Change how your Form Looks</h2>
|
||||||
|
<h3 class="hidden-lg hidden-md">Change how your Form Looks</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Background Color -->
|
||||||
|
<div class="row field">
|
||||||
|
<div class="field-title col-sm-6">
|
||||||
|
<h5>Form Background Color</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-input col-sm-6">
|
||||||
|
|
||||||
|
<input colorpicker="hex" type="text" ng-model="myform.design.colors.backgroundColor" ng-style="{ 'background-color': myform.design.colors.backgroundColor }"/>
|
||||||
|
|
||||||
|
<!-- <span class="required-error" ng-show="field.required && !field.fieldValue">* required</span> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Question Color -->
|
||||||
|
<div class="row field">
|
||||||
|
<div class="field-title col-sm-6">
|
||||||
|
<h5>Question Color</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-input col-sm-6">
|
||||||
|
|
||||||
|
<input colorpicker="hex" type="text" ng-model="myform.design.colors.questionColor" ng-style="{ 'background-color': myform.design.colors.questionColor }"/>
|
||||||
|
|
||||||
|
<!-- <span class="required-error" ng-show="field.required && !field.fieldValue">* required</span> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Answer Color -->
|
||||||
|
<div class="row field">
|
||||||
|
<div class="field-title col-sm-6">
|
||||||
|
<h5>Form Answer Color</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-input col-sm-6">
|
||||||
|
|
||||||
|
<input colorpicker="hex" type="text" ng-model="myform.design.colors.answerColor" ng-style="{ 'background-color': myform.design.colors.answerColor }"/>
|
||||||
|
|
||||||
|
<!-- <span class="required-error" ng-show="field.required && !field.fieldValue">* required</span> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-offset-4 col-sm-2">
|
||||||
|
<button class="btn btn-primary btn-large" type="button" ng-click="update(false, null)"><i class="icon-arrow-left icon-white"></i> Save Changes</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-1">
|
||||||
|
<button class="btn btn-default" type="button" ng-click="resetForm()"><i class="icon-eye-open icon-white"></i> Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</tab>
|
</tab>
|
||||||
<tab>
|
<tab>
|
||||||
<tab-heading>
|
<tab-heading>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<div ng-repeat="option in field.fieldOptions" class="row-fluid">
|
<div ng-repeat="option in field.fieldOptions" class="row-fluid">
|
||||||
<label class="btn btn-info col-xs-3">
|
<label class="btn btn-info col-xs-3">
|
||||||
<input ng-focus="setActiveField(field._id)"
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor}"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
value="{{option.option_id}}"
|
value="{{option.option_id}}"
|
||||||
ng-model="field.fieldValue"
|
ng-model="field.fieldValue"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="field row" ng-click="setActiveField(field._id)">
|
<div class="field row" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title">
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fa fa-angle-double-right"></span>
|
<span class="fa fa-angle-double-right"></span>
|
||||||
{{field.title}}
|
{{field.title}}
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<div class="control-group input-append">
|
<div class="control-group input-append">
|
||||||
<input ng-focus="setActiveField(field._id)"ui-date="dateOptions" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled">
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" ui-date="dateOptions" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="field row dropdown" ng-click="setActiveField(field._id)" ng-if="field.fieldOptions.length > 0">
|
<div class="field row dropdown" ng-click="setActiveField(field._id)" ng-if="field.fieldOptions.length > 0">
|
||||||
<div class="col-xs-12 field-title">
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fa fa-angle-double-right"></span>
|
<span class="fa fa-angle-double-right"></span>
|
||||||
{{field.title}}
|
{{field.title}}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="field row" ng-click="setActiveField(field._id)">
|
class="col-xs-12 field-title"<div class="field row" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<input ng-focus="setActiveField(field._id)"type="email"
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" type="email"
|
||||||
class="text-field-input"
|
class="text-field-input"
|
||||||
placeholder="email@example.com"
|
placeholder="email@example.com"
|
||||||
value="{{field.fieldValue}}"
|
value="{{field.fieldValue}}"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<input ng-focus="setActiveField(field._id)" type="hidden" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" value="{{field.fieldValue}}" ng-disabled="field.disabled">
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" type="hidden" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" value="{{field.fieldValue}}" ng-disabled="field.disabled">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="field row radio legal" ng-click="setActiveField(field._id)">
|
<div class="field row radio legal" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title">
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}">
|
||||||
<h3>{{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3>
|
<h3>{{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3>
|
||||||
<br>
|
<br>
|
||||||
<p style="color:#ddd;">{{field.description}}</p>
|
<p style="color:#ddd;">{{field.description}}</p>
|
||||||
|
@ -7,11 +7,11 @@
|
||||||
<div class="col-xs-6 field-input container">
|
<div class="col-xs-6 field-input container">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<label class="btn col-xs-4">
|
<label class="btn col-xs-4">
|
||||||
<input ng-focus="setActiveField(field._id)"type="radio" value="true" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" type="radio" value="true" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
||||||
<span> I accept </span>
|
<span> I accept </span>
|
||||||
</label>
|
</label>
|
||||||
<label class="btn col-xs-5 col-xs-offset-1">
|
<label class="btn col-xs-5 col-xs-offset-1">
|
||||||
<input ng-focus="setActiveField(field._id)"type="radio" value="false" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" type="radio" value="false" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
||||||
<span>I don't accept </span>
|
<span>I don't accept </span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="field row" ng-click="setActiveField(field._id)">
|
<div class="field row" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<input ng-focus="setActiveField(field._id)"type="url" class="text-field-input" placeholder="https://example.com/something" value="{{field.fieldValue}}" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" type="url" class="text-field-input" placeholder="https://example.com/something" value="{{field.fieldValue}}" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="field row textfield natural" ng-click="setActiveField(field._id)">
|
<div class="field row textfield natural" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<input ng-focus="setActiveField(field._id)"type="text"
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" type="text"
|
||||||
class="text-field-input"
|
class="text-field-input"
|
||||||
ng-model="field.fieldValue"
|
ng-model="field.fieldValue"
|
||||||
ng-model-options="{ debounce: 250 }"
|
ng-model-options="{ debounce: 250 }"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="field row" ng-click="setActiveField(field._id)">
|
<div class="field row" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<input ng-focus="setActiveField(field._id)"type="number" class="text-field-input" placeholder="" value="{{field.fieldValue}}" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" type="number" class="text-field-input" placeholder="" value="{{field.fieldValue}}" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="field row" ng-click="setActiveField(field._id)">
|
<div class="field row" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<input ng-focus="setActiveField(field._id)"type="password" class="text-field-input" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" value="{{field.fieldValue}}" ng-required="field.required" ng-disabled="field.disabled">
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}" type="password" class="text-field-input" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" value="{{field.fieldValue}}" ng-required="field.required" ng-disabled="field.disabled">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="field row radio" ng-click="setActiveField(field._id)" ng-if="field.fieldOptions.length > 0">
|
<div class="field row radio" ng-click="setActiveField(field._id)" ng-if="field.fieldOptions.length > 0">
|
||||||
<div class="col-xs-12 field-title"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<div ng-repeat="option in field.fieldOptions" class="row-fluid">
|
<div ng-repeat="option in field.fieldOptions" class="row-fluid">
|
||||||
<label class="btn col-xs-3" ng-class="{activeBtn: field.fieldValue == field.fieldOptions[$index].option_id}">
|
<label class="btn col-xs-3" ng-class="{activeBtn: field.fieldValue == field.fieldOptions[$index].option_id}">
|
||||||
<input ng-focus="setActiveField(field._id)"
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="{{option.option_value}}"
|
value="{{option.option_value}}"
|
||||||
ng-model="field.fieldValue"
|
ng-model="field.fieldValue"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="textfield field row" ng-click="setActiveField(field._id)">
|
<div class="textfield field row" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title">
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fa fa-angle-double-right"></span>
|
<span class="fa fa-angle-double-right"></span>
|
||||||
{{field.title}}
|
{{field.title}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="field row" ng-click="setActiveField(field._id)">
|
<div class="field row" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}"><h3><span class="fa fa-angle-double-right"></span> {{field.title}} <span class="required-error" ng-show="field.required && !field.fieldValue">*(required)</span></h3></div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<textarea type="text" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" value="{{field.fieldValue}}" ng-required="field.required" ng-disabled="field.disabled"></textarea>
|
<textarea type="text" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" value="{{field.fieldValue}}" ng-required="field.required" ng-disabled="field.disabled"></textarea>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="textfield field row" ng-click="setActiveField(field._id)">
|
<div class="textfield field row" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title">
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}" ng-style="{'color': design.colors.questionColor}">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fa fa-angle-double-right"></span> {{field.title}}
|
<span class="fa fa-angle-double-right"></span> {{field.title}}
|
||||||
<span class="required-error" ng-show="field.required && !field.fieldValue">
|
<span class="required-error" ng-show="field.required && !field.fieldValue">
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<input ng-focus="setActiveField(field._id)"
|
<input ng-focus="setActiveField(field._id)" ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}"
|
||||||
type="text"
|
type="text"
|
||||||
class="text-field-input"
|
class="text-field-input"
|
||||||
ng-model="field.fieldValue"
|
ng-model="field.fieldValue"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="field row radio" ng-click="setActiveField(field._id)">
|
<div class="field row radio" ng-click="setActiveField(field._id)">
|
||||||
<div class="col-xs-12 field-title">
|
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}">
|
||||||
<h3 class="row">
|
<h3 class="row">
|
||||||
<span class="fa fa-angle-double-right"></span> {{field.title}}
|
<span class="fa fa-angle-double-right"></span> {{field.title}}
|
||||||
<span class="required-error" ng-show="field.required && !field.fieldValue">
|
<span class="required-error" ng-show="field.required && !field.fieldValue">
|
||||||
|
@ -14,12 +14,12 @@
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<label class="btn btn-success col-xs-3">
|
<label class="btn btn-success col-xs-3">
|
||||||
<input ng-focus="setActiveField(field._id)"type="radio" value="true" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled" ng-init="field.fieldValue = true"/>
|
<input ng-focus="setActiveField(field._id)" type="radio" value="true" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled" ng-init="field.fieldValue = true"/>
|
||||||
<span>Yes</span>
|
<span>Yes</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="btn btn-danger col-xs-3">
|
<label class="btn btn-danger col-xs-3">
|
||||||
<input ng-focus="setActiveField(field._id)"type="radio" value="false" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
<input ng-focus="setActiveField(field._id)" type="radio" value="false" ng-model="field.fieldValue" ng-model-options="{ debounce: 250 }" ng-required="field.required" ng-disabled="field.disabled"/>
|
||||||
<span>No</span>
|
<span>No</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -146,12 +146,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row field" ng-if="oscarhostAPI">
|
<div class="row field" ng-if="oscarhostAPI">
|
||||||
<div class="field-title col-sm-4">
|
<div class="field-title col-sm-4">
|
||||||
<h5>Oscarhost API update type</h5>
|
<h5>Oscarhost API Update Type</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select ng-model="myform.plugins.oscarhost.settings.updateType">
|
<select ng-model="myform.plugins.oscarhost.settings.updateType">
|
||||||
<option ng-repeat="updateType in myform.plugins.oscarhost.settings.validUpdateTypes" ng-value="updateType">
|
<option ng-repeat="updateType in myform.plugins.oscarhost.settings.validUpdateTypes" ng-selected="myform.plugins.oscarhost.settings.updateType == updateType" ng-value="updateType">
|
||||||
{{updateType}}
|
{{updateType}}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -159,8 +159,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- generate typeform from NodeForm yes/no field -->
|
<!-- Generate typeform from NodeForm yes/no field -->
|
||||||
<div class="row field">
|
<!-- <div class="row field">
|
||||||
<div class="col-sm-6 field-title">
|
<div class="col-sm-6 field-title">
|
||||||
<h5>Autogenerate into Typeform?</h5>
|
<h5>Autogenerate into Typeform?</h5>
|
||||||
</div>
|
</div>
|
||||||
|
@ -196,7 +196,7 @@
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<span type="text" ng-bind="myform.Typeform.url"></span>
|
<span type="text" ng-bind="myform.Typeform.url"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- !!!!!!DAVID: TODO: Finish this so we can upload pdfFieldMap!!!!!!!!! -->
|
<!-- !!!!!!DAVID: TODO: Finish this so we can upload pdfFieldMap!!!!!!!!! -->
|
||||||
|
|
|
@ -52,10 +52,10 @@
|
||||||
<!-- <entryPage pageData="myform.startPage" pageType="startPage"></entryPage> -->
|
<!-- <entryPage pageData="myform.startPage" pageType="startPage"></entryPage> -->
|
||||||
<div class="field row text-center">
|
<div class="field row text-center">
|
||||||
<div class="col-xs-12 text-center">
|
<div class="col-xs-12 text-center">
|
||||||
<h1>{{pageData.introTitle}}</h1>
|
<h1>{{myform.startPage.introTitle}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-10 col-xs-offset-1 text-left">
|
<div class="col-xs-10 col-xs-offset-1 text-left">
|
||||||
<p style="color:#ddd;">{{pageData.introParagraph}}</p>
|
<p style="color:#ddd;">{{myform.startPage.introParagraph}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em;">
|
<div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em;">
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
<div class="panel panel-default" style="border-style: dashed; border-color: #a9a9a9;">
|
<div class="panel panel-default" style="border-style: dashed; border-color: #a9a9a9;">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h4 class="panel-title text-center" style="color: #a9a9a9;">
|
<h4 class="panel-title text-center" style="color: #a9a9a9;">
|
||||||
Drag and Drop new fields here
|
Click on Fields to add them here
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
<th data-ng-repeat="(key, value) in myform.form_fields">
|
<th data-ng-repeat="(key, value) in myform.form_fields">
|
||||||
{{value.title}}
|
{{value.title}}
|
||||||
</th>
|
</th>
|
||||||
|
<th ng-if="myform.plugins.oscarhost.baseUrl">
|
||||||
|
OscarEMR User Profile
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Percentage Complete
|
Percentage Complete
|
||||||
</th>
|
</th>
|
||||||
|
@ -60,6 +63,11 @@
|
||||||
<td data-ng-repeat="(key, value) in row.form_fields">
|
<td data-ng-repeat="(key, value) in row.form_fields">
|
||||||
{{value.fieldValue}}
|
{{value.fieldValue}}
|
||||||
</td>
|
</td>
|
||||||
|
<td ng-if="myform.plugins.oscarhost.baseUrl">
|
||||||
|
<a href="{{myform.plugins.oscarhost.baseUrl.split('ws')[0]}}demographic/demographiccontrol.jsp?demographic_no={{row.oscarDemoNum}}&displaymode=edit">
|
||||||
|
User Profile #{{row.oscarDemoNum}}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{row.percentageComplete}}%
|
{{row.percentageComplete}}%
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<form name="myForm" class="submission-form col-sm-12 col-md-offset-1 col-md-10">
|
<form name="myForm" class="submission-form col-sm-12 col-md-offset-1 col-md-10">
|
||||||
<div ng-repeat="field in myform.form_fields" ng-if="!field.deletePreserved" ng-class="{activeField: selected == field._id }" class="row field-directive">
|
<div ng-repeat="field in myform.form_fields" ng-if="!field.deletePreserved" ng-class="{activeField: selected == field._id }" class="row field-directive">
|
||||||
<field-directive field="field">
|
<field-directive field="field" design="myform.design">
|
||||||
</field-directive>
|
</field-directive>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="title-row row">
|
<div class="title-row row">
|
||||||
<div class="col-xs-5 field-title text-left"> Name </div>
|
<div class="col-xs-5 field-title text-left"> Name </div>
|
||||||
<div class="col-xs-12 field-input">
|
<div class="col-xs-12 field-input">
|
||||||
<input type="text" name="title" required ng-pattern="/^[a-zA-Z0-9 \-.]*$/" ng-minlength="4"/>
|
<input type="text" name="title" required ng-model="formTitle" ng-pattern="/^[a-zA-Z0-9 \-.]*$/" ng-minlength="4"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="details-row row">
|
<div class="details-row row">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<section class="public-form">
|
<section class="public-form" ng-style="{ 'background-color': myform.design.colors.backgroundColor }">
|
||||||
|
|
||||||
<submit-form-directive myform="myform"></submit-form-directive>
|
<submit-form-directive myform="myform"></submit-form-directive>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue