diff --git a/.dockerignore b/.dockerignore index d6c5a4cf01..23ec116755 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ .git -Dockerfile .dockerignore app/storage/logs/* app/storage/views/* -vendor/* \ No newline at end of file +vendor/* diff --git a/Dockerfile b/Dockerfile index 89b8a0f914..9d555457d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,19 @@ FROM ubuntu MAINTAINER Brady Wetherington -# Merging all apt-stuff together -####RUN apt-get install -y apache2-bin libapache2-mod-php5 php5-mysql - RUN apt-get update && apt-get install -y \ apache2-bin \ libapache2-mod-php5 \ php5-mysql \ +php5-mcrypt \ +php5-gd \ patch \ curl \ -git \ -php5-mcrypt - -#expect - -# stopped using expect (!) +vim \ +git RUN php5enmod mcrypt - -#RUN echo "include_path=/var/www/html/include" >> /etc/php5/apache2/php.ini +RUN php5enmod gd RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php5/apache2/php.ini RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php5/cli/php.ini @@ -29,18 +23,12 @@ RUN useradd --uid 1000 --gid 50 docker RUN echo export APACHE_RUN_USER=docker >> /etc/apache2/envvars RUN echo export APACHE_RUN_GROUP=staff >> /etc/apache2/envvars -#COPY httpd.conf /etc/apache2/apache2.conf - COPY docker/000-default.conf /etc/apache2/sites-enabled/000-default.conf COPY . /var/www/html -#apachectl start - RUN a2enmod rewrite -#RUN apt-get install -y patch - ############ INITIAL APPLICATION SETUP ##################### COPY docker/app_start.patch /tmp/app_start.patch @@ -71,19 +59,16 @@ RUN cp -n /var/www/html/app/config/production/app.example.php /var/www/html/app/ # Change default hostname to blank...I guess? RUN sed -i s%http://staging.yourserver.com%% /var/www/html/app/config/production/app.php +# turn off the toolbar +RUN sed -i 's%\x27debug\x27 => true%\x27debug\x27 => false%' /var/www/html/app/config/production/app.php + RUN chown -R docker /var/www/html ############## DEPENDENCIES via COMPOSER ################### -# get curl (this feels yucky, doesn' it?) -#RUN apt-get install -y curl - #global install of composer RUN cd /tmp;curl -sS https://getcomposer.org/installer | php;mv /tmp/composer.phar /usr/local/bin/composer -# Composer won't install without git (doctrine/inflector specifically?) -#RUN apt-get install -y git - # Get dependencies RUN cd /var/www/html;composer install @@ -100,4 +85,4 @@ RUN cd /var/www/html;composer install CMD . /etc/apache2/envvars ;apache2 -DFOREGROUND -EXPOSE 80 \ No newline at end of file +EXPOSE 80 diff --git a/app/commands/AppCommand.php b/app/commands/AppCommand.php index 9c47fb10b2..57a08e9890 100755 --- a/app/commands/AppCommand.php +++ b/app/commands/AppCommand.php @@ -100,12 +100,16 @@ class AppCommand extends Command // Seed the tables with dummy data if( $this->dummyData === true ) { - $this->call('db:seed'); + $this->call('db:seed', array('--force'=>true)); } else { // Seeding Settings table is mandatory - $this->call('db:seed', array('--class' => 'SettingsSeeder')); + $this->call('db:seed', array('--class' => 'SettingsSeeder', '--force'=>true)); + // Seeding Statuslabels is strongly recommended + $this->call('db:seed', array('--class' => 'StatuslabelsSeeder', '--force'=>true)); + // Seeding Categories is good to have + $this->call('db:seed', array('--class' => 'CategoriesSeeder', '--force'=>true)); } } diff --git a/app/commands/SendExpirationAlerts.php b/app/commands/SendExpirationAlerts.php new file mode 100644 index 0000000000..d419345b70 --- /dev/null +++ b/app/commands/SendExpirationAlerts.php @@ -0,0 +1,94 @@ +warrantee_expires(); + $difference = round(abs(strtotime($expires) - strtotime($now))/86400); + + if ($difference > 30) { + $data['email_content'] .= ''; + } else { + $data['email_content'] .= ''; + } + $data['email_content'] .= ''; + $data['email_content'] .= $asset->name.''.$asset->asset_tag.''; + $data['email_content'] .= ''.$asset->warrantee_expires().''; + $data['email_content'] .= ''.$difference.' days'; + $data['email_content'] .= ''; + } + + if ((Setting::getSettings()->alert_email!='') && (Setting::getSettings()->alerts_enabled==1)){ + + if (count($expiring_assets) > 0) { + + Mail::send('emails.expiring-report', $data, function ($m) { + $m->to(Setting::getSettings()->alert_email, Setting::getSettings()->site_name); + $m->subject('Expiring Assets Report'); + }); + + } + + } else { + + if (Setting::getSettings()->alert_email=='') { + echo "Could not send email. No alert email configured in settings. \n"; + } elseif (Setting::getSettings()->alerts_enabled!=1) { + echo "Alerts are disabled in the settings. No mail will be sent. \n"; + } + + } + + + + + } + + + + + +} diff --git a/app/config/app.php b/app/config/app.php index 7ac5fccc04..ff4ee138d3 100755 --- a/app/config/app.php +++ b/app/config/app.php @@ -43,6 +43,20 @@ return array( */ 'cipher' => MCRYPT_RIJNDAEL_256, + + /* + |-------------------------------------------------------------------------- + | Prevent Password changes + |-------------------------------------------------------------------------- + | + | If for some reason you do not wish for admins to be able to edit the password + | for any user (including themselves), set this to true. + | + */ + + 'lock_passwords' => false, + + /* |-------------------------------------------------------------------------- diff --git a/app/controllers/account/ChangeEmailController.php b/app/controllers/account/ChangeEmailController.php index bd89b968ae..8ef3e8d19b 100755 --- a/app/controllers/account/ChangeEmailController.php +++ b/app/controllers/account/ChangeEmailController.php @@ -6,6 +6,8 @@ use Redirect; use Sentry; use Validator; use View; +use Config; +use Lang; class ChangeEmailController extends AuthorizedController { @@ -36,34 +38,39 @@ class ChangeEmailController extends AuthorizedController 'email' => 'required|email|unique:users,email,'.Sentry::getUser()->email.',email', 'email_confirm' => 'required|same:email', ); + + if (Config::get('app.lock_passwords')) { + return Redirect::route('change-password')->with('error', Lang::get('admin/users/table.lock_passwords')); + } else { - // Create a new validator instance from our validation rules - $validator = Validator::make(Input::all(), $rules); - - // If validation fails, we'll exit the operation now. - if ($validator->fails()) { - // Ooops.. something went wrong - return Redirect::back()->withInput()->withErrors($validator); - } - - // Grab the user - $user = Sentry::getUser(); - - // Check the user current password - if ( ! $user->checkPassword(Input::get('current_password'))) { - // Set the error message - $this->messageBag->add('current_password', 'Your current password is incorrect'); - - // Redirect to the change email page - return Redirect::route('change-email')->withErrors($this->messageBag); - } - - // Update the user email - $user->email = Input::get('email'); - $user->save(); - - // Redirect to the settings page - return Redirect::route('change-email')->with('success', 'Email successfully updated'); + // Create a new validator instance from our validation rules + $validator = Validator::make(Input::all(), $rules); + + // If validation fails, we'll exit the operation now. + if ($validator->fails()) { + // Ooops.. something went wrong + return Redirect::back()->withInput()->withErrors($validator); + } + + // Grab the user + $user = Sentry::getUser(); + + // Check the user current password + if ( ! $user->checkPassword(Input::get('current_password'))) { + // Set the error message + $this->messageBag->add('current_password', 'Your current password is incorrect'); + + // Redirect to the change email page + return Redirect::route('change-email')->withErrors($this->messageBag); + } + + // Update the user email + $user->email = Input::get('email'); + $user->save(); + + // Redirect to the settings page + return Redirect::route('change-email')->with('success', 'Email successfully updated'); + } } } diff --git a/app/controllers/account/ChangePasswordController.php b/app/controllers/account/ChangePasswordController.php index 5626c5551d..29e1737151 100755 --- a/app/controllers/account/ChangePasswordController.php +++ b/app/controllers/account/ChangePasswordController.php @@ -6,6 +6,8 @@ use Redirect; use Sentry; use Validator; use View; +use Config; +use Lang; class ChangePasswordController extends AuthorizedController { @@ -37,6 +39,9 @@ class ChangePasswordController extends AuthorizedController 'password_confirm' => 'required|same:password', ); + if (Config::get('app.lock_passwords')) { + return Redirect::route('change-password')->with('error', Lang::get('admin/users/table.lock_passwords')); + } else { // Create a new validator instance from our validation rules $validator = Validator::make(Input::all(), $rules); @@ -61,6 +66,7 @@ class ChangePasswordController extends AuthorizedController // Update the user password $user->password = Input::get('password'); $user->save(); + } // Redirect to the change-password page return Redirect::route('change-password')->with('success', 'Password successfully updated'); diff --git a/app/controllers/account/ViewAssetsController.php b/app/controllers/account/ViewAssetsController.php index 4732581186..b9098a62d9 100755 --- a/app/controllers/account/ViewAssetsController.php +++ b/app/controllers/account/ViewAssetsController.php @@ -8,6 +8,8 @@ use Validator; use Location; use View; use Asset; +use Actionlog; +use Lang; class ViewAssetsController extends AuthorizedController { @@ -55,6 +57,53 @@ class ViewAssetsController extends AuthorizedController } + + + + // Get the acceptance screen + public function getAcceptAsset($assetId = null) { + + // Check if the asset exists + if (is_null($asset = Asset::find($assetId))) { + // Redirect to the asset management page + return Redirect::to('account')->with('error', Lang::get('admin/hardware/message.does_not_exist')); + } + + return View::make('frontend/account/accept-asset', compact('asset')); + + + + + } + + // Save the acceptance + public function postAcceptAsset($assetId = null) { + + // Check if the asset exists + if (is_null($asset = Asset::find($assetId))) { + // Redirect to the asset management page + return Redirect::to('account')->with('error', Lang::get('admin/hardware/message.does_not_exist')); + } + + $user = Sentry::getUser(); + + + $logaction = new Actionlog(); + $logaction->asset_id = $assetId; + $logaction->checkedout_to = $asset->assigned_to; + $logaction->asset_type = 'hardware'; + $logaction->note = e(Input::get('note')); + $logaction->user_id = $user->id; + $logaction->accepted_at = date("Y-m-d h:i:s"); + $log = $logaction->logaction('accepted'); + + return Redirect::to('account/view-assets')->with('success', 'You have successfully accept this asset.'); + + + + + } + } diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 43e62a2057..c99c77d945 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -22,6 +22,7 @@ use Config; use Location; use Log; use DNS2D; +use Mail; class AssetsController extends AdminController { @@ -238,7 +239,10 @@ class AssetsController extends AdminController // Grab the dropdown list of models - $model_list = array('' => '') + Model::orderBy('name', 'asc')->lists('name', 'id'); + $model_list = array('' => '') + DB::table('models') + ->select(DB::raw('concat(name," / ",modelno) as name, id'))->orderBy('name', 'asc') + ->orderBy('modelno', 'asc') + ->lists('name', 'id'); $supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id'); $location_list = array('' => '') + Location::orderBy('name', 'asc')->lists('name', 'id'); @@ -428,7 +432,7 @@ class AssetsController extends AdminController // Check if the user exists - if (is_null($assigned_to = User::find($assigned_to))) { + if (is_null($user = User::find($assigned_to))) { // Redirect to the asset management page with error return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.user_does_not_exist')); } @@ -442,10 +446,23 @@ class AssetsController extends AdminController $logaction->asset_id = $asset->id; $logaction->checkedout_to = $asset->assigned_to; $logaction->asset_type = 'hardware'; - $logaction->location_id = $assigned_to->location_id; + $logaction->location_id = $user->location_id; $logaction->user_id = Sentry::getUser()->id; $logaction->note = e(Input::get('note')); $log = $logaction->logaction('checkout'); + + $data['asset_id'] = $asset->id; + $data['eula'] = $asset->getEula(); + $data['first_name'] = $user->first_name; + + + if ($asset->requireAcceptance()=='1') { + + Mail::send('emails.accept-asset', $data, function ($m) use ($user) { + $m->to($user->email, $user->first_name . ' ' . $user->last_name); + $m->subject('Confirm asset delivery'); + }); + } // Redirect to the new asset page return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.checkout.success')); @@ -860,6 +877,8 @@ class AssetsController extends AdminController return Redirect::to("hardware"); } - - + + + + } diff --git a/app/controllers/admin/CategoriesController.php b/app/controllers/admin/CategoriesController.php index 0ead440178..89e4bdd888 100755 --- a/app/controllers/admin/CategoriesController.php +++ b/app/controllers/admin/CategoriesController.php @@ -63,8 +63,11 @@ class CategoriesController extends AdminController else{ // Update the category data - $category->name = e(Input::get('name')); - $category->user_id = Sentry::getId(); + $category->name = e(Input::get('name')); + $category->eula_text = e(Input::get('eula_text')); + $category->use_default_eula = e(Input::get('use_default_eula', '1')); + $category->require_acceptance = e(Input::get('require_acceptance', '0')); + $category->user_id = Sentry::getId(); // Was the asset created? if($category->save()) { @@ -133,6 +136,9 @@ class CategoriesController extends AdminController // Update the category data $category->name = e(Input::get('name')); + $category->eula_text = e(Input::get('eula_text')); + $category->use_default_eula = e(Input::get('use_default_eula', '1')); + $category->require_acceptance = e(Input::get('require_acceptance', '0')); // Was the asset created? if($category->save()) { diff --git a/app/controllers/admin/SettingsController.php b/app/controllers/admin/SettingsController.php index 567c0215e6..a3a70abd02 100755 --- a/app/controllers/admin/SettingsController.php +++ b/app/controllers/admin/SettingsController.php @@ -65,9 +65,10 @@ class SettingsController extends AdminController // Declare the rules for the form validation $rules = array( "site_name" => 'required|min:3', - "per_page" => 'required|min:1|numeric', + "per_page" => 'required|min:1|numeric', "qr_text" => 'min:1|max:31', "logo" => 'mimes:jpeg,bmp,png,gif', + "alert_email" => 'email', ); // Create a new validator instance from our validation rules @@ -106,7 +107,10 @@ class SettingsController extends AdminController $setting->qr_text = e(Input::get('qr_text')); $setting->auto_increment_prefix = e(Input::get('auto_increment_prefix')); $setting->auto_increment_assets = e(Input::get('auto_increment_assets', '0')); + $setting->alert_email = e(Input::get('alert_email')); + $setting->alerts_enabled = e(Input::get('alerts_enabled', '0')); $setting->header_color = e(Input::get('header_color')); + $setting->default_eula_text = e(Input::get('default_eula_text')); // Was the asset updated? diff --git a/app/controllers/admin/UsersController.php b/app/controllers/admin/UsersController.php index c54506e589..5f1fcfa4e2 100755 --- a/app/controllers/admin/UsersController.php +++ b/app/controllers/admin/UsersController.php @@ -672,13 +672,9 @@ class UsersController extends AdminController } else { $activated = '0'; } - - - if (Input::get('generate_password')==1) { - $pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10); - } else { - $pass = ''; - } + + $pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 10); + try { @@ -736,6 +732,7 @@ class UsersController extends AdminController return Redirect::route('users')->with('duplicates',$duplicates)->with('success', 'Success'); } + diff --git a/app/database/migrations/2015_02_24_072043_add_alerts_to_settings.php b/app/database/migrations/2015_02_24_072043_add_alerts_to_settings.php new file mode 100644 index 0000000000..8a208457ea --- /dev/null +++ b/app/database/migrations/2015_02_24_072043_add_alerts_to_settings.php @@ -0,0 +1,36 @@ +string('alert_email')->nullable()->default(NULL); + $table->boolean('alerts_enabled')->default(1); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + Schema::table('settings', function ($table) { + $table->dropColumn('alert_email'); + $table->dropColumn('alerts_enabled'); + }); + } + +} diff --git a/app/database/migrations/2015_02_25_022931_add_eula_fields.php b/app/database/migrations/2015_02_25_022931_add_eula_fields.php new file mode 100644 index 0000000000..36d53d54cc --- /dev/null +++ b/app/database/migrations/2015_02_25_022931_add_eula_fields.php @@ -0,0 +1,69 @@ +longText('default_eula_text'); + }); + + Schema::table('categories', function ($table) { + $table->longText('eula_text'); + $table->boolean('use_default_eula')->default(0); + $table->boolean('require_acceptance')->default(0); + }); + + Schema::table('asset_logs', function ($table) { + $table->dateTime('requested_at')->nullable()->default(NULL); + $table->dateTime('accepted_at')->nullable()->default(NULL); + }); + + + Schema::create('requested_assets', function ($table) { + $table->increments('id'); + $table->integer('asset_id')->default(NULL); + $table->integer('user_id')->default(NULL); + $table->dateTime('accepted_at')->nullable()->default(NULL); + $table->dateTime('denied_at')->nullable()->default(NULL); + $table->string('notes')->default(NULL); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + Schema::table('settings', function ($table) { + $table->dropColumn('default_eula_text'); + }); + + Schema::table('categories', function ($table) { + $table->dropColumn('eula_text'); + $table->dropColumn('use_default_eula'); + $table->dropColumn('require_acceptance'); + }); + + Schema::table('asset_logs', function ($table) { + $table->dropColumn('requested_at'); + $table->dropColumn('accepted_at'); + }); + + Schema::drop('requested_assets'); + } + +} diff --git a/app/database/seeds/CategoriesSeeder.php b/app/database/seeds/CategoriesSeeder.php index 0aae16f614..5d1e1ce054 100755 --- a/app/database/seeds/CategoriesSeeder.php +++ b/app/database/seeds/CategoriesSeeder.php @@ -12,6 +12,8 @@ class CategoriesSeeder extends Seeder 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'user_id' => 1, + 'use_default_eula' => 0, + 'require_acceptance' => 0, 'deleted_at' => NULL, ); @@ -21,6 +23,8 @@ class CategoriesSeeder extends Seeder 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'user_id' => 1, + 'use_default_eula' => 0, + 'require_acceptance' => 0, 'deleted_at' => NULL, ); @@ -30,6 +34,8 @@ class CategoriesSeeder extends Seeder 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'user_id' => 1, + 'use_default_eula' => 0, + 'require_acceptance' => 0, 'deleted_at' => NULL, ); @@ -39,6 +45,8 @@ class CategoriesSeeder extends Seeder 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'user_id' => 1, + 'use_default_eula' => 0, + 'require_acceptance' => 0, 'deleted_at' => NULL, ); @@ -48,6 +56,8 @@ class CategoriesSeeder extends Seeder 'created_at' => $date->modify('-10 day'), 'updated_at' => $date->modify('-3 day'), 'user_id' => 1, + 'use_default_eula' => 0, + 'require_acceptance' => 0, 'deleted_at' => NULL, ); diff --git a/app/lang/ar/admin/settings/general.php b/app/lang/ar/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/ar/admin/settings/general.php +++ b/app/lang/ar/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/cs/admin/settings/general.php b/app/lang/cs/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/cs/admin/settings/general.php +++ b/app/lang/cs/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/da/admin/settings/general.php b/app/lang/da/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/da/admin/settings/general.php +++ b/app/lang/da/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/de/admin/settings/general.php b/app/lang/de/admin/settings/general.php index bf00de2e9f..778cbd3afd 100755 --- a/app/lang/de/admin/settings/general.php +++ b/app/lang/de/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Erzeugen von fortlaufenden Asset IDs', 'auto_increment_prefix' => 'Präfix (optional)', 'auti_incrementing_help' => 'Aktiviere zuerst fortlaufende asset IDs um dies zu setzen', @@ -8,7 +10,7 @@ return array( 'display_checkout_date' => 'Zeige Herausgabedatum', 'display_eol' => 'Zeige EOL in der Tabellenansicht', 'display_qr' => 'Zeige QR-Codes', - 'header_color' => 'Header Color', + 'header_color' => 'Farbe der Kopfzeile', 'info' => 'Mit diesen Einstellungen können Sie verschieden Aspekte Ihrer Installation bearbeiten.', 'laravel' => 'Laravel Version', 'load_remote' => 'Diese Installation von Snipe-IT kann Skripte aus der Aussenwelt laden.', diff --git a/app/lang/en-GB/admin/settings/general.php b/app/lang/en-GB/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/en-GB/admin/settings/general.php +++ b/app/lang/en-GB/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/en/admin/categories/general.php b/app/lang/en/admin/categories/general.php index 88c6a63c46..3d50e3d083 100755 --- a/app/lang/en/admin/categories/general.php +++ b/app/lang/en/admin/categories/general.php @@ -6,6 +6,12 @@ return array( 'asset_categories' => 'Asset Categories', 'category_name' => 'Category Name', 'create' => 'Create Category', + 'eula_text' => 'Category EULA', + 'eula_text_help' => 'This field allows you to customize your EULAs for specific types of assets. If you only have one EULA for all of your assets, you can check the box below to use the primary default.', + 'require_acceptance' => 'Require users to confirm acceptance of assets in this category.', + 'no_default_eula' => 'No primary default EULA found. Add one in Settings.', 'update' => 'Update Category', + 'use_default_eula' => 'Use the primary default EULA instead.', + 'use_default_eula_disabled' => 'Use the primary default EULA instead. No primary default EULA is set. Please add one in Settings.', ); diff --git a/app/lang/en/admin/categories/table.php b/app/lang/en/admin/categories/table.php index 6fdcd1149a..a3ee96ae7f 100755 --- a/app/lang/en/admin/categories/table.php +++ b/app/lang/en/admin/categories/table.php @@ -1,9 +1,10 @@ 'ID', - 'parent' => 'Parent', - 'title' => 'Asset Category Name', + 'eula_text' => 'EULA', + 'id' => 'ID', + 'parent' => 'Parent', + 'require_acceptance' => 'Acceptance', + 'title' => 'Asset Category Name', ); diff --git a/app/lang/en/admin/settings/general.php b/app/lang/en/admin/settings/general.php index e42112afb0..27a72d090c 100755 --- a/app/lang/en/admin/settings/general.php +++ b/app/lang/en/admin/settings/general.php @@ -1,9 +1,13 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', - 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', + 'auto_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', + 'default_eula_text' => 'Default EULA', + 'default_eula_help_text' => 'You can also associate custom EULAs to specific asset categories.', 'display_asset_name' => 'Display Asset Name', 'display_checkout_date' => 'Display Checkout Date', 'display_eol' => 'Display EOL in table view', diff --git a/app/lang/en/admin/users/table.php b/app/lang/en/admin/users/table.php index 8a8a4af2ab..02768b6874 100755 --- a/app/lang/en/admin/users/table.php +++ b/app/lang/en/admin/users/table.php @@ -18,6 +18,7 @@ return array( 'last_login' => 'Last Login', 'last_name' => 'Last Name', 'location' => 'Location', + 'lock_passwords' => 'Login details cannot be changed on this installation.', 'manager' => 'Manager', 'name' => 'Name', 'password_confirm' => 'Confirm Password', diff --git a/app/lang/es-ES/admin/settings/general.php b/app/lang/es-ES/admin/settings/general.php index 424b2b96b8..0954b39072 100755 --- a/app/lang/es-ES/admin/settings/general.php +++ b/app/lang/es-ES/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generar IDs de equipo autoincrementales', 'auto_increment_prefix' => 'Prefijo (opcional)', 'auti_incrementing_help' => 'Activa la generación automática de IDs de equipo antes de fijar esto', diff --git a/app/lang/fi/admin/settings/general.php b/app/lang/fi/admin/settings/general.php index d366e78395..d8ae624148 100755 --- a/app/lang/fi/admin/settings/general.php +++ b/app/lang/fi/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Luo automaattisesti kasvavat laite-ID:t', 'auto_increment_prefix' => 'Etuliite (valinnainen)', 'auti_incrementing_help' => 'Ota ensin käyttöön automaattisesti kasvavat laite ID:t valitaksesi tämän', diff --git a/app/lang/fr/admin/settings/general.php b/app/lang/fr/admin/settings/general.php index 9d99642938..fbb54f7495 100755 --- a/app/lang/fr/admin/settings/general.php +++ b/app/lang/fr/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Générer des identifiants d\'actifs auto-incrémentés', 'auto_increment_prefix' => 'Préfixe (optionnel)', 'auti_incrementing_help' => 'Activez les identifiants d\'actifs auto-incrémentés avant d\'activer ceci', diff --git a/app/lang/hu/admin/settings/general.php b/app/lang/hu/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/hu/admin/settings/general.php +++ b/app/lang/hu/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/it/admin/settings/general.php b/app/lang/it/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/it/admin/settings/general.php +++ b/app/lang/it/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/ja/admin/settings/general.php b/app/lang/ja/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/ja/admin/settings/general.php +++ b/app/lang/ja/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/ms/admin/settings/general.php b/app/lang/ms/admin/settings/general.php index d1e0a407b0..367293628b 100755 --- a/app/lang/ms/admin/settings/general.php +++ b/app/lang/ms/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/nl/admin/settings/general.php b/app/lang/nl/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/nl/admin/settings/general.php +++ b/app/lang/nl/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/no/admin/settings/general.php b/app/lang/no/admin/settings/general.php index 82712a7bf8..05daf3422f 100755 --- a/app/lang/no/admin/settings/general.php +++ b/app/lang/no/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generer automatisk økende eiendels-IDer', 'auto_increment_prefix' => 'Prefiks (valgfritt)', 'auti_incrementing_help' => 'Aktiver automatisk øking av eiendels-IDer først for å velge dette alternativet', diff --git a/app/lang/pl/admin/settings/general.php b/app/lang/pl/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/pl/admin/settings/general.php +++ b/app/lang/pl/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/pt-BR/admin/settings/general.php b/app/lang/pt-BR/admin/settings/general.php index 93aacd152e..7ee6b8bdee 100755 --- a/app/lang/pt-BR/admin/settings/general.php +++ b/app/lang/pt-BR/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Gerar ID de ativo crescente', 'auto_increment_prefix' => 'Prefixo (opcional)', 'auti_incrementing_help' => 'Ativar ID crescente de ativos, primeiro definir este', diff --git a/app/lang/pt-PT/admin/settings/general.php b/app/lang/pt-PT/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/pt-PT/admin/settings/general.php +++ b/app/lang/pt-PT/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/ro/admin/settings/general.php b/app/lang/ro/admin/settings/general.php index d61afe9545..42cd9c59e9 100755 --- a/app/lang/ro/admin/settings/general.php +++ b/app/lang/ro/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Genereaza ID-uri crescatoare de active', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Activeaza ID-uri crescatoare pentru active', diff --git a/app/lang/ru/admin/settings/general.php b/app/lang/ru/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/ru/admin/settings/general.php +++ b/app/lang/ru/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/sv-SE/admin/settings/general.php b/app/lang/sv-SE/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/sv-SE/admin/settings/general.php +++ b/app/lang/sv-SE/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/vi/admin/settings/general.php b/app/lang/vi/admin/settings/general.php index e42112afb0..35c1b85a76 100755 --- a/app/lang/vi/admin/settings/general.php +++ b/app/lang/vi/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => 'Generate auto-incrementing asset IDs', 'auto_increment_prefix' => 'Prefix (optional)', 'auti_incrementing_help' => 'Enable auto-incrementing asset IDs first to set this', diff --git a/app/lang/zh-CN/admin/settings/general.php b/app/lang/zh-CN/admin/settings/general.php index bf5abe282e..7d2a41e2d2 100755 --- a/app/lang/zh-CN/admin/settings/general.php +++ b/app/lang/zh-CN/admin/settings/general.php @@ -1,6 +1,8 @@ 'Send alerts to', + 'alerts_enabled' => 'Alerts enabled', 'auto_increment_assets' => '生成自动递增资产ID', 'auto_increment_prefix' => '前缀(可选)', 'auti_incrementing_help' => '启用自动递增的资产ID之前,请先设置这个', diff --git a/app/models/Asset.php b/app/models/Asset.php index deae2f262f..0fb953b018 100755 --- a/app/models/Asset.php +++ b/app/models/Asset.php @@ -130,6 +130,18 @@ class Asset extends Depreciable public function model() { return $this->belongsTo('Model','model_id'); + } + + public static function getExpiringWarrantee($days = 30) { + + return Asset::where('archived','=','0') + ->whereNotNUll('warranty_months') + ->whereNotNUll('purchase_date') + ->whereRaw(DB::raw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH) <= DATE(NOW() + INTERVAL '.$days .' DAY) AND DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH) > NOW()')) + ->orderBy('purchase_date', 'ASC') + ->get(); + + } /** @@ -191,6 +203,25 @@ class Asset extends Depreciable return false; } } + + public function requireAcceptance() { + return $this->model->category->require_acceptance; + } + + public function getEula() { + + if ($this->model->category->eula_text) { + return $this->model->category->eula_text; + } elseif (Setting::getSettings()->default_eula_text) { + return Setting::getSettings()->default_eula_text; + } else { + return null; + } + + } + + + /** diff --git a/app/routes.php b/app/routes.php index e78f2cb017..36c3637e9c 100755 --- a/app/routes.php +++ b/app/routes.php @@ -245,7 +245,7 @@ Route::group(array('prefix' => 'auth'), function () { # Account Activation Route::get('activate/{activationCode}', array('as' => 'activate', 'uses' => 'AuthController@getActivate')); - + # Forgot Password Route::get('forgot-password', array('as' => 'forgot-password', 'uses' => 'AuthController@getForgotPassword')); Route::post('forgot-password', 'AuthController@postForgotPassword'); @@ -270,9 +270,7 @@ Route::group(array('prefix' => 'auth'), function () { Route::group(array('prefix' => 'account', 'before' => 'auth', 'namespace' => 'Controllers\Account'), function () { - # Account Dashboard - Route::get('/', array('as' => 'account', 'uses' => 'DashboardController@getIndex')); - + # Profile Route::get('profile', array('as' => 'profile', 'uses' => 'ProfileController@getIndex')); Route::post('profile', 'ProfileController@postIndex'); @@ -287,10 +285,17 @@ Route::group(array('prefix' => 'account', 'before' => 'auth', 'namespace' => 'Co # Change Email Route::get('change-email', array('as' => 'change-email', 'uses' => 'ChangeEmailController@getIndex')); Route::post('change-email', 'ChangeEmailController@postIndex'); + + # Accept Asset + Route::get('accept-asset/{assetId}', array('as' => 'account/accept-assets', 'uses' => 'ViewAssetsController@getAcceptAsset')); + Route::post('accept-asset/{assetId}', array('as' => 'account/asset-accepted', 'uses' => 'ViewAssetsController@postAcceptAsset')); # Profile Route::get('requestable-assets', array('as' => 'requestable-assets', 'uses' => 'ViewAssetsController@getRequestableIndex')); Route::get('request-asset/{assetId}', array('as' => 'account/request-asset', 'uses' => 'ViewAssetsController@getRequestAsset')); + + # Account Dashboard + Route::get('/', array('as' => 'account', 'uses' => 'DashboardController@getIndex')); }); diff --git a/app/start/artisan.php b/app/start/artisan.php index b03a23f974..8398267f53 100755 --- a/app/start/artisan.php +++ b/app/start/artisan.php @@ -12,3 +12,4 @@ */ Artisan::add(new AppCommand); +Artisan::add(new SendExpirationAlerts); diff --git a/app/views/backend/categories/edit.blade.php b/app/views/backend/categories/edit.blade.php index e6afc73d9d..7e2b208689 100755 --- a/app/views/backend/categories/edit.blade.php +++ b/app/views/backend/categories/edit.blade.php @@ -37,17 +37,56 @@
- -
- - {{ $errors->first('name', ' :message') }} -
+
+ {{ Form::label('name', Lang::get('admin/categories/general.category_name')) }} +
+
+ + {{ $errors->first('name', ' :message') }} +
+ + +
+
+ {{ Form::label('eula_text', Lang::get('admin/categories/general.eula_text')) }} +
+
+ {{ Form::textarea('eula_text', Input::old('eula_text', $category->eula_text), array('class' => 'form-control')) }} +

@lang('admin/categories/general.eula_text_help')

+ {{ $errors->first('eula_text', ':message') }} +
+
+ + +
+ +
+ + +
+ +
+ +
- -
+ +
@lang('button.cancel')
@@ -65,4 +104,25 @@
+ +@if (Setting::getSettings()->default_eula_text!='') + + +@endif + @stop diff --git a/app/views/backend/categories/index.blade.php b/app/views/backend/categories/index.blade.php index 08b607574e..cc1d1ad8c5 100755 --- a/app/views/backend/categories/index.blade.php +++ b/app/views/backend/categories/index.blade.php @@ -25,7 +25,9 @@ @lang('admin/categories/table.title') - @lang('general.assets') + @lang('general.assets') + @lang('admin/categories/table.require_acceptance') + @lang('admin/categories/table.eula_text') @lang('table.actions') @@ -34,6 +36,8 @@ {{{ $category->name }}} {{ $category->assetscount() }} + {{ ($category->require_acceptance=='1') ? '' : ''}} + {{ ($category->eula_text!='') ? '' : ''}}
{{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control')) }} - {{ $errors->first('site_name', ':message') }} + {{ $errors->first('site_name', ':message') }}
- {{ Form::label('site_name', Lang::get('admin/settings/general.logo')) }} + {{ Form::label('logo', Lang::get('admin/settings/general.logo')) }}
{{ Form::file('logo') }} @@ -73,6 +73,24 @@ padding: 0px 20px;
+ + +
+
+ {{ Form::label('alert_email', Lang::get('admin/settings/general.alert_email')) }} +
+
+ {{ Form::text('alert_email', Input::old('alert_email', $setting->alert_email), array('class' => 'form-control')) }} + + + {{ Form::checkbox('alerts_enabled', '1', Input::old('alerts_enabled', $setting->alerts_enabled)) }} + @Lang('admin/settings/general.alerts_enabled') + + + {{ $errors->first('alert_email', ':message') }} +
+
+
@@ -81,7 +99,7 @@ padding: 0px 20px;
{{ Form::text('header_color', Input::old('header_color', $setting->header_color), array('class' => 'form-control', 'style' => 'width: 100px;')) }} - {{ $errors->first('header_color', ':message') }} + {{ $errors->first('header_color', ':message') }}
@@ -91,7 +109,7 @@ padding: 0px 20px;
{{ Form::text('per_page', Input::old('per_page', $setting->per_page), array('class' => 'form-control', 'style'=>'width: 100px;')) }} - {{ $errors->first('per_page', ':message') }} + {{ $errors->first('per_page', ':message') }}
@@ -139,7 +157,7 @@ padding: 0px 20px;
@if ($setting->auto_increment_assets == 1) {{ Form::text('auto_increment_prefix', Input::old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'style'=>'width: 100px;')) }} - {{ $errors->first('auto_increment_prefix', ':message') }} + {{ $errors->first('auto_increment_prefix', ':message') }} @else {{ Form::text('auto_increment_prefix', Input::old('auto_increment_prefix', $setting->auto_increment_prefix), array('class' => 'form-control', 'disabled'=>'disabled', 'style'=>'width: 100px;')) }} @endif @@ -176,7 +194,7 @@ padding: 0px 20px;
@if ($setting->qr_code == 1) {{ Form::text('qr_text', Input::old('qr_text', $setting->qr_text), array('class' => 'form-control')) }} - {{ $errors->first('qr_text', ':message') }} + {{ $errors->first('qr_text', ':message') }} @else {{ Form::text('qr_text', Input::old('qr_text', $setting->qr_text), array('class' => 'form-control', 'disabled'=>'disabled')) }}

@@ -186,7 +204,22 @@ padding: 0px 20px;

+ +
+
+
+ {{ Form::label('default_eula_text', Lang::get('admin/settings/general.default_eula_text')) }} +
+
+ {{ Form::textarea('default_eula_text', Input::old('default_eula_text', $setting->default_eula_text), array('class' => 'form-control')) }} + {{ $errors->first('default_eula_text', ':message') }} + +

@lang('admin/settings/general.default_eula_help_text')

+ +
+ +
@endforeach diff --git a/app/views/backend/settings/index.blade.php b/app/views/backend/settings/index.blade.php index 21bd164f2b..91bc09e4b9 100755 --- a/app/views/backend/settings/index.blade.php +++ b/app/views/backend/settings/index.blade.php @@ -30,11 +30,30 @@ @lang('admin/settings/general.site_name') {{{ $setting->site_name }}} + + @lang('admin/settings/general.alert_email') + + @if ($setting->alert_email) + {{{ $setting->alert_email }}} + @else + -- + @endif + + + @lang('admin/settings/general.alerts_enabled') + + @if ($setting->alerts_enabled == 1) + @lang('general.yes') + @else + @lang('general.no') + @endif + + @lang('admin/settings/general.header_color') @if ($setting->header_color) - {{ $setting->header_color }} + {{{ $setting->header_color }}} @else default @endif @@ -104,14 +123,22 @@ @lang('admin/settings/general.display_qr') @if ($setting->qr_code == 1) - @lang('general.yes') + @lang('general.yes') + {{{ $setting->qr_text }}} + + @else @lang('general.no') @endif - + - @lang('admin/settings/general.auti_incrementing_help') - {{{ $setting->qr_text }}} + @lang('admin/settings/general.default_eula_text') + + @if ($setting->default_eula_text!='') + @lang('general.yes') + @else + @lang('general.no') + @endif @endforeach diff --git a/app/views/backend/users/edit.blade.php b/app/views/backend/users/edit.blade.php index 3940ccf10e..7b85bc4c33 100755 --- a/app/views/backend/users/edit.blade.php +++ b/app/views/backend/users/edit.blade.php @@ -73,7 +73,11 @@
- + id)) ? ' disabled' : '') }}> + @if (Config::get('app.lock_passwords') && ($user->id)) +

@lang('admin/users/table.lock_passwords')

+ @endif + {{ $errors->first('email', ':message') }}
@@ -134,7 +138,7 @@ @endif
- + id)) ? ' disabled' : '') }}> {{ $errors->first('password', ':message') }}
@@ -147,7 +151,10 @@ @endif
- + id)) ? ' disabled' : '') }}> + @if (Config::get('app.lock_passwords') && ($user->id)) +

@lang('admin/users/table.lock_passwords')

+ @endif {{ $errors->first('password_confirm', ':message') }}
@@ -171,7 +178,7 @@
- id === Sentry::getId() ? ' disabled="disabled"' : '') }} name="activated" id="activated"> + id === Sentry::getId() ? ' disabled="disabled"' : '') }} name="activated" id="activated" {{ ((Config::get('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}> @if ($user->id) @@ -195,7 +202,7 @@
- id)) ? ' disabled' : '') }}> @foreach ($groups as $group)
diff --git a/app/views/backend/users/index.blade.php b/app/views/backend/users/index.blade.php index 017c97df7b..a948e253ee 100755 --- a/app/views/backend/users/index.blade.php +++ b/app/views/backend/users/index.blade.php @@ -44,7 +44,6 @@ @lang('general.assets') @lang('general.licenses') @lang('admin/users/table.activated') - @lang('table.actions') @@ -69,23 +68,23 @@ {{{ $user->assets->count() }}} {{{ $user->licenses->count() }}} {{ $user->isActivated() ? '' : ''}} + - - - @if (is_null($user->deleted_at)) - @if ($user->accountStatus()=='suspended') - - @endif - @endif - - + + + @if (is_null($user->deleted_at)) + @if ($user->accountStatus()=='suspended') + + @endif + @endif + @if ( ! is_null($user->deleted_at)) @else - @if (Sentry::getId() !== $user->id) + @if ((Sentry::getId() !== $user->id) && (!Config::get('app.lock_passwords'))) @else diff --git a/app/views/emails/accept-asset.blade.php b/app/views/emails/accept-asset.blade.php new file mode 100755 index 0000000000..54f9810f3a --- /dev/null +++ b/app/views/emails/accept-asset.blade.php @@ -0,0 +1,13 @@ +@extends('emails/layouts/default') + +@section('content') +

Hello {{{ $first_name }}},

+ +

A new asset has been checked out to you. Please read the terms of use below, and click on the link at the bottom to confirm that you read and agree to the terms of use, and have received the asset.

+ +

{{ nl2br(e($eula)) }}

+ +

I have read and agree to the terms of use, and have received this item.

+ +

{{{ Setting::getSettings()->site_name }}}

+@stop diff --git a/app/views/emails/expiring-report.blade.php b/app/views/emails/expiring-report.blade.php new file mode 100755 index 0000000000..4888bd7187 --- /dev/null +++ b/app/views/emails/expiring-report.blade.php @@ -0,0 +1,20 @@ +@extends('emails/layouts/default') + +@section('content') + +

There are {{{ $count }}} asset(s) with warrantees expiring in the next 60 days.

+ + + + + + + + + + +{{ $email_content }} +
NameTagExpiresDays
+ + +@stop diff --git a/app/views/frontend/account/accept-asset.blade.php b/app/views/frontend/account/accept-asset.blade.php new file mode 100644 index 0000000000..6f7e36d2d4 --- /dev/null +++ b/app/views/frontend/account/accept-asset.blade.php @@ -0,0 +1,41 @@ +@extends('backend/layouts/default') + +{{-- Page title --}} +@section('title') + +@parent +@stop + +{{-- Page content --}} +@section('content') + + +
+
+ @lang('general.back') +

+ Accept {{{ $asset->name }}}

+
+
+ + +
+ +
+ + + + + +
+ +
+ @lang('button.cancel') + +
+
+
+
+
+ +@stop diff --git a/app/views/frontend/account/change-email.blade.php b/app/views/frontend/account/change-email.blade.php index 2320838e55..cd6f1690d0 100755 --- a/app/views/frontend/account/change-email.blade.php +++ b/app/views/frontend/account/change-email.blade.php @@ -15,6 +15,10 @@ Change your Email
+ @if (Config::get('app.lock_passwords') && ($user->id)) +

@lang('admin/users/table.lock_passwords')

+ @endif +
@@ -29,7 +33,7 @@ Change your Email
- + id)) ? ' disabled' : '') }}> {{ $errors->first('email', ' :message') }}
@@ -39,7 +43,7 @@ Change your Email
- + id)) ? ' disabled' : '') }}> {{ $errors->first('email_confirm', ' :message') }}
@@ -50,7 +54,7 @@ Change your Email
- + id)) ? ' disabled' : '') }}> {{ $errors->first('current_password', ' :message') }}
diff --git a/app/views/frontend/account/change-password.blade.php b/app/views/frontend/account/change-password.blade.php index 18d28c49b1..1191f81367 100755 --- a/app/views/frontend/account/change-password.blade.php +++ b/app/views/frontend/account/change-password.blade.php @@ -25,7 +25,7 @@ Change your Password
- + {{ $errors->first('old_password', ' :message') }}
@@ -34,7 +34,7 @@ Change your Password
- + {{ $errors->first('password', ' :message') }}
@@ -45,8 +45,11 @@ Change your Password
- + {{ $errors->first('password_confirm', ' :message') }} + @if (Config::get('app.lock_passwords')) +

@lang('admin/users/table.lock_passwords')

+ @endif