unserver-unify
Version:
156 lines (155 loc) • 7.42 kB
HTML
<div class="row row-mbl-non contact_holder" ng-controller="ContactCtrl as ctrl">
<div ng-if="!ctrl.showMessage" ng-class="{'col-md-8': currentSchool, 'col-md-12': !currentSchool}" class="mb-margin-bottom-30">
<form name="form" ng-class='{"shake":shaking}'>
<div class="margin-bottom-20">
<div class="headline">
<h3 translate>Leave a message</h3>
</div>
<label for="tab">
<span translate>Category</span> <span class="manditory">*</span>
</label>
<div class="row margin-bottom-20">
<div class="col-md-7 col-md-offset-0">
<select class="form-control" name="tab" ng-model="ctrl.tab" ng-options="option.text |translate for option in options" focus-me="true" required>
<option translate="" value="">Select</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-7 col-md-offset-0">
<div class="alert alert-danger" ng-show="form.tab.$invalid && submitted">
<p class="help-block" translate>Please select a catogory.</p>
</div>
</div>
</div>
<!-- <label for="others" ng-if="ctrl.tab&&ctrl.tab.value=='Others'">
<span translate>Others (Subject detail)</span> <span class="manditory">*</span>
</label>
<div class="row margin-bottom-20" ng-if="ctrl.tab&&ctrl.tab.value=='Others'">
<div class="col-md-7 col-md-offset-0">
<input class="form-control" name="others" ng-model="ctrl.info.tab" type='text' required />
</div>
</div>
<div class="row" ng-if="ctrl.tab&&ctrl.tab.value=='Others'">
<div class="col-md-7 col-md-offset-0">
<div class="form-group alert alert-danger" ng-show="form.others.$invalid && submitted">
<p class="help-block" translate>The subject is required.</p>
</div>
</div>
</div> -->
<label for="tab" ng-if="!loginService.user">
<span translate>Name</span>
</label>
<div class="row margin-bottom-20" ng-if="!loginService.user">
<div class="col-md-7 col-md-offset-0">
<input class="form-control" name="fullname" ng-model="ctrl.info.fullname" type='text' />
</div>
</div>
<label for="tab" ng-if="!loginService.user">
<span translate>Email</span> <span class="manditory">*</span>
</label>
<div class="row margin-bottom-20" ng-if="!loginService.user">
<div class="col-md-7 col-md-offset-0">
<input class="form-control" name="email" ng-model="ctrl.info.email" type='email' ng-minlength="5" required />
</div>
</div>
<div class="row" ng-if="!loginService.user">
<div class="col-md-7 col-md-offset-0">
<div class="form-group alert alert-danger" ng-show="form.email.$invalid && submitted">
<p class="help-block" translate>The email is required and the length can not less than 5.</p>
</div>
</div>
</div>
<label for="tab">
<span translate>Subject</span> <span class="manditory">*</span>
</label>
<div class="row margin-bottom-20">
<div class="col-md-7 col-md-offset-0">
<input class="form-control" name="title" ng-model="ctrl.info.title" type='text' ng-minlength="10" required />
</div>
</div>
<div class="row">
<div class="col-md-7 col-md-offset-0">
<div class="form-group alert alert-danger" ng-show="form.title.$invalid && submitted">
<p class="help-block" translate>The title is required and the length can not less than 10.</p>
</div>
</div>
</div>
<label for="tab">
<span translate>Content</span> <span class="manditory">*</span>
</label>
<div class="row margin-bottom-20">
<div class="col-md-11 col-md-offset-0">
<textarea class="form-control" name="content" ng-model="ctrl.info.content" rows='5' ng-minlength="10" required></textarea>
</div>
</div>
<div class="row">
<div class="col-md-11 col-md-offset-0">
<div class="form-group alert alert-danger" ng-show="form.content.$invalid && submitted">
<p class="help-block" translate>The content is required and the length can not less than 10.</p>
</div>
</div>
</div>
<p>
<button ng-if="loginService.isLogged" class="btn btn-u" ng-click="ctrl.createContact(form)" translate>Send Message</button>
</p>
</div>
</form>
</div>
<div ng-if="!ctrl.showMessage" class="col-md-4">
<!-- Contacts -->
<div class="headline">
<h2 translate>Contact</h2>
</div>
<ul class="list-unstyled who margin-bottom-30">
<li ng-if="currentSchool.address">
<i class="fa fa-home"></i>
<div>{{ currentSchool.address }}</div>
</li>
<li ng-if="currentSchool.email">
<i class="fa fa-envelope"></i>
<div>
<a href="mailto:{{ currentSchool.email }}">{{ currentSchool.email }}</a>
</div>
</li>
<li ng-if="currentSchool.country">
<i class="fa fa-globe"></i>
<div>
<span>{{ currentSchool.country }}</span>
<span ng-if="currentSchool.postcode">{{ currentSchool.postcode }}</span>
</div>
</li>
<li ng-if="currentSchool.tel">
<i class="fa fa-phone"></i>
<div>{{ currentSchool.tel }} <span ng-if="currentSchool.tel1">, {{ currentSchool.tel1 }}</span>
</div>
</li>
</ul>
<!-- <div class="headline"><h2>Business Hours</h2></div>
<ul class="list-unstyled margin-bottom-30">
<li><strong>Monday-Friday:</strong> 10am to 8pm</li>
<li><strong>Saturday:</strong> 11am to 3pm</li>
<li><strong>Sunday:</strong> Closed</li>
</ul>-->
</div>
<div ng-if="!ctrl.showMessage" class="col-md-12">
<div map-lazy-load="https://maps.google.com/maps/api/js?key=AIzaSyCDpjAui7Bp-lfs3akUG4zGId3RAyhGA1M" ng-if="ctrl.school.lat && loginService.subDomain != 'xijing'&&ctrl.school.mapType!='baidu'">
<ng-map center="{{ctrl.school.lat}},{{ctrl.school.lng}}" zoom="12">
<shape center="{{ctrl.school.lat}},{{ctrl.school.lng}}" fill-color="#FF0000" fill-opacity="0.55" name="circle" no-watcher="true" radius="400" stroke-color="#00FF00" stroke-opacity="0.8" stroke-weight="2">
</shape>
</ng-map>
</div>
<div ng-if="!ctrl.school.lat && loginService.subDomain != 'xijing'" style="max-height: 300px; overflow: hidden;">
<img src="/assets/images/maps.png" style="width: 100%">
</div>
<div ng-if="ctrl.baiduMapUrl">
<img ng-src="{{ctrl.baiduMapUrl}}" >
</div>
</div>
<div ng-if="ctrl.showMessage" class="col-md-12 register_link">
<img src="assets/images/email_link.png" />
<div translate="">Your message sent successfully, We will get back to you soon.</div>
<div class="link_style">{{'click' | translate}} <a ui-sref="index.home" translate="">here</a> {{'to home' | translate}}</div>
<div class="margin-bottom-20"></div>
</div>
</div>