tellform/public/modules/forms/views/directiveViews/form/submit-form.client.view.html
2015-11-10 22:15:59 -08:00

93 lines
4.7 KiB
HTML
Executable file

<div cg-busy="{promise:submitPromise,message:'Submitting form...',backdrop:true}"></div>
<section class="overlay submitform" ng-if="selected.index" ng-click="hideOverlay()"></section>
<div ng-show="!myform.submitted && myform.startPage.showStart" class="form-submitted">
<div class="field row text-center">
<div class="col-xs-12 text-center">
<h1>{{myform.startPage.introTitle}}</h1>
</div>
<div class="col-xs-10 col-xs-offset-1 text-left">
<p style="color:#ddd;">{{myform.startPage.introParagraph}}</p>
</div>
</div>
<div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em;">
<p ng-repeat="button in myform.startPage.buttons" class="text-center" style="display:inline;">
<button class="btn btn-info" type="button" ng-style="{'background-color':button.bgColor, 'color':button.color}">
<a href="{{button.url}}" style="font-size: 1.6em; text-decoration: none; color: inherit;" >
{{button.text}}
</a>
</button>
</p>
</div>
<div class="row form-actions">
<!-- <p class="col-sm-2 col-sm-offset-5"> -->
<button class="btn btn-info col-sm-4 col-sm-offset-4" type="button">
<a ng-click="exitStartPage()" style="color:white; font-size: 1.6em; text-decoration: none;">Continue to Form</a>
</button>
<!-- </p> -->
</div>
</div>
<div ng-show="!myform.submitted && !myform.startPage.showStart" data-ng-init="initFocus()">
<div class="field row" style="padding-bottom:5em;">
<div class="col-sm-10 col-sm-offset-1">
<h1>{{ myform.title }} <span style="font-size:0.8em; color: #bbb;" ng-if="!myform.isLive">(private preview)</span></h1>
<hr>
</div>
</div>
<div class="row">
<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._id == field._id }" class="row field-directive">
<field-directive field="field" design="myform.design" index="$index" focus-on="selected._id == field._id">
</field-directive>
</div>
</form>
</div>
<hr>
<div class="row form-actions">
<button class="btn btn-success col-sm-2 col-sm-offset-5" type="button" ng-disabled="myform.$invalid" ng-click="submitForm()" style="font-size: 1.6em;">
Submit
</button>
</div>
<section ng-if="!myform.hideFooter" class="navbar navbar-fixed-bottom" style="background-color:rgba(242,242,242,0.5); padding-top:15px;">
<div class="container" >
<div class="row">
<div class="col-xs-4 col-xs-offset-4 col-sm-4 col-sm-offset-4 text-center col-md-3 col-md-offset-0" ng-show="!myform.submitted">
<p class="lead">{{myform | formValidity}} out of {{myform.visible_form_fields.length}} answered</p>
</div>
<div class="hidden-xs hidden-sm col-md-6 col-md-offset-3 row">
<div class="col-md-4 col-md-offset-2" ng-if="!authentication.isAuthenticated()">
<a href="/#!/forms" class="btn btn-default">Create a NodeForm</a>
</div>
<div class="col-md-4 col-md-offset-2" ng-if="authentication.isAuthenticated()" class="hidden-sm hidden-xs">
<a href="/#!/forms/{{myform._id}}/admin/create" class="btn btn-default">Edit this NodeForm</a>
</div>
<div class="col-md-1 col-md-offset-2" style="padding-left:5px" class="hidden-sm hidden-xs">
<button class="btn btn-info" id="focusDownButton" ng-click="nextField()" ng-disabled="selected.index == myform.form_fields.length-1">\/</button>
</div>
<div class="col-md-1" class="hidden-sm hidden-xs">
<button class="btn btn-info" id="focusUpButton" ng-click="prevField()" ng-disabled="selected.index == 0">/\</button>
</div>
</div>
</div>
</div>
</section>
</div>
<div ng-show="myform.submitted" class="form-submitted">
<div class="field row text-center">
<div class="col-xs-6 col-xs-offset-3 text-center">Form entry successfully submitted!</div>
</div>
<div class="row form-actions">
<p class="text-center col-xs-4 col-xs-offset-4">
<button class="btn btn-info" type="button">
<a ng-click="reloadForm()" style="color:white; font-size: 1.6em; text-decoration: none;" > Go back to Form</a>
</button>
</p>
</div>
</div>