unserver-unify
Version:
151 lines (146 loc) • 9.59 kB
HTML
<div ng-if="userProfiles" class='panel panel-default'>
<div class='panel-heading' translate>
Nurse Information
</div>
<div class='panel-body'>
<div class="form-group" ng-class='{"has-error":form.userType.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="userType"><span translate>User Type</span> *</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<select class="form-control" name="userType" ng-model="userProfiles.userType" ng-options="userType as userType for userType in userTypes" required />
</div>
</div>
<div class="form-group alert alert-danger" ng-show="form.userType.$invalid && submitted">
<p class="help-block col-xs-12" translate="field_required" translate-value-field="{{ 'User Type' | translate }}"></p>
</div>
<div class="form-group" ng-class='{"has-error":form.sex.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="highEdu" translate>Sex</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<label class="radio-inline">
<input type="radio" name="sex" ng-model="userProfiles.sex" value="M"> {{ 'Male' | translate }}
</label>
<label class="checkbox-inline">
<input type="radio" name="sex" ng-model="userProfiles.sex" value="F"> {{ 'Female' | translate }}
</label>
</div>
</div>
<div class="form-group" ng-class='{"has-error":form.birthDate.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="birthDate" translate>Date of Birth</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<div class="input-group">
<input type="text" class="form-control" name="birthDate" ng-model="userProfiles.birthDate" datepicker-popup="yyyy-MM-dd"
is-open="datePicker.birth" close-text="Close">
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="showDatePicker($event, 'birth')">
<i class="glyphicon glyphicon-calendar"></i>
</button>
</span>
</div>
</div>
</div>
<div class="form-group" ng-class='{"has-error":form.province.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="province" translate>Province</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<select class="form-control" name="province" ng-model="userProfiles.province" ng-options="province as province for province in provinces" />
</div>
</div>
<div class="form-group" ng-class='{"has-error":form.city.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="city" translate>City</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<input ng-model="userProfiles.city" name="city" type="text" class="form-control">
</div>
</div>
<div class="form-group" ng-class='{"has-error":form.highEdu.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="highEdu" translate>Highest level of education</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<select class="form-control" name="highEdu" ng-model="userProfiles.highEdu" ng-options="edu as edu for edu in edus" />
</div>
</div>
<div class="form-group" ng-class='{"has-error":form.company.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="company" translate>Current Company</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<input ng-model="userProfiles.company" name="company" type="text" class="form-control" placeholder="{{ 'min_length' | translate:'{ length: 5 }' }}" ng-minlength="5">
</div>
</div>
<div class="form-group alert alert-danger" ng-show="form.company.$invalid && submitted">
<p class="help-block col-xs-12" translate="field_min_length" translate-value-field="{{ 'Current Company' | translate }}" translate-values='{length: 5}'></p>
</div>
<div class="form-group" ng-class='{"has-error":form.companyYear.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="companyYear" translate>Years for Current Company</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<div class="input-group">
<input type="number" min="0" name="companyYear" class="form-control" placeholder="years for current company" ng-model="userProfiles.companyYear" required>
<span class="input-group-addon" translate>Year(s)</span>
</div>
</div>
</div>
<div class="form-group alert alert-danger" ng-show="form.companyYear.$invalid && submitted">
<p class="help-block col-xs-12">The year for current company is required.</p>
</div>
<div class="form-group" ng-class='{"has-error":form.jobTitle.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="jobTitle" translate>Job Title</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<select class="form-control" name="jobTitle" ng-model="userProfiles.jobTitle" ng-options="jobTitle as jobTitle for jobTitle in jobTitles" />
</div>
</div>
<div class="form-group">
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="nurseCert" translate>Nurse Registration Certificate</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<input type="checkbox" name="nurseCert" ng-model="userProfiles.nurseprofile.nurseCert">
</div>
</div>
<div class="form-group" ng-class='{"has-error":form.nurseCertNo.$invalid && submitted}' ng-show="userProfiles.nurseprofile.nurseCert">
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="nurseCertNo"><span translate>Nurse Registration Certificate No.</span> *</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<input ng-model="userProfiles.nurseprofile.nurseCertNo" name="nurseCertNo" type="text" class="form-control">
</div>
</div>
<div class="form-group alert alert-danger" ng-show="userProfiles.nurseprofile.nurseCert && form.nurseCertNo.$invalid && submitted">
<p class="help-block col-xs-12" translate="field_required" translate-value-field="{{ 'Nurse Registration Certificate No.' | translate }}"></p>
</div>
<div class="form-group" ng-class='{"has-error":form.nurseCertDate.$invalid && submitted}' ng-show="userProfiles.nurseprofile.nurseCert">
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="nurseCertDate"><span translate>Date for Nurse Registration Certificate</span> *</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<div class="input-group">
<input type="text" class="form-control" name="nurseCertDate" ng-model="userProfiles.nurseprofile.nurseCertDate" datepicker-popup="yyyy-MM-dd"
is-open="datePicker.cert" close-text="Close">
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="showDatePicker($event, 'cert')">
<i class="glyphicon glyphicon-calendar"></i>
</button>
</span>
</div>
</div>
</div>
<div class="form-group alert alert-danger" ng-show="userProfiles.nurseprofile.nurseCert && form.nurseCertDate.$invalid && submitted">
<p class="help-block col-xs-12" translate="field_required" translate-value-field="{{ 'Date for Nurse Registration Certificate' | translate }}"></p>
</div>
<div class="form-group" ng-class='{"has-error":form.handphone.$invalid && submitted}'>
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="handphone"><span translate>Handphone No.</span> *</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<input ng-model="userProfiles.handphone" name="handphone" type="text" class="form-control" placeholder="{{ 'required_min_length' | translate:'{ length: 5 }' }}" ng-minlength="5" required>
</div>
</div>
<div class="form-group alert alert-danger" ng-show="form.handphone.$invalid && submitted">
<p class="help-block col-xs-12" translate="field_required_min_length" translate-value-field="{{ 'Handphone No.' | translate }}" translate-values='{length: 5}'></p>
</div>
<div class="form-group">
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="qq" translate>QQ No.</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<input ng-model="userProfiles.qq" name="qq" type="text" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-xs-4 col-sm-4 col-md-3 col-lg-2 control-label" for="weixin" translate>Wechat No.</label>
<div class="col-xs-8 col-sm-8 col-md-9 col-lg-10">
<input ng-model="userProfiles.weixin" name="weixin" type="text" class="form-control">
</div>
</div>
<div class="form-group" ng-if="userProfileUpdateButton">
<div class="col-xs-offset-4 col-sm-offset-4 col-md-offset-3 col-lg-offset-2 col-xs-8 col-sm-8 col-md-9 col-lg-10">
<button type="button" class="btn btn-u" ng-click="updateUserProfile(form)" translate>
Update
</button>
</div>
</div>
</div>
</div>