75 lines
2.6 KiB
HTML
75 lines
2.6 KiB
HTML
<section data-ng-controller="ViewFormController as ctrl" data-ng-init="findAll()" class="container">
|
|
<section class="overlay" ng-if="showCreateModal" ng-click="closeCreateModal()"></section>
|
|
|
|
<div class="row">
|
|
<div class="page-header col-xs-10 col-xs-offset-1">
|
|
<h1>My MedForms</h1>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div ng-click="openCreateModal()" class="col-xs-2 col-xs-offset-1 form-item row create-new">
|
|
<div class="title-row col-xs-12">
|
|
<h4 class="fa fa-plus fa-6"></h4>
|
|
</div>
|
|
<div class="col-xs-12 details-row">
|
|
|
|
<small class="list-group-item-text">
|
|
Create a new form
|
|
</small>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<form name="createForm" class="col-xs-2 col-xs-offset-1 form-item row create-new new-form" ng-show="showCreateModal">
|
|
<div ng-init="setForm(createForm);" style="display:none;"></div>
|
|
<div class="title-row row">
|
|
<div class="col-xs-5 field-title">Name </div>
|
|
<div class="col-xs-8 field-input">
|
|
<input type="text" name="name" ng-model="name" required style="color:black;" ng-pattern="/^[a-zA-Z0-9 ]*$/"/>
|
|
</div>
|
|
</div>
|
|
<div class="details-row row">
|
|
<div class="col-xs-5 field-title text-left">
|
|
Language
|
|
</div>
|
|
<div class="col-xs-5 field-input">
|
|
<select style="color:black;" name="language" required ng-model="formLanguage" ng-init="formLanguage = user.language">
|
|
<option ng-repeat="language in languages" value="{{language}}">
|
|
{{language}}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="details-row row">
|
|
<div class="col-xs-12 field-title text-center">
|
|
<button class="btn btn-primary" ng-disabled="myForm.$invalid" ng-click="createNew()">
|
|
Create Form
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<div data-ng-repeat="form in myforms" class="col-xs-2 col-xs-offset-1 form-item row">
|
|
<span class="pull-right">
|
|
<i style="cursor:pointer;" class="fa fa-trash-o" ng-click="remove(form._id);"></i>
|
|
</span>
|
|
<a data-ng-href="#!/forms/{{form._id}}/admin" class="title-row col-xs-12">
|
|
<h4 class="list-group-item-heading" data-ng-bind="form.title"></h4>
|
|
</a>
|
|
<div class="col-xs-12 details-row">
|
|
|
|
<small class="list-group-item-text">
|
|
Created on
|
|
<span data-ng-bind="form.created | date:'mediumDate'"></span>
|
|
by
|
|
<span data-ng-bind="form.admin.username"></span>
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<!-- <div class="alert alert-warning text-center" data-ng-if="forms.$resolved && !forms.length">
|
|
No forms yet, why don't you <a href="/#!/forms/create">create one</a>?
|
|
</div> -->
|
|
</section> |