Unverified Commit 7257c304 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #43 from viralsolani/user-module

User module
parents 49194365 37cb8176
......@@ -4,7 +4,7 @@
## Introduction
* This is a laravel Admin Panel, based on [Rappasoft Laravel Boilerplate](https://github.com/rappasoft/laravel-5-boilerplate), with enhancemenets and many modules pre-made, just for you.
* This is a laravel Admin Panel, based on [Rappasoft Laravel Boilerplate](https://github.com/rappasoft/laravel-5-boilerplate/releases/tag/4.5.7), with enhancemenets and many modules pre-made, just for you.
* The project is taken to Laravel 5.5 so we can develop from the latest Laravel.
## Features
......
......@@ -57,8 +57,9 @@ class UserController extends Controller
*/
public function create(CreateUserRequest $request)
{
return view('backend.access.create')
->withRoles($this->roles->getAll());
return view('backend.access.create')->with([
'roles' => $this->roles->getAll(),
]);
}
/**
......@@ -68,7 +69,7 @@ class UserController extends Controller
*/
public function store(StoreUserRequest $request)
{
$this->users->create(['data' => $request->except('assignees_roles'), 'roles' => $request->all('assignees_roles')]);
$this->users->create($request);
return redirect()->route('admin.access.user.index')->withFlashSuccess(trans('alerts.backend.users.created'));
}
......@@ -93,11 +94,20 @@ class UserController extends Controller
*/
public function edit(User $user, EditUserRequest $request)
{
//@todo move queries in to repositery
$userPermissions = DB::table('permission_user')->where('user_id', $user->id)->pluck('permission_id', 'permission_id')->toArray();
$permissions = DB::table('permissions')->pluck('display_name', 'id')->toArray();
ksort($userPermissions);
ksort($permissions);
/*return view('backend.access.edit')->with([
'user' => $user,
'userRoles' => $user->roles->pluck('id')->all(),
'roles' => $this->roles->getAll(),
'userPermissions' => $userPermissions,
'permissions' => $permissions
]);*/
return view('backend.access.edit', compact('userPermissions', 'permissions'))
->withUser($user)
->withUserRoles($user->roles->pluck('id')->all())
......@@ -112,7 +122,7 @@ class UserController extends Controller
*/
public function update(User $user, UpdateUserRequest $request)
{
$this->users->update($user, ['data' => $request->except('assignees_roles'), 'roles' => $request->all('assignees_roles')]);
$this->users->update($user, $request);
return redirect()->route('admin.access.user.index')->withFlashSuccess(trans('alerts.backend.users.updated'));
}
......
......@@ -32,10 +32,6 @@ class StoreUserRequest extends Request
'last_name' => 'required|max:255',
'email' => ['required', 'email', 'max:255', Rule::unique('users')],
'password' => 'required|min:6|confirmed',
'state_id' => 'required',
'city_id' => 'required',
'zip_code' => 'required|regex:/^[0-9]+$/',
'ssn' => 'required|regex:/^[0-9]+$/|max:9|min:9',
];
}
......@@ -47,12 +43,6 @@ class StoreUserRequest extends Request
public function messages()
{
return [
'state_id.required' => 'The state field is required.',
'city_id.required' => 'The city field is required.',
'ssn.regex' => 'The SSN field must be 9 digits.',
'ssn.min' => 'The SSN field must be 9 digits.',
'ssn.max' => 'The SSN field must be 9 digits.',
'zip_code.regex' => 'The zip code field must be digit.',
];
}
}
......@@ -30,10 +30,6 @@ class UpdateUserRequest extends Request
'email' => 'required|email',
'first_name' => 'required',
'last_name' => 'required',
'state_id' => 'required',
'city_id' => 'required',
'zip_code' => 'required|regex:/^[0-9]+$/',
'ssn' => 'required|regex:/^[0-9]+$/|max:9|min:9',
];
}
......@@ -45,13 +41,6 @@ class UpdateUserRequest extends Request
public function messages()
{
return [
'state_id.required' => 'The state field is required.',
'city_id.required' => 'The city field is required.',
'ssn.regex' => 'The SSN field must be 9 digits.',
'ssn.min' => 'The SSN field must be 9 digits.',
'ssn.max' => 'The SSN field must be 9 digits.',
'zip_code.regex' => 'The zip code field must be digit.',
];
}
}
......@@ -9,7 +9,7 @@ namespace App\Http\Utilities;
*
* Notification class is a abstract class for send push notification in Android and iPhone mobile
*
* Author Sandip P. Joshi
* Author Viral Solani
*
* Version 1.0
*
......
......@@ -49,8 +49,6 @@ class PushNotification
}
/**
* Created By : Umang Soni
* Created at : 26/05/2017
* PushNotification for android.
*
* @param array $devicetoken
......@@ -88,8 +86,6 @@ class PushNotification
}
/**
* Created By : Umang Soni
* Created at : 26/05/2017
* PushNotification for IOS.
*
* @param array $devicetoken
......
......@@ -89,7 +89,6 @@ trait UserAccess
public function allow($nameOrId)
{
/*
* Author : Vaishal Gandhi
*
* Update for this function due to issue of user custom permission
*/
......@@ -117,7 +116,6 @@ trait UserAccess
}
/*
* Author : Vaishal Gandhi
*
* below code is commented due to issue of user custom permisssion
* if this code is not commented then if user dont have permission of one module but role which is assigned to that user have that permission than allow() method return true
......@@ -271,4 +269,72 @@ trait UserAccess
$this->detachRole($role);
}
}
/**
* Attach multiple Permissions to a user.
*
* @param mixed $permissions
*
* @return void
*/
public function attachPermissions($permissions)
{
foreach ($permissions as $permission) {
$this->attachPermission($permission);
}
}
/**
* Alias to eloquent many-to-many relation's attach() method.
*
* @param mixed $permission
*
* @return void
*/
public function attachPermission($permission)
{
if (is_object($permission)) {
$permission = $permission->getKey();
}
if (is_array($permission)) {
$permission = $permission['id'];
}
$this->permissions()->attach($permission);
}
/**
* Detach multiple permissions from current role.
*
* @param mixed $permissions
*
* @return void
*/
public function detachPermissions($permissions)
{
foreach ($permissions as $permission) {
$this->detachPermission($permission);
}
}
/**
* Detach permission form current User.
*
* @param object|array $permission
*
* @return void
*/
public function detachPermission($permission)
{
if (is_object($permission)) {
$permission = $permission->getKey();
}
if (is_array($permission)) {
$permission = $permission['id'];
}
$this->permissions()->detach($permission);
}
}
......@@ -40,16 +40,11 @@ class User extends Authenticatable
'last_name',
'email',
'password',
'address',
'country_id',
'state_id',
'city_id',
'zip_code',
'ssn',
'status',
'confirmation_code',
'confirmed',
'created_by',
'updated_by',
];
/**
......
......@@ -113,61 +113,41 @@ class UserRepository extends BaseRepository
}
/**
* @param Model $input
* Create User.
*
* @param Model $request
*/
public function create($input)
public function create($request)
{
$data = $input['data'];
$roles = $input['roles'];
$permissions = isset($data['permissions']) ? $data['permissions'] : [];
unset($data['permissions']);
$data = $request->except('assignees_roles', 'permissions');
$roles = $request->get('assignees_roles');
$permissions = $request->get('permissions');
$user = $this->createUserStub($data);
DB::transaction(function () use ($user, $data, $roles, $permissions, $input) {
DB::transaction(function () use ($user, $data, $roles, $permissions) {
// Set email type 2
$email_type = 2;
if ($user->save()) {
//User Created, Validate Roles
if (!count($roles['assignees_roles'])) {
if (!count($roles)) {
throw new GeneralException(trans('exceptions.backend.access.users.role_needed_create'));
}
//Attach new roles
$user->attachRoles($roles['assignees_roles']);
$user->attachRoles($roles);
//Send confirmation email if requested
// Attach New Permissions
$user->attachPermissions($permissions);
//Send confirmation email if requested and account approval is off
if (isset($data['confirmation_email']) && $user->confirmed == 0) {
// If user needs confirmation then set email type 1
$email_type = 1;
$input['data']['confirmation_code'] = $user->confirmation_code;
$user->notify(new UserNeedsConfirmation($user->confirmation_code));
}
event(new UserCreated($user));
$arrUserPermissions = [];
if (isset($permissions) && count($permissions) > 0) {
foreach ($permissions as $permission) {
$arrUserPermissions[] = [
'permission_id' => $permission,
'user_id' => $user->id,
];
}
// Insert multiple rows at once
DB::table('permission_user')->insert($arrUserPermissions);
}
// Send email to the user
$options = [
'data' => $input['data'],
'email_template_type' => $email_type,
];
createNotification('', 1, 2, $options);
return true;
}
......@@ -177,25 +157,22 @@ class UserRepository extends BaseRepository
/**
* @param Model $user
* @param array $input
* @param $request
*
* @throws GeneralException
*
* @return bool
*/
public function update(Model $user, array $input)
public function update(Model $user, $request)
{
$data = $input['data'];
$roles = $input['roles'];
$permissions = isset($data['permissions']) ? $data['permissions'] : [];
unset($data['permissions']);
$data = $request->except('assignees_roles', 'permissions');
$roles = $request->get('assignees_roles');
$permissions = $request->get('permissions');
$this->checkUserByEmail($data, $user);
DB::transaction(function () use ($user, $data, $roles, $permissions) {
if ($user->update($data)) {
//For whatever reason this just wont work in the above call, so a second is needed for now
$user->status = isset($data['status']) ? 1 : 0;
$user->confirmed = isset($data['confirmed']) ? 1 : 0;
$user->save();
......@@ -203,22 +180,9 @@ class UserRepository extends BaseRepository
$this->checkUserRolesCount($roles);
$this->flushRoles($roles, $user);
$this->flushPermissions($permissions, $user);
event(new UserUpdated($user));
$arrUserPermissions = [];
if (isset($permissions) && count($permissions) > 0) {
foreach ($permissions as $permission) {
$arrUserPermissions[] = [
'permission_id' => $permission,
'user_id' => $user->id,
];
}
// Insert multiple rows at once
DB::table('permission_user')->where('user_id', $user->id)->delete();
DB::table('permission_user')->insert($arrUserPermissions);
}
return true;
}
......@@ -384,6 +348,8 @@ class UserRepository extends BaseRepository
}
/**
* Flush roles out, then add array of new ones.
*
* @param $roles
* @param $user
*/
......@@ -391,7 +357,20 @@ class UserRepository extends BaseRepository
{
//Flush roles out, then add array of new ones
$user->detachRoles($user->roles);
$user->attachRoles($roles['assignees_roles']);
$user->attachRoles($roles);
}
/**
* Flush Permissions out, then add array of new ones.
*
* @param $permissions
* @param $user
*/
protected function flushPermissions($permissions, $user)
{
//Flush roles out, then add array of new ones
$user->detachPermissions($user->roles);
$user->attachPermissions($permissions);
}
/**
......@@ -403,7 +382,7 @@ class UserRepository extends BaseRepository
{
//User Updated, Update Roles
//Validate that there's at least one role chosen
if (count($roles['assignees_roles']) == 0) {
if (count($roles) == 0) {
throw new GeneralException(trans('exceptions.backend.access.users.role_needed'));
}
}
......@@ -417,15 +396,8 @@ class UserRepository extends BaseRepository
{
$user = self::MODEL;
$user = new $user();
// $user->name = $input['name'];
$user->first_name = $input['first_name'];
$user->last_name = $input['last_name'];
$user->address = $input['address'];
$user->country_id = 1;
$user->state_id = $input['state_id'];
$user->city_id = $input['city_id'];
$user->zip_code = $input['zip_code'];
$user->ssn = $input['ssn'];
$user->email = $input['email'];
$user->password = bcrypt($input['password']);
$user->status = isset($input['status']) ? 1 : 0;
......
<?php
return [
/*
|--------------------------------------------------------------------------
| Debugbar Settings
|--------------------------------------------------------------------------
|
| Debugbar is enabled by default, when debug is set to true in app.php.
| You can override the value by setting enable to true or false instead of null.
|
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
*/
'enabled' => env('DEBUGBAR_ENABLED', null),
'except' => [
//
],
/*
|--------------------------------------------------------------------------
| Storage settings
|--------------------------------------------------------------------------
|
| DebugBar stores data for session/ajax requests.
| You can disable this, so the debugbar stores data in headers/session,
| but this can cause problems with large data collectors.
| By default, file storage (in the storage folder) is used. Redis and PDO
| can also be used. For PDO, run the package migrations first.
|
*/
'storage' => [
'enabled' => true,
'driver' => 'file', // redis, file, pdo, custom
'path' => storage_path('debugbar'), // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO)
'provider' => '', // Instance of StorageInterface for custom driver
],
/*
|--------------------------------------------------------------------------
| Vendors
|--------------------------------------------------------------------------
|
| Vendor files are included by default, but can be set to false.
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
| and for js: jquery and and highlight.js
| So if you want syntax highlighting, set it to true.
| jQuery is set to not conflict with existing jQuery scripts.
|
*/
'include_vendors' => true,
/*
|--------------------------------------------------------------------------
| Capture Ajax Requests
|--------------------------------------------------------------------------
|
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
| you can use this option to disable sending the data through the headers.
|
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
*/
'capture_ajax' => true,
'add_ajax_timing' => false,
/*
|--------------------------------------------------------------------------
| Custom Error Handler for Deprecated warnings
|--------------------------------------------------------------------------
|
| When enabled, the Debugbar shows deprecated warnings for Symfony components
| in the Messages tab.
|
*/
'error_handler' => false,
/*
|--------------------------------------------------------------------------
| Clockwork integration
|--------------------------------------------------------------------------
|
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
*/
'clockwork' => false,
/*
|--------------------------------------------------------------------------
| DataCollectors
|--------------------------------------------------------------------------
|
| Enable/disable DataCollectors
|
*/
'collectors' => [
'phpinfo' => true, // Php version
'messages' => true, // Messages
'time' => true, // Time Datalogger
'memory' => true, // Memory usage
'exceptions' => true, // Exception displayer
'log' => true, // Logs from Monolog (merged in messages if enabled)
'db' => true, // Show database (PDO) queries and bindings
'views' => true, // Views with their data
'route' => true, // Current route information
'auth' => true, // Display Laravel authentication status
'gate' => true, // Display Laravel Gate checks
'session' => true, // Display session data
'symfony_request' => true, // Only one can be enabled..
'mail' => true, // Catch mail messages
'laravel' => false, // Laravel version and environment
'events' => false, // All events fired
'default_request' => false, // Regular or special Symfony request logger
'logs' => false, // Add the latest log messages
'files' => false, // Show the included files
'config' => false, // Display config settings
'cache' => false, // Display cache events
],
/*
|--------------------------------------------------------------------------
| Extra options
|--------------------------------------------------------------------------
|
| Configure some DataCollectors
|
*/
'options' => [
'auth' => [
'show_name' => true, // Also show the users name/email in the debugbar
],
'db' => [
'with_params' => true, // Render SQL with the parameters substituted
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
],
'mail' => [
'full_log' => false,
],
'views' => [
'data' => false, //Note: Can slow down the application, because the data can be quite large..
],
'route' => [
'label' => true, // show complete route on bar
],
'logs' => [
'file' => null,
],
'cache' => [
'values' => true, // collect cache values
],
],
/*
|--------------------------------------------------------------------------
| Inject Debugbar in Response
|--------------------------------------------------------------------------
|
| Usually, the debugbar is added just before </body>, by listening to the
| Response after the App is done. If you disable this, you have to add them
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
*/
'inject' => true,
/*
|--------------------------------------------------------------------------
| DebugBar route prefix
|--------------------------------------------------------------------------
|
| Sometimes you want to set route prefix to be used by DebugBar to load
| its resources from. Usually the need comes from misconfigured web server or
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
|
*/
'route_prefix' => '_debugbar',
/*
|--------------------------------------------------------------------------
| DebugBar route domain
|--------------------------------------------------------------------------
|
| By default DebugBar route served from the same domain that request served.
| To override default domain, specify it as a non-empty value.
*/
'route_domain' => null,
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Where the templates for the generators are stored...
|--------------------------------------------------------------------------
|
*/
'model_template_path' => base_path('vendor/xethron/laravel-4-generators/src/Way/Generators/templates/model.txt'),
'scaffold_model_template_path' => base_path('vendor/xethron/laravel-4-generators/src/Way/Generators/templates/scaffolding/model.txt'),
'controller_template_path' => base_path('vendor/xethron/laravel-4-generators/src/Way/Generators/templates/controller.txt'),
'scaffold_controller_template_path' => base_path('vendor/xethron/laravel-4-generators/src/Way/Generators/templates/scaffolding/controller.txt'),
'migration_template_path' => base_path('vendor/xethron/laravel-4-generators/src/Way/Generators/templates/migration.txt'),
'seed_template_path' => base_path('vendor/xethron/laravel-4-generators/src/Way/Generators/templates/seed.txt'),
'view_template_path' => base_path('vendor/xethron/laravel-4-generators/src/Way/Generators/templates/view.txt'),
/*
|--------------------------------------------------------------------------
| Where the generated files will be saved...
|--------------------------------------------------------------------------
|
*/
'model_target_path' => app_path(),
'controller_target_path' => app_path('Http/Controllers'),
'migration_target_path' => base_path('database/migrations'),
'seed_target_path' => base_path('database/seeds'),
'view_target_path' => base_path('resources/views'),
];
<?php
return [
/*
* Set trusted proxy IP addresses.
*
* Both IPv4 and IPv6 addresses are
* supported, along with CIDR notation.
*
* The "*" character is syntactic sugar
* within TrustedProxy to trust any proxy
* that connects directly to your server,
* a requirement when you cannot know the address
* of your proxy (e.g. if using Rackspace balancers).
*
* The "**" character is syntactic sugar within
* TrustedProxy to trust not just any proxy that
* connects directly to your server, but also
* proxies that connect to those proxies, and all
* the way back until you reach the original source
* IP. It will mean that $request->getClientIp()
* always gets the originating client IP, no matter
* how many proxies that client's request has
* subsequently passed through.
*/
'proxies' => [
'192.168.1.10',
],
/*
* Or, to trust all proxies that connect
* directly to your server, uncomment this:
*/
// 'proxies' => '*',
/*
* Or, to trust ALL proxies, including those that
* are in a chain of forwarding, uncomment this:
*/
// 'proxies' => '**',
/*
* Default Header Names
*
* Change these if the proxy does
* not send the default header names.
*
* Note that headers such as X-Forwarded-For
* are transformed to HTTP_X_FORWARDED_FOR format.
*
* The following are Symfony defaults, found in
* \Symfony\Component\HttpFoundation\Request::$trustedHeaders
*
* You may optionally set headers to 'null' here if you'd like
* for them to be considered untrusted instead. Ex:
*
* Illuminate\Http\Request::HEADER_CLIENT_HOST => null,
*
* WARNING: If you're using AWS Elastic Load Balancing or Heroku,
* the FORWARDED and X_FORWARDED_HOST headers should be set to null
* as they are currently unsupported there.
*/
'headers' => [
(defined('Illuminate\Http\Request::HEADER_FORWARDED') ? Illuminate\Http\Request::HEADER_FORWARDED : 'forwarded') => 'FORWARDED',
Illuminate\Http\Request::HEADER_CLIENT_IP => 'X_FORWARDED_FOR',
Illuminate\Http\Request::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST',
Illuminate\Http\Request::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO',
Illuminate\Http\Request::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT',
],
];
......@@ -28,12 +28,6 @@ class UserTableSeeder extends Seeder
[
'first_name' => 'Admin Istrator',
'last_name' => 'Admin Istrator',
'address' => 'Admin Istrator',
'ssn' => 'Admin Istrator',
'city_id' => '2',
'state_id' => '1',
'country_id' => '1',
'zip_code' => '1123',
'email' => 'admin@admin.com',
'password' => bcrypt('1234'),
'confirmation_code' => md5(uniqid(mt_rand(), true)),
......@@ -47,12 +41,6 @@ class UserTableSeeder extends Seeder
[
'first_name' => 'Backend User',
'last_name' => 'Admin Istrator',
'address' => 'Admin Istrator',
'ssn' => 'Admin Istrator',
'city_id' => '2',
'state_id' => '1',
'country_id' => '1',
'zip_code' => '1123',
'email' => 'executive@executive.com',
'password' => bcrypt('1234'),
'confirmation_code' => md5(uniqid(mt_rand(), true)),
......@@ -66,12 +54,6 @@ class UserTableSeeder extends Seeder
[
'first_name' => 'Default User',
'last_name' => 'Admin Istrator',
'address' => 'Admin Istrator',
'ssn' => 'Admin Istrator',
'city_id' => '2',
'state_id' => '1',
'country_id' => '1',
'zip_code' => '1123',
'email' => 'user@user.com',
'password' => bcrypt('1234'),
'confirmation_code' => md5(uniqid(mt_rand(), true)),
......
var FinBuilders = {
var Backend = {
/**
* Pages
*
......@@ -9,7 +9,7 @@ var FinBuilders = {
{
init: function()
{
FinBuilders.tinyMCE.init();
Backend.tinyMCE.init();
},
},
......@@ -51,7 +51,7 @@ var FinBuilders = {
init: function ()
{
this.addHandlers();
FinBuilders.tinyMCE.init();
Backend.tinyMCE.init();
},
addHandlers: function ()
......@@ -115,29 +115,29 @@ var FinBuilders = {
},
emailTemplate: {
selectors: {
emailtemplateSelection: jQuery(".select2")
},
init: function () {
FinBuilders.emailTemplate.addHandlers();
FinBuilders.tinyMCE.init();
Backend.emailTemplate.addHandlers();
Backend.tinyMCE.init();
},
// ! FinBuilders.emailTemplate.addHandlers
// ! Backend.emailTemplate.addHandlers
addHandlers: function () {
// to add placeholder in to active textarea
$("#addPlaceHolder").on('click', function (event) {
FinBuilders.emailTemplate.addPlaceHolder(event);
Backend.emailTemplate.addPlaceHolder(event);
});
$("#showPreview").on('click', function (event) {
FinBuilders.emailTemplate.showPreview(event);
Backend.emailTemplate.showPreview(event);
});
this.selectors.emailtemplateSelection.select2();
},
// ! FinBuilders.emailTemplate.addPlaceHolder
// ! Backend.emailTemplate.addPlaceHolder
addPlaceHolder: function (event) {
var placeHolder = $('#placeHolder').val();
if (placeHolder != '') {
......@@ -145,7 +145,7 @@ var FinBuilders = {
}
},
// ! FinBuilders.emailTemplate.showPreview
// ! Backend.emailTemplate.showPreview
showPreview: function (event) {
jQuery( ".modal-body" ).html(tinyMCE.get('txtBody').getContent());
$(".model-wrapper").modal('show');
......@@ -158,14 +158,14 @@ var FinBuilders = {
*/
Faq:
{
selectors:
selectors:
{
},
init: function ()
{
// this.addHandlers();
FinBuilders.tinyMCE.init();
Backend.tinyMCE.init();
},
addHandlers: function ()
......@@ -198,7 +198,7 @@ var FinBuilders = {
DataTableSearch: {
init: function (dataTable) {
// Header All search columns
$("div.dataTables_filter input").unbind();
$("div.dataTables_filter input").keypress( function (e)
......@@ -210,7 +210,7 @@ var FinBuilders = {
});
// Individual columns search
$('.search-input-text').on( 'keypress', function (e) {
$('.search-input-text').on( 'keypress', function (e) {
// for text boxes
if (e.keyCode == 13)
{
......@@ -221,7 +221,7 @@ var FinBuilders = {
});
// Individual columns search
$('.search-input-select').on( 'change', function (e) {
$('.search-input-select').on( 'change', function (e) {
// for dropdown
var i =$(this).attr('data-column'); // getting column index
var v =$(this).val(); // getting search input value
......@@ -229,13 +229,13 @@ var FinBuilders = {
});
// Individual columns reset
$('.reset-data').on( 'click', function (e) {
$('.reset-data').on( 'click', function (e) {
var textbox = $(this).prev('input'); // Getting closest input field
var i =textbox.attr('data-column'); // Getting column index
$(this).prev('input').val(''); // Blank the serch value
dataTable.api().columns(i).search("").draw();
});
//Copy button
$('#copyButton').click(function(){
$('.copyButton').trigger('click');
......
{
"/js/frontend.js": "/js/frontend.6600a6eb362abae28819.js",
"/js/backend.js": "/js/backend.d106d5f7e2110ee3cea7.js",
"/js/frontend.js": "/js/frontend.d3a9d9963b6da237bfe8.js",
"/js/backend.js": "/js/backend.51a14fd841ccd198e500.js",
"/mix.js": "/mix.247ab120fe7680658924.js",
"/css/frontend.css": "/css/frontend.90a13bfbf8d4ea6a30a8eb218e8d48b3.css",
"/css/backend.css": "/css/backend.7b6d826816293ff35f4185341567f559.css",
"/css/backend-custom.css": "/css/backend-custom.187b92dacd8c501e4a19407d700d279b.css",
"/js/backend-custom.js": "/js/backend-custom.bf0db4a7e7235e1c318af2c5dca556bd.js",
"/js/dataTable.js": "/js/dataTable.0db0f52a09a62d485aa1229ed981b1cf.js"
"/css/frontend.css": "/css/frontend.3af0a6cbd7d1d8d042f2a37e97008b7c.css",
"/css/backend.css": "/css/backend.f8550f50504e5b8ef6055285205f223a.css",
"/css/backend-custom.css": "/css/backend-custom.50f14193ab908e3cf471dea6cb6616ae.css",
"/js/backend-custom.js": "/js/backend-custom.69e7d487a5a38a38520a62a5c53584f9.js",
"/js/dataTable.js": "/js/dataTable.f968d300a6a0b871f138f114361259c8.js"
}
\ No newline at end of file
<?php
return [
'all' => 'Всички',
'date' => 'Дата',
'empty-logs' => 'Не са намерени логове!',
];
<?php
return [
'all' => 'Всички',
'emergency' => 'Emergency',
'alert' => 'Alert',
'critical' => 'Critical',
'error' => 'Error',
'warning' => 'Warning',
'notice' => 'Notice',
'info' => 'Info',
'debug' => 'Debug',
];
<?php
return [
'all' => 'Kõik',
'date' => 'Kuupäev',
'empty-logs' => 'Logide nimekiri on tühi!',
];
<?php
return [
'all' => 'Kõik',
'emergency' => 'Erakorraline',
'alert' => 'Häire',
'critical' => 'Kriitiline',
'error' => 'Viga',
'warning' => 'Hoiatus',
'notice' => 'Teade',
'info' => 'Info',
'debug' => 'Silumine',
];
<?php
return [
'all' => 'すべて',
'date' => '日付',
'empty-logs' => 'ログリストが空です!',
];
<?php
return [
'all' => 'すべて',
'emergency' => '緊急',
'alert' => '警戒',
'critical' => '致命的',
'error' => 'エラー',
'warning' => '警告',
'notice' => '通知',
'info' => '情報',
'debug' => 'デバッグ',
];
......@@ -22,22 +22,25 @@
</div><!-- /.box-header -->
<div class="box-body">
{{-- First Name --}}
<div class="form-group">
{{ Form::label('name', trans('validation.attributes.backend.access.users.firstName'), ['class' => 'col-lg-2 control-label required']) }}
{{ Form::label('First Name', trans('validation.attributes.backend.access.users.firstName'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::text('first_name', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.access.users.firstName'), 'required' => 'required']) }}
</div><!--col-lg-10-->
</div><!--form control-->
{{-- Last Name --}}
<div class="form-group">
{{ Form::label('name', trans('validation.attributes.backend.access.users.lastName'), ['class' => 'col-lg-2 control-label required']) }}
{{ Form::label('Last Name', trans('validation.attributes.backend.access.users.lastName'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::text('last_name', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.access.users.lastName'), 'required' => 'required']) }}
</div><!--col-lg-10-->
</div><!--form control-->
{{-- Email --}}
<div class="form-group">
{{ Form::label('email', trans('validation.attributes.backend.access.users.email'), ['class' => 'col-lg-2 control-label required']) }}
......@@ -46,6 +49,7 @@
</div><!--col-lg-10-->
</div><!--form control-->
{{-- Password --}}
<div class="form-group">
{{ Form::label('password', trans('validation.attributes.backend.access.users.password'), ['class' => 'col-lg-2 control-label required']) }}
......@@ -54,6 +58,7 @@
</div><!--col-lg-10-->
</div><!--form control-->
{{-- Password Confirmation --}}
<div class="form-group">
{{ Form::label('password_confirmation', trans('validation.attributes.backend.access.users.password_confirmation'), ['class' => 'col-lg-2 control-label required']) }}
......@@ -62,46 +67,7 @@
</div><!--col-lg-10-->
</div><!--form control-->
{{-- address --}}
<div class="form-group">
{{ Form::label('address', trans('validation.attributes.frontend.register-user.address'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
{{ Form::text('address', null, ['class' => 'form-control tinymce box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.address')]) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- state --}}
<div class="form-group">
{{ Form::label('state_id', trans('validation.attributes.frontend.register-user.state'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::select('state_id', [] , null, ['class' => 'form-control select2 box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.state'), 'id' => 'state', 'required' => 'required']) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- city --}}
<div class="form-group">
{{ Form::label('city_id', trans('validation.attributes.frontend.register-user.city'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::select('city_id', [], null, ['class' => 'form-control select2 box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.city'), 'id' => 'city', 'required' => 'required']) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- zipcode --}}
<div class="form-group">
{{ Form::label('zip_code', trans('validation.attributes.frontend.register-user.zipcode'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::input('name', 'zip_code', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.zipcode'), 'required' => 'required']) }}
</div><!--col-lg-6-->
</div><!--form-group-->
{{-- SSN --}}
<div class="form-group">
{{ Form::label('ssn', trans('validation.attributes.frontend.register-user.ssn'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::input('name', 'ssn', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.ssn'), 'required' => 'required']) }}
</div><!--col-lg-6-->
</div><!--form-group-->
{{-- Status --}}
<div class="form-group">
{{ Form::label('status', trans('validation.attributes.backend.access.users.active'), ['class' => 'col-lg-2 control-label']) }}
......@@ -115,6 +81,7 @@
</div><!--col-lg-1-->
</div><!--form control-->
{{-- Confirmed --}}
<div class="form-group">
{{ Form::label('confirmed', trans('validation.attributes.backend.access.users.confirmed'), ['class' => 'col-lg-2 control-label']) }}
......@@ -128,6 +95,7 @@
</div><!--col-lg-1-->
</div><!--form control-->
{{-- Confirmation Email --}}
<div class="form-group">
<label class="col-lg-2 control-label">{{ trans('validation.attributes.backend.access.users.send_confirmation_email') }}<br/>
<small>{{ trans('strings.backend.access.users.if_confirmed_off') }}</small>
......@@ -143,6 +111,7 @@
</div><!--col-lg-1-->
</div><!--form control-->
{{-- Associated Roles --}}
<div class="form-group">
{{ Form::label('status', trans('validation.attributes.backend.access.users.associated_roles'), ['class' => 'col-lg-2 control-label']) }}
......@@ -184,19 +153,21 @@
</div><!--col-lg-3-->
</div><!--form control-->
{{-- Associated Permissions --}}
<div class="form-group">
{{ Form::label('associated-permissions', trans('validation.attributes.backend.access.roles.associated_permissions'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
<div id="available-permissions" class="hidden mt-20" style="width: 700px; height: 200px; overflow-x: hidden; overflow-y: scroll;">
<div class="row">
<div class="col-xs-12 get-available-permissions">
</div><!--col-lg-6-->
</div><!--row-->
</div><!--available permissions-->
</div><!--col-lg-3-->
</div><!--form control-->
{{-- Buttons --}}
<div class="edit-form-btn">
{{ link_to_route('admin.access.user.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-md']) }}
{{ Form::submit(trans('buttons.general.crud.create'), ['class' => 'btn btn-primary btn-md']) }}
......@@ -211,45 +182,8 @@
{{ Html::script('js/backend/access/users/script.js') }}
<script type="text/javascript">
$(document).ready(function() {
FinBuilders.Access.init();
//Getting States of default contry
ajaxCall("{{route('admin.get.states')}}");
//Getting Cities of select State
$("#state").on("change", function() {
var stateId = $(this).val();
var url = "{{route('admin.get.cities')}}";
ajaxCall(url, stateId);
});
function ajaxCall(url, data = null)
{
$.ajax({
url: url,
type: "POST",
data: {stateId: data},
success: function(result) {
if(result != null)
{
var options;
$.each(result.data, function(key, value) {
options += "<option value='" + key + "'>" + value + "</option>";
});
if(result.status == "city")
{
$("#city").html('');
$("#city").append(options);
}
else
{
$("#state").append(options);
}
}
}
});
}
Backend.Access.init();
/**
* This function is used to get clicked element role id and return required result
......
......@@ -101,7 +101,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
......@@ -101,7 +101,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
$("body").on("click", "a[name='delete_user_perm']", function(e) {
e.preventDefault();
......
......@@ -22,6 +22,7 @@
</div><!-- /.box-header -->
<div class="box-body">
{{-- First Name --}}
<div class="form-group">
{{ Form::label('name', trans('validation.attributes.backend.access.users.firstName'), ['class' => 'col-lg-2 control-label required']) }}
......@@ -30,6 +31,7 @@
</div><!--col-lg-10-->
</div><!--form control-->
{{-- Last Name --}}
<div class="form-group">
{{ Form::label('name', trans('validation.attributes.backend.access.users.lastName'), ['class' => 'col-lg-2 control-label required']) }}
......@@ -38,6 +40,7 @@
</div><!--col-lg-10-->
</div><!--form control-->
{{-- Email --}}
<div class="form-group">
{{ Form::label('email', trans('validation.attributes.backend.access.users.email'), ['class' => 'col-lg-2 control-label required']) }}
......@@ -46,46 +49,7 @@
</div><!--col-lg-10-->
</div><!--form control-->
{{-- address --}}
<div class="form-group">
{{ Form::label('address', trans('validation.attributes.frontend.register-user.address'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
{{ Form::input('textarea', 'address', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.address'), 'rows' => '3']) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- state --}}
<div class="form-group">
{{ Form::label('state_id', trans('validation.attributes.frontend.register-user.state'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::select('state_id', [] , null, ['class' => 'form-control select2 box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.state'), 'id' => 'state', 'required' => 'required']) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- city --}}
<div class="form-group">
{{ Form::label('city_id', trans('validation.attributes.frontend.register-user.city'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::select('city_id', [], null, ['class' => 'form-control select2 box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.city'), 'id' => 'city', 'required' => 'required']) }}
</div><!--col-lg-10-->
</div><!--form-group-->
{{-- zipcode --}}
<div class="form-group">
{{ Form::label('zip_code', trans('validation.attributes.frontend.register-user.zipcode'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::input('name', 'zip_code', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.zipcode'), 'required' => 'required']) }}
</div><!--col-lg-6-->
</div><!--form-group-->
{{-- SSN --}}
<div class="form-group">
{{ Form::label('ssn', trans('validation.attributes.frontend.register-user.ssn'), ['class' => 'col-lg-2 control-label required']) }}
<div class="col-lg-10">
{{ Form::input('name', 'ssn', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.ssn'), 'required' => 'required']) }}
</div><!--col-lg-6-->
</div><!--form-group-->
{{-- Status --}}
@if ($user->id != 1)
<div class="form-group">
{{ Form::label('status', trans('validation.attributes.backend.access.users.active'), ['class' => 'col-lg-2 control-label']) }}
......@@ -99,6 +63,7 @@
</div><!--col-lg-1-->
</div><!--form control-->
{{-- Confirmed --}}
<div class="form-group">
{{ Form::label('confirmed', trans('validation.attributes.backend.access.users.confirmed'), ['class' => 'col-lg-2 control-label']) }}
......@@ -112,6 +77,7 @@
</div><!--col-lg-1-->
</div><!--form control-->
{{-- Associated Roles --}}
<div class="form-group">
{{ Form::label('status', trans('validation.attributes.backend.access.users.associated_roles'), ['class' => 'col-lg-2 control-label']) }}
......@@ -153,6 +119,7 @@
</div><!--col-lg-3-->
</div><!--form control-->
{{-- Associated Permissions --}}
<div class="form-group">
{{ Form::label('associated-permissions', trans('validation.attributes.backend.access.roles.associated_permissions'), ['class' => 'col-lg-2 control-label']) }}
<div class="col-lg-10">
......@@ -161,7 +128,7 @@
<div class="col-xs-12 get-available-permissions">
@if ($permissions)
@foreach ($permissions as $id => $display_name)
<div class="control-group">
<div class="control-group">
<label class="control control--checkbox" for="perm_{{ $id }}">
<input type="checkbox" name="permissions[{{ $id }}]" value="{{ $id }}" id="perm_{{ $id }}" {{ isset($userPermissions[$id]) && in_array($id, $userPermissions) ? 'checked' : '' }} /> <label for="perm_{{ $id }}">{{ $display_name }}</label>
<div class="control__indicator"></div>
......@@ -199,63 +166,12 @@
{{ Html::script('js/backend/access/users/script.js') }}
<script type="text/javascript">
$(document).ready(function() {
//Getting States of default contry
ajaxCall("{{route('admin.get.states')}}");
FinBuilders.Access.init();
//Getting Cities of select State
$("#state").on("change", function() {
var stateId = $(this).val();
var url = "{{route('admin.get.cities')}}";
ajaxCall(url, stateId);
});
function ajaxCall(url, data = null)
{
$.ajax({
url: url,
type: "POST",
data: {stateId: data},
success: function(result) {
if(result != null)
{
if(result.status == "city")
{
var userCity = "{{ $user->city_id }}";
var options;
$.each(result.data, function(key, value) {
if(key == userCity)
options += "<option value='" + key + "' selected>" + value + "</option>";
else
options += "<option value='" + key + "'>" + value + "</option>";
});
$("#city").html('');
$("#city").append(options);
}
else
{
var userState = "{{ $user->state_id }}";
var options;
$.each(result.data, function(key, value) {
if(key == userState)
options += "<option value='" + key + "' selected>" + value + "</option>";
else
options += "<option value='" + key + "'>" + value + "</option>";
});
$("#state").append(options);
$("#state").trigger('change');
}
}
}
});
}
jQuery(document).ready(function() {
Backend.Access.init();
/**
* This function is used to get clicked element role id and return required result
*/
$('.get-role-for-permissions').click(function () {
jQuery('.get-role-for-permissions').click(function () {
$.ajax({
type: "POST",
url: "{{ route('admin.get.permission') }}",
......
......@@ -91,7 +91,7 @@
data: {status: 1, trashed: false}
},
columns: [
{data: 'first_name', name: '{{config('access.users_table')}}.first_name'},
{data: 'last_name', name: '{{config('access.users_table')}}.last_name'},
{data: 'email', name: '{{config('access.users_table')}}.email'},
......@@ -115,7 +115,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
......@@ -65,7 +65,7 @@
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#permissions-table').dataTable({
......@@ -95,9 +95,9 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
\ No newline at end of file
......@@ -68,7 +68,7 @@
{{ Form::input('name', 'ssn', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.frontend.register-user.ssn')]) }}
</div><!--col-lg-10-->
</div><!--form-group-->
<div class="form-group">
<div class="col-lg-10 col-md-offset-4">
{{ Form::submit(trans('labels.general.buttons.update'), ['class' => 'btn btn-primary', 'id' => 'update-profile']) }}
......@@ -82,11 +82,11 @@
<script type="text/javascript">
$(document).ready(function() {
FinBuilders.Profile.init();
Backend.Profile.init();
//Getting States of default contry
ajaxCall("{{route('admin.get.states')}}");
//Getting Cities of select State
$("#state").on("change", function() {
......
......@@ -90,7 +90,7 @@
{{ Html::script('js/backend/access/roles/script.js') }}
<script type="text/javascript">
$(document).ready(function() {
FinBuilders.Access.init();
Backend.Access.init();
});
</script>
@endsection
......@@ -82,7 +82,7 @@
{{ Html::script('js/backend/access/roles/script.js') }}
<script type="text/javascript">
$(document).ready(function() {
FinBuilders.Access.init();
Backend.Access.init();
});
</script>
@endsection
\ No newline at end of file
......@@ -67,7 +67,7 @@
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#roles-table').dataTable({
......@@ -98,7 +98,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
\ No newline at end of file
......@@ -63,7 +63,7 @@
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#blogcategories-table').dataTable({
......@@ -94,7 +94,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
\ No newline at end of file
......@@ -125,8 +125,8 @@
@section("after-scripts")
<script type="text/javascript">
FinBuilders.Blog.init();
Backend.Blog.init();
//For Blog datetimepicker for publish_datetime
$('#datetimepicker1').datetimepicker();
......
......@@ -65,7 +65,7 @@
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#blogs-table').dataTable({
......@@ -97,7 +97,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
\ No newline at end of file
......@@ -63,7 +63,7 @@
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#blogtags-table').dataTable({
......@@ -94,7 +94,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
\ No newline at end of file
......@@ -107,6 +107,6 @@
@endsection
@section("after-scripts")
<script type="text/javascript">
FinBuilders.emailTemplate.init();
Backend.emailTemplate.init();
</script>
@endsection
\ No newline at end of file
......@@ -10,7 +10,7 @@
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">{{ trans('labels.backend.emailtemplates.management') }}</h3>
<div class="box-tools pull-right">
<div class="btn-group">
<button type="button" class="btn btn-warning btn-flat dropdown-toggle" data-toggle="dropdown">Export
......@@ -81,7 +81,7 @@
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#emailtemplates-table').dataTable({
......@@ -113,7 +113,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
\ No newline at end of file
......@@ -34,6 +34,6 @@
</div>
@section('after-scripts')
<script type="text/javascript">
FinBuilders.Faq.init();
Backend.Faq.init();
</script>
@endsection
\ No newline at end of file
......@@ -67,7 +67,7 @@
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#faqs-table').dataTable({
......@@ -98,7 +98,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
\ No newline at end of file
......@@ -93,6 +93,6 @@
@endsection
@section("after-scripts")
<script type="text/javascript">
FinBuilders.Pages.init();
Backend.Cmspage.init();
</script>
@endsection
......@@ -93,6 +93,6 @@
@endsection
@section("after-scripts")
<script type="text/javascript">
FinBuilders.Cmspage.init();
Backend.Cmspage.init();
</script>
@endsection
\ No newline at end of file
......@@ -57,13 +57,13 @@
<div class="box-body">
{{-- {!! history()->renderType('CMSpage') !!} --}}
</div><!-- /.box-body -->
</div><!--box box-success-->
</div><!--box box-success-->
@endsection
@section('after-scripts')
{{-- For DataTables --}}
{{ Html::script(mix('js/dataTable.js')) }}
<script>
$(function() {
var dataTable = $('#pages-table').dataTable({
......@@ -94,7 +94,7 @@
}
});
FinBuilders.DataTableSearch.init(dataTable);
Backend.DataTableSearch.init(dataTable);
});
</script>
@endsection
\ No newline at end of file
......@@ -86,17 +86,17 @@
{{ Form::input('name', 'ssn', null, ['class' => 'form-control', 'placeholder' => trans('validation.attributes.frontend.register-user.ssn')]) }}
</div><!--col-md-6-->
</div><!--form-group-->
<div class="form-group">
<div class="col-xs-7">
<label class="col-md-12 control-label">
{!! Form::checkbox('is_term_accept',1,false) !!}
I accept {!! link_to_route('frontend.cmspages.show', trans('validation.attributes.frontend.register-user.terms_and_conditions').'*', ['page_slug'=>'terms-and-conditions']) !!} </label>
</div><!--form-group-->
</div><!--col-md-6-->
......@@ -135,8 +135,8 @@
$(document).ready(function() {
// To Use Select2
FinBuilders.Select2.init();
Backend.Select2.init();
//Getting States of default contry
ajaxCall("{{route('frontend.get.states')}}");
......
......@@ -66,8 +66,8 @@
$(document).ready(function() {
// To Use Select2
FinBuilders.Select2.init();
Backend.Select2.init();
if($.session.get("tab") == "edit")
{
$("#li-password").removeClass("active");
......@@ -92,7 +92,7 @@
//Getting States of default contry
ajaxCall("{{route('frontend.get.states')}}");
//Getting Cities of select State
$("#state").on("change", function() {
......
<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="{{ $url }}" class="button button-{{ $color or 'blue' }}" target="_blank">{{ $slot }}</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<tr>
<td>
<table class="footer" align="center" width="570" cellpadding="0" cellspacing="0">
<tr>
<td class="content-cell" align="center">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="header">
<a href="{{ $url }}">
{{ $slot }}
</a>
</td>
</tr>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<style>
@media only screen and (max-width: 600px) {
.inner-body {
width: 100% !important;
}
.footer {
width: 100% !important;
}
}
@media only screen and (max-width: 500px) {
.button {
width: 100% !important;
}
}
</style>
<table class="wrapper" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table class="content" width="100%" cellpadding="0" cellspacing="0">
{{ $header or '' }}
<!-- Email Body -->
<tr>
<td class="body" width="100%" cellpadding="0" cellspacing="0">
<table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0">
<!-- Body content -->
<tr>
<td class="content-cell">
{{ Illuminate\Mail\Markdown::parse($slot) }}
{{ $subcopy or '' }}
</td>
</tr>
</table>
</td>
</tr>
{{ $footer or '' }}
</table>
</td>
</tr>
</table>
</body>
</html>
@component('mail::layout')
{{-- Header --}}
@slot('header')
@component('mail::header', ['url' => config('app.url')])
{{ config('app.name') }}
@endcomponent
@endslot
{{-- Body --}}
{{ $slot }}
{{-- Subcopy --}}
@isset($subcopy)
@slot('subcopy')
@component('mail::subcopy')
{{ $subcopy }}
@endcomponent
@endslot
@endisset
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
&copy; {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
@endcomponent
@endslot
@endcomponent
<table class="panel" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="panel-content">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="panel-item">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="promotion" align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="{{ $url }}" class="button button-green" target="_blank">{{ $slot }}</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="subcopy" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
{{ Illuminate\Mail\Markdown::parse($slot) }}
</td>
</tr>
</table>
<div class="table">
{{ Illuminate\Mail\Markdown::parse($slot) }}
</div>
/* Base */
body, body *:not(html):not(style):not(br):not(tr):not(code) {
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
}
body {
background-color: #f5f8fa;
color: #74787E;
height: 100%;
hyphens: auto;
line-height: 1.4;
margin: 0;
-moz-hyphens: auto;
-ms-word-break: break-all;
width: 100% !important;
-webkit-hyphens: auto;
-webkit-text-size-adjust: none;
word-break: break-all;
word-break: break-word;
}
p,
ul,
ol,
blockquote {
line-height: 1.4;
text-align: left;
}
a {
color: #3869D4;
}
a img {
border: none;
}
/* Typography */
h1 {
color: #2F3133;
font-size: 19px;
font-weight: bold;
margin-top: 0;
text-align: left;
}
h2 {
color: #2F3133;
font-size: 16px;
font-weight: bold;
margin-top: 0;
text-align: left;
}
h3 {
color: #2F3133;
font-size: 14px;
font-weight: bold;
margin-top: 0;
text-align: left;
}
p {
color: #74787E;
font-size: 16px;
line-height: 1.5em;
margin-top: 0;
text-align: left;
}
p.sub {
font-size: 12px;
}
img {
max-width: 100%;
}
/* Layout */
.wrapper {
background-color: #f5f8fa;
margin: 0;
padding: 0;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.content {
margin: 0;
padding: 0;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
/* Header */
.header {
padding: 25px 0;
text-align: center;
}
.header a {
color: #bbbfc3;
font-size: 19px;
font-weight: bold;
text-decoration: none;
text-shadow: 0 1px 0 white;
}
/* Body */
.body {
background-color: #FFFFFF;
border-bottom: 1px solid #EDEFF2;
border-top: 1px solid #EDEFF2;
margin: 0;
padding: 0;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.inner-body {
background-color: #FFFFFF;
margin: 0 auto;
padding: 0;
width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 570px;
}
/* Subcopy */
.subcopy {
border-top: 1px solid #EDEFF2;
margin-top: 25px;
padding-top: 25px;
}
.subcopy p {
font-size: 12px;
}
/* Footer */
.footer {
margin: 0 auto;
padding: 0;
text-align: center;
width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 570px;
}
.footer p {
color: #AEAEAE;
font-size: 12px;
text-align: center;
}
/* Tables */
.table table {
margin: 30px auto;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.table th {
border-bottom: 1px solid #EDEFF2;
padding-bottom: 8px;
margin: 0;
}
.table td {
color: #74787E;
font-size: 15px;
line-height: 18px;
padding: 10px 0;
margin: 0;
}
.content-cell {
padding: 35px;
}
/* Buttons */
.action {
margin: 30px auto;
padding: 0;
text-align: center;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.button {
border-radius: 3px;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
color: #FFF;
display: inline-block;
text-decoration: none;
-webkit-text-size-adjust: none;
}
.button-blue {
background-color: #3097D1;
border-top: 10px solid #3097D1;
border-right: 18px solid #3097D1;
border-bottom: 10px solid #3097D1;
border-left: 18px solid #3097D1;
}
.button-green {
background-color: #2ab27b;
border-top: 10px solid #2ab27b;
border-right: 18px solid #2ab27b;
border-bottom: 10px solid #2ab27b;
border-left: 18px solid #2ab27b;
}
.button-red {
background-color: #bf5329;
border-top: 10px solid #bf5329;
border-right: 18px solid #bf5329;
border-bottom: 10px solid #bf5329;
border-left: 18px solid #bf5329;
}
/* Panels */
.panel {
margin: 0 0 21px;
}
.panel-content {
background-color: #EDEFF2;
padding: 16px;
}
.panel-item {
padding: 0;
}
.panel-item p:last-of-type {
margin-bottom: 0;
padding-bottom: 0;
}
/* Promotions */
.promotion {
background-color: #FFFFFF;
border: 2px dashed #9BA2AB;
margin: 0;
margin-bottom: 25px;
margin-top: 25px;
padding: 24px;
width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
-premailer-width: 100%;
}
.promotion h1 {
text-align: center;
}
.promotion p {
font-size: 15px;
text-align: center;
}
{!! strip_tags($header) !!}
{!! strip_tags($slot) !!}
@isset($subcopy)
{!! strip_tags($subcopy) !!}
@endisset
{!! strip_tags($footer) !!}
@component('mail::layout')
{{-- Header --}}
@slot('header')
@component('mail::header', ['url' => config('app.url')])
{{ config('app.name') }}
@endcomponent
@endslot
{{-- Body --}}
{{ $slot }}
{{-- Subcopy --}}
@isset($subcopy)
@slot('subcopy')
@component('mail::subcopy')
{{ $subcopy }}
@endcomponent
@endslot
@endisset
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
@endcomponent
@endslot
@endcomponent
@if ($paginator->hasPages())
<div class="ui pagination menu">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<a class="icon item disabled"> <i class="left chevron icon"></i> </a>
@else
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev"> <i class="left chevron icon"></i> </a>
@endif
{{-- Pagination Elements --}}
@foreach ($elements as $element)
{{-- "Three Dots" Separator --}}
@if (is_string($element))
<a class="icon item disabled">{{ $element }}</a>
@endif
{{-- Array Of Links --}}
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<a class="item active" href="{{ $url }}">{{ $page }}</a>
@else
<a class="item" href="{{ $url }}">{{ $page }}</a>
@endif
@endforeach
@endif
@endforeach
{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next"> <i class="right chevron icon"></i> </a>
@else
<a class="icon item disabled"> <i class="right chevron icon"></i> </a>
@endif
</div>
@endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment