tellform/public/modules/forms/views/directiveViews/form/submit-form.client.view.html

125 lines
5.4 KiB
HTML
Raw Normal View History

<section class="overlay submitform" ng-if="loading || (!myform.submitted && !myform.startPage.showStart)"></section>
2015-08-06 05:52:59 +00:00
<!-- Start Page View -->
<div ng-show="!myform.submitted && myform.startPage.showStart"
class="form-submitted"
2016-04-21 21:44:15 +00:00
style="padding-top: 35vh;">
<div class="row">
2015-11-13 18:59:25 +00:00
<div class="col-xs-12 text-center" style="overflow-wrap: break-word;">
<h1 style="font-weight: 400; font-size: 25px;">
2016-04-10 18:58:39 +00:00
{{myform.startPage.introTitle}}
</h1>
2015-08-06 05:52:59 +00:00
</div>
2016-04-10 18:58:39 +00:00
<div class="col-xs-10 col-xs-offset-1 text-center" style="overflow-wrap: break-word;">
<p style="color: grey; font-weight: 100; font-size: 16px;">
{{myform.startPage.introParagraph}}
</p>
</div>
</div>
<div class="row form-actions text-center" style="padding: 5px 25px 5px 25px;">
<button ng-click="exitStartPage()" class="btn btn-info" type="button">
2016-04-21 21:44:15 +00:00
<span style="font-size: 1.6em; text-decoration: none; color:white!important;">
{{myform.startPage.introButtonText}}
</span>
2016-04-10 18:58:39 +00:00
</button>
</div>
2016-04-10 18:58:39 +00:00
<div class="row form-actions" style="padding-bottom:3em; padding-left: 1em; padding-right: 1em;">
2015-09-15 22:21:49 +00:00
<p ng-repeat="button in myform.startPage.buttons" class="text-center" style="display:inline;">
2016-04-10 18:30:21 +00:00
<button class="btn" style="background-color:rgb(156, 226, 235)" type="button" ng-style="{'background-color':button.bgColor, 'color':button.color}">
<a href="{{button.url}}"
style="font-size: 1.6em; text-decoration: none;"
ng-style="{'color':button.color}">
2015-09-15 22:21:49 +00:00
{{button.text}}
</a>
</button>
</p>
2015-08-06 05:52:59 +00:00
</div>
</div>
<!-- Form Fields View -->
<div class="form-fields" ng-show="!myform.submitted && !myform.startPage.showStart">
2015-07-02 03:50:57 +00:00
<div class="row">
<form name="myForm"
du-scroll-container
novalidate
class="submission-form col-sm-12 col-md-offset-1 col-md-10">
2016-04-12 03:02:51 +00:00
<div ng-repeat="field in myform.form_fields"
ng-if="!field.deletePreserved"
data-index="{{$index}}"
data-id="{{field._id}}"
du-scrollspy
2016-04-12 03:02:51 +00:00
ng-class="{activeField: selected._id == field._id }"
class="row field-directive">
<field-directive field="field" design="myform.design" index="$index">
2015-08-06 05:52:59 +00:00
</field-directive>
</div>
2015-07-02 03:50:57 +00:00
</form>
</div>
2015-08-06 05:52:59 +00:00
2016-04-12 02:14:38 +00:00
<div class="row form-actions" id="submit_field"
ng-click="setActiveField('submit_field', myform.form_fields.length)"
ng-class="{activeField: selected._id == 'submit_field' }"
2016-04-21 20:43:18 +00:00
style="border-top: 1px solid #ddd; margin-right: -13% ;margin-left: -13%; padding-bottom: 35vh;">
2016-04-12 02:14:38 +00:00
<button ng-focus="setActiveField('submit_field', myform.form_fields.length)"
class="Button btn btn-success col-sm-2"
v-busy="loading" v-busy-label="Please wait" v-pressable
ng-disabled="loading"
2016-04-12 02:14:38 +00:00
ng-click="submitForm()"
style="font-size: 1.6em; margin-left: 1em; margin-top: 1em;">
2016-04-12 02:14:38 +00:00
Submit
</button>
2016-04-12 02:14:38 +00:00
<div class="col-sm-2" style="font-size: 75%; margin-top:2.5em">
<small>
press ENTER
</small>
</div>
2015-06-29 22:51:29 +00:00
</div>
2015-11-06 19:00:45 +00:00
2016-04-10 19:37:26 +00:00
<section ng-if="!myform.hideFooter" class="navbar navbar-fixed-bottom" style="background-color:rgba(242,242,242,0.5); padding-top:15px;">
2016-04-12 02:14:38 +00:00
<div class="container-fluid">
2015-11-06 19:00:45 +00:00
<div class="row">
2016-04-20 17:09:06 +00:00
<div class="col-sm-5 col-md-6 col-xs-5" ng-show="!myform.submitted">
2016-04-20 17:32:18 +00:00
<p class="lead">{{myform | formValidity}} out of {{form_fields_count}} answered</p>
2015-11-06 19:00:45 +00:00
</div>
2016-04-20 17:09:06 +00:00
<div class="col-md-6 col-md-offset-0 col-sm-offset-2 col-sm-3 col-xs-offset-1 col-xs-6 row">
2016-04-10 19:37:26 +00:00
<div class="col-md-4 col-md-offset-2 hidden-sm hidden-xs" ng-if="!authentication.isAuthenticated()">
2015-11-11 20:29:16 +00:00
<a href="/#!/forms" class="btn btn-default">Create
2015-11-16 22:43:18 +00:00
a TellForm</a>
2015-11-06 19:00:45 +00:00
</div>
2016-04-10 19:37:26 +00:00
<div class="col-md-4 col-md-offset-2 hidden-sm hidden-xs" ng-if="authentication.isAuthenticated()">
2015-11-16 22:43:18 +00:00
<a href="/#!/forms/{{myform._id}}/admin/create" class="btn btn-default">Edit this TellForm</a>
2015-11-06 19:00:45 +00:00
</div>
2016-04-20 17:09:06 +00:00
<div class="col-md-4 col-sm-10 col-md-offset-0 col-sm-offset-2 col-xs-12">
2016-04-12 02:14:38 +00:00
<button class="btn btn-info btn-lg" id="focusDownButton"
ng-click="nextField()"
ng-disabled="selected.index > myform.form_fields.length-1">
2016-04-10 19:37:26 +00:00
<i class="fa fa-chevron-down"></i>
</button>
2016-04-12 02:14:38 +00:00
<button class="btn btn-info btn-lg" id="focusUpButton" ng-click="prevField()" ng-disabled="selected.index == 0">
2016-04-10 19:37:26 +00:00
<i class="fa fa-chevron-up"></i>
</button>
2015-11-06 19:00:45 +00:00
</div>
</div>
</div>
</div>
</section>
2015-06-29 22:51:29 +00:00
</div>
<!-- End Page View -->
<div ng-if="myform.submitted && !loading" class="form-submitted">
2015-07-02 03:50:57 +00:00
<div class="field row text-center">
2015-11-06 19:00:45 +00:00
<div class="col-xs-6 col-xs-offset-3 text-center">Form entry successfully submitted!</div>
2015-07-02 03:50:57 +00:00
</div>
2015-06-29 22:51:29 +00:00
<div class="row form-actions">
<p class="text-center col-xs-4 col-xs-offset-4">
2015-11-11 20:51:16 +00:00
<button ng-click="reloadForm()" class="btn btn-info" type="button">
<a style="color:white; font-size: 1.6em; text-decoration: none;"> Go back to Form</a>
2015-07-02 03:50:57 +00:00
</button>
</p>
2015-06-29 22:51:29 +00:00
</div>
</div>