Merge branch 'master' of github.com:crunchbutton/crunchbutton
This commit is contained in:
commit
7f12b57389
@ -160,6 +160,9 @@ class Controller_api_driver_save extends Crunchbutton_Controller_RestAccount {
|
||||
}
|
||||
if( $driver_info->phone_type == 'Android' ){
|
||||
$driver_info->phone_subtype = $this->request()[ 'android_type' ];
|
||||
// //michal line below:
|
||||
// $driver_info->phone_subtype = ( $this->request()[ 'android_type' ] == Cockpit_Driver_Info::ANDROID_TYPE_OTHER ? $this->request()[ 'android_type_other' ] : $this->request()[ 'android_type' ] );
|
||||
|
||||
$driver_info->phone_version = $this->request()[ 'android_version' ];
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ class Cockpit_Driver_Info extends Cana_Table {
|
||||
const PHONE_TYPE_BLACKBERRY = 'Blackberry';
|
||||
const PHONE_TYPE_DUMBPHONE = 'Dumbphone';
|
||||
const PHONE_TYPE_OTHER = 'Other';
|
||||
|
||||
//const ANDROID_TYPE_OTHER = 'Other'; //michal
|
||||
const CARRIER_TYPE_ATT = 'ATT';
|
||||
const CARRIER_TYPE_VERIZON = 'Verizon';
|
||||
const CARRIER_TYPE_SPRINT = 'Sprint';
|
||||
@ -45,6 +45,10 @@ class Cockpit_Driver_Info extends Cana_Table {
|
||||
Cockpit_Driver_Info::PHONE_TYPE_OTHER ];
|
||||
}
|
||||
|
||||
// public function androidTypeOther(){
|
||||
// return Cockpit_Driver_Info::ANDROID_TYPE_OTHER;
|
||||
// }//michal
|
||||
|
||||
public function iPhoneTypes(){
|
||||
return [ '3G',
|
||||
'3GS',
|
||||
@ -67,8 +71,14 @@ class Cockpit_Driver_Info extends Cana_Table {
|
||||
}
|
||||
|
||||
public function androidTypes(){
|
||||
// $addedSubtypes = Cockpit_Driver_Info::q( 'select phone_subtype from driver_info
|
||||
// where
|
||||
// phone_type="android"
|
||||
// and phone_subtype is not null
|
||||
// and phone_subtype != "Other"
|
||||
// group by phone_subtype');
|
||||
|
||||
$types = [ 'Samsung Galaxy S3',
|
||||
$types = [ 'Samsung Galaxy S3',
|
||||
'Samsung Galaxy S4',
|
||||
'Samsung Galaxy Note3',
|
||||
'Samsung Galaxy S5',
|
||||
@ -87,9 +97,15 @@ class Cockpit_Driver_Info extends Cana_Table {
|
||||
'Samsung Galaxy S',
|
||||
'Samsung Galaxy Win',
|
||||
'Samsung Galaxy Star Advance',
|
||||
'Samsung Galaxy Ace' ];
|
||||
'Samsung Galaxy Ace'];
|
||||
// foreach ($addedSubtypes as $addedSubtype) {
|
||||
// array_push($types,
|
||||
// $addedSubtype->phone_subtype);
|
||||
// }
|
||||
|
||||
sort( $types );
|
||||
$types[] = 'Other';
|
||||
//$types[] = Cockpit_Driver_Info::ANDROID_TYPE_OTHER;
|
||||
return $types;
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
<?php
|
||||
|
||||
|
||||
class Crunchbutton_Cron_Job_CSTicketsDigest extends Crunchbutton_Cron_Log {
|
||||
|
||||
public function run($params){
|
||||
|
||||
$supports = Crunchbutton_Support::q('SELECT
|
||||
support.*
|
||||
FROM support
|
||||
@ -13,11 +10,9 @@ class Crunchbutton_Cron_Job_CSTicketsDigest extends Crunchbutton_Cron_Log {
|
||||
AND support.datetime > date_sub(now(), interval 1 day)
|
||||
ORDER BY support.id_support ASC
|
||||
limit 250' );
|
||||
|
||||
$params = array( 'to' => 'digests@_DOMAIN_', 'messages'=> $supports );
|
||||
$email = new Crunchbutton_Email_CSDigest($params);
|
||||
$email->send();
|
||||
|
||||
// it always must call finished method at the end
|
||||
$this->finished();
|
||||
}
|
||||
|
||||
@ -145,9 +145,18 @@
|
||||
<small ng-show="form.driverAndroidType.$error.required">Required.</small>
|
||||
</div>
|
||||
</li>
|
||||
<!---->
|
||||
<!---->
|
||||
<!-- <li class="li-input" ng-if="driver.android_type=='Other'" ng-class="{'error':form.driverAndroidTypeOther.$invalid}">-->
|
||||
<!-- <div class="label">Android Type (Other):</div>-->
|
||||
<!-- <div class="input"><input type="text" name="driverAndroidTypeOther" ng-model="driver.android_type_other" required="driver.android_type == android_type_other" placeholder="Android Type" ng-maxlength="40"></div>-->
|
||||
<!-- <div class="box-error">-->
|
||||
<!-- <small ng-show="form.driverAndroidTypeOther.$error.required">Required.</small>-->
|
||||
<!-- </div>-->
|
||||
<!-- </li>-->
|
||||
|
||||
<li class="li-input" ng-class="{'error':form.driverAndroidVersion.$invalid}" ng-show="driver.phone_type=='Android'">
|
||||
<div class="label">Android type:</div>
|
||||
<div class="label">Android OS:</div>
|
||||
<div class="input">
|
||||
<select name="driverAndroidVersion" ng-required="driver.phone_type=='Android'" ng-model="driver.android_version" ng-options="opt as opt for opt in android_versions" ></select>
|
||||
</div>
|
||||
|
||||
@ -702,6 +702,7 @@ NGApp.controller( 'DriversOnboardingFormCtrl', function ( $scope, $routeParams,
|
||||
|
||||
$scope.iphone_type = json.default;
|
||||
$scope.android_type = json.default;
|
||||
//$scope.android_type_other = json.other;//michal
|
||||
$scope.android_version = json.default;
|
||||
} );
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user