Initial commit

This commit is contained in:
Senad Uka
2018-06-11 11:09:35 +02:00
commit ed7df7b11f
1954 changed files with 483354 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
class ProfileSettingsController{
/**
* include profile settings template
*/
public function profileSettingsTemplate(){
require_once('templates/ProfileSettingsTemplate.php');
}
/**
* include change password template
*/
public function changePasswordTemplate() {
require_once('templates/ChangePasswordTemplate.php');
}
/**
* include change password template
*/
public function editProfileTemplate() {
require_once('templates/EditProfileTemplate.php');
}
/**
* open users page
*/
public function showPage(){
require_once('ProfileSettingsPage.php');
}
}

View File

@@ -0,0 +1,8 @@
<script src="<?php echo PATH_JS_COMPONENTS.'profile-settings/profile-settings.directive.js?v='.APPLICATION_VERSION;?>" type="text/javascript"></script>
<script src="<?php echo PATH_JS_COMPONENTS.'profile-settings/change-password.directive.js?v='.APPLICATION_VERSION;?>" type="text/javascript"></script>
<script src="<?php echo PATH_JS_COMPONENTS.'profile-settings/edit-profile.directive.js?v='.APPLICATION_VERSION;?>" type="text/javascript"></script>
<div id="profile-settings" class="container-fluid col-md-12">
<h1>{{ 'profile.SETTINGS_TITLE' | translate }}</h1>
<profile-settings ng-controller="profileSettingsCtrl"></profile-settings>
</div>

View File

@@ -0,0 +1,42 @@
<div id="change-password-container" class="col-md-12">
<h3>{{'profile.headers.CHANGE_PASSWORD' | translate}}</h3>
<div class="alert alert-info">
<span class="glyphicon glyphicon-info-sign"></span>
{{'profile.forms.messages.PASSWORD_CHARACTERS' | translate}}
</div>
<form>
<div class="change-passwd-list col-md-12">
<div id="old-password-container" class="passwords-container col-md-12">
<label class="col-md-2">{{'profile.forms.labels.OLD_PASSWORD' | translate}}</label>
<input class="col-md-2" type="password" ng-model="data.oldPassword" required />
</div>
<div id="new-password-container" class="passwords-container col-md-12">
<label class="col-md-2">{{'profile.forms.labels.NEW_PASSWORD' | translate}}</label>
<input class="col-md-2" pattern="(?=^.{8,}$)((?=.*\d)(?=.*\w+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$" type="password" ng-model="data.newPassword" required />
</div>
<div id="confirm-password-container" class="passwords-container col-md-12">
<label class="col-md-2">{{'profile.forms.labels.CONFIRM_PASSWORD' | translate}}</label>
<input class="col-md-2" type="password" ng-model="data.confirmPassword" required />
</div>
</div>
<div class="col-md-12">
<input type="submit"
id="change-password-button"
class="btn btn-success"
ng-click="showHideDialog()" />
</div>
</form>
</div>
<div id="change-password-dialog-confirm"
dialog
ng-if="isDialogVisible"
on-confirmation="changePassword"
on-close="showHideDialog"
is-modal="true"
has-buttons="true"
parameters="data"
title="{{'profile.headers.CHANGE_PASSWORD' | translate}}">
<p><span class="glyphicon glyphicon-warning-sign"></span>{{'profile.forms.messages.PASSWORD_CONFIRMATION' | translate}} <b>{{passwordChanges.username}}</b>?</p>
</div>

View File

@@ -0,0 +1,47 @@
<div id="change-profile-container" class="col-md-12">
<div class="row">
<h3 class="col-md-12">{{'profile.headers.EDIT_PROFILE' | translate}}</h3>
<form class="col-md-12">
<div class="edit-profile-list col-md-12">
<div id="name-container" class="profile-container col-md-12">
<label class="col-md-2">{{'profile.forms.labels.NAME' | translate}}</label>
<input class="col-md-2" type="text" ng-model="data.name" required />
</div>
<div id="phone-container" class="profile-container col-md-12">
<label class="col-md-2">{{'profile.forms.labels.PHONE' | translate}}</label>
<input class="col-md-2" type="text" ng-model="data.phone" required />
</div>
</div>
<div class="col-md-12">
<input type="submit"
id="save-profile-button"
class="btn btn-success"
ng-click="saveProfile()" />
</div>
</form>
</div>
<div class="row" ng-if="isCompanyAdmin(data.isCompanyAdmin)">
<h3 class="col-md-12">{{'profile.headers.EDIT_COMPANY' | translate}}</h3>
<form class="col-md-12">
<div class="edit-profile-list col-md-12">
<div id="company-name-container" class="profile-container col-md-12">
<label class="col-md-2">{{'profile.forms.labels.COMPANY_NAME' | translate}}</label>
<input class="col-md-2" type="text" ng-model="data.companyName" required />
</div>
<div id="vat-container" class="profile-container col-md-12">
<label class="col-md-2">{{'profile.forms.labels.VAT' | translate}}</label>
<input class="col-md-2" type="text" ng-model="data.vatCode" required />
</div>
</div>
<div class="col-md-12">
<input type="submit"
id="save-copmany-button"
class="btn btn-success"
ng-click="saveCompany()" />
</div>
</form>
</div>
</div>

View File

@@ -0,0 +1,21 @@
<button type="button"
id="change-password-btn"
subModule="changePassword"
class="btn btn-default"
ng-click="setSubModule($event)">{{ 'profile.buttons.CHANGE_PASSWORD' | translate }}</button>
<button type="button"
id="edit-profile-btn"
subModule="editProfile"
class="btn btn-default"
ng-click="setSubModule($event)">{{ 'profile.buttons.EDIT_PROFILE' | translate }}</button>
<div id="change-password-layer"
ng-if="isSubmoduleVisible('changePassword')">
<change-password ng-controller="changePasswordCtrl"></change-password>
</div>
<div id="edit-profile-layer"
ng-if="isSubmoduleVisible('editProfile')">
<edit-profile ng-controller="editProfileCtrl" ng-init="getProfile()"></edit-profile>
</div>