Merge branch 'fouten/chartomvang&layoutlijst&flexibel' into develop
# Conflicts: # application/core/MY_Controller.php
This commit is contained in:
@@ -24,4 +24,6 @@ $config['smtp_host'] = $_ENV['MAIL']['HOST'];
|
|||||||
$config['smtp_user'] = $_ENV['MAIL']['SMTP_USER'];
|
$config['smtp_user'] = $_ENV['MAIL']['SMTP_USER'];
|
||||||
$config['smtp_pass'] = $_ENV['MAIL']['SMTP_PASS'];
|
$config['smtp_pass'] = $_ENV['MAIL']['SMTP_PASS'];
|
||||||
$config['smtp_port'] = $_ENV['MAIL']['SMTP_PORT'];
|
$config['smtp_port'] = $_ENV['MAIL']['SMTP_PORT'];
|
||||||
|
$config['mailtype']='html';
|
||||||
|
$config['crlf']="\r\n";
|
||||||
|
$config['newline']="\r\n";
|
||||||
|
|||||||
@@ -463,13 +463,12 @@ class Organisaties extends MY_Controller{
|
|||||||
|
|
||||||
$orgID = $_POST['orgID'];
|
$orgID = $_POST['orgID'];
|
||||||
$filename = $_FILES['file']['name'];
|
$filename = $_FILES['file']['name'];
|
||||||
|
$this->deleteOldBijlage($orgID);
|
||||||
|
|
||||||
if ( ! $this->upload->do_upload('file')) $error = $this->upload->display_errors();
|
if ( ! $this->upload->do_upload('file')) $error = $this->upload->display_errors();
|
||||||
else {
|
else {
|
||||||
$error = FALSE;
|
$error = FALSE;
|
||||||
$randomname = $this->upload->data('file_name')['file_name'];
|
$randomname = $this->upload->data('file_name');
|
||||||
$this->deleteOldBijlage($orgID);
|
|
||||||
$this->setNieuweBijlage($orgID, $randomname, $filename);
|
$this->setNieuweBijlage($orgID, $randomname, $filename);
|
||||||
}
|
}
|
||||||
$this->json($error);
|
$this->json($error);
|
||||||
|
|||||||
@@ -309,24 +309,27 @@ class Users extends MY_Controller{
|
|||||||
}
|
}
|
||||||
function SendNewWW(){
|
function SendNewWW(){
|
||||||
//TODO sanitize input
|
//TODO sanitize input
|
||||||
$userid = $this->uri->segment(4);
|
$userid = $this->clean_input('userid');
|
||||||
$ok = true;
|
$orgid = $this->clean_input('orgid');
|
||||||
|
$ok = true;
|
||||||
$errortekst = '';
|
$errortekst = '';
|
||||||
|
|
||||||
$user = $this->Users_model->get_record_by_id($userid);
|
$user = $this->Users_model->get_record_by_id($userid);
|
||||||
$ww = random_string('alnum', 8);
|
$ww = random_string('alnum', 8);
|
||||||
$saltedww = md5($user->zout.$ww);
|
$saltedww = md5($user->zout.$ww);
|
||||||
// update user
|
// update user
|
||||||
$this->Users_model->update_record(array('wachtwoord'=>$saltedww),$userid);
|
$this->Users_model->update_record(array('wachtwoord'=>$saltedww),$userid);
|
||||||
$data = array('username'=>$user->gnaam, 'password'=>$ww, 'fullname'=>$this->Users_model->get_fullname($userid));
|
$data = array('username'=>$user->gnaam, 'password'=>$ww, 'fullname'=>$this->Users_model->get_fullname($userid));
|
||||||
|
|
||||||
$html = $this->load->view( 'emails/newpassword_mail', $data, TRUE );
|
$html = $this->load->view( 'emails/newpassword_mail', $data, TRUE );
|
||||||
if( $_ENV['ENVIRONMENT'] == 'production')
|
$org = $this->getBijlage($orgid);
|
||||||
|
|
||||||
|
if( $_ENV['ENVIRONMENT'] == 'production')
|
||||||
{
|
{
|
||||||
//Deze code wordt alleen op produktie gebruikt en stuurt de mail
|
//Deze code wordt alleen op produktie gebruikt en stuurt de mail
|
||||||
//naar Mailgun via een API (Codeigniter email library wordt niet gebruikt
|
//naar Mailgun via een API (Codeigniter email library wordt niet gebruikt
|
||||||
$mg = Mailgun::create( $_ENV['MAIL']['APIKEY'] );
|
$mg = Mailgun::create( $_ENV['MAIL']['APIKEY'] );
|
||||||
$mg->messages()->send( $_ENV['MAIL']['DOMAIN'], [
|
$mailData = [
|
||||||
'from' => 'info@monpas.nl',
|
'from' => 'info@monpas.nl',
|
||||||
'to' => $user->email,
|
'to' => $user->email,
|
||||||
'cc' => 'rfranke@framework-ed.nl',
|
'cc' => 'rfranke@framework-ed.nl',
|
||||||
@@ -337,7 +340,12 @@ class Users extends MY_Controller{
|
|||||||
'filename' => 'monpasklein.png',
|
'filename' => 'monpasklein.png',
|
||||||
'filePath' => FCPATH . 'css/images/monpasklein.png']
|
'filePath' => FCPATH . 'css/images/monpasklein.png']
|
||||||
]
|
]
|
||||||
] );
|
];
|
||||||
|
if( $org->randomname ) $mailData['attachment'][0] = [
|
||||||
|
'filename' => $org->bijlagefile,
|
||||||
|
'filePath' => MYROOTPATH. 'docs/'.$org->randomname ];
|
||||||
|
|
||||||
|
$mg->messages()->send( $_ENV['MAIL']['DOMAIN'], $mailData );
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
$this->load->library( 'email' );
|
$this->load->library( 'email' );
|
||||||
@@ -347,7 +355,10 @@ class Users extends MY_Controller{
|
|||||||
$this->email->subject( 'Inloggegevens MonPas' );
|
$this->email->subject( 'Inloggegevens MonPas' );
|
||||||
$this->email->message( $html );
|
$this->email->message( $html );
|
||||||
$this->email->bcc( "rfranke@framework-ed.nl" );
|
$this->email->bcc( "rfranke@framework-ed.nl" );
|
||||||
$this->email->send();
|
|
||||||
|
$this->email->attach(MYROOTPATH. 'docs/'.$org->randomname,'attachment', $org->bijlagefile);
|
||||||
|
$this->email->send();
|
||||||
|
$result = $this->email->print_debugger();
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode(array('ok'=>$ok, 'errortekst'=>$errortekst));
|
echo json_encode(array('ok'=>$ok, 'errortekst'=>$errortekst));
|
||||||
|
|||||||
@@ -48,52 +48,55 @@
|
|||||||
<tr >
|
<tr >
|
||||||
<td colspan = 2>
|
<td colspan = 2>
|
||||||
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== false -->
|
<!-- ko if: $parent.selectedOrgversion() && $parent.selectedOrgversion().toonOmschrijving()== false -->
|
||||||
<table style="width:100%">
|
<table style="width:100%" data-bind="foreach: indicatorscores">
|
||||||
<tr>
|
<thead data-bind="visible: $index() == 0">
|
||||||
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"
|
<tr>
|
||||||
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}"> nr
|
<th class="header2" style="width: 3%;padding-left: 2px;text-align:right"
|
||||||
</th>
|
data-bind="style: {backgroundColor: $parent.disabled() ? '#d9d9d9' : '#e7e2e5'} "> nr
|
||||||
<th class="header2" style="width: 50%;padding-left: 2px"
|
</th>
|
||||||
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}">indicator
|
<th class="header2" style="padding-left: 2px"
|
||||||
</th>
|
data-bind="style: {backgroundColor: $parent.disabled() ? '#d9d9d9' : '#e7e2e5'},
|
||||||
<th class="header2" style="width: 40%;padding-left: 2px;text-align:left"
|
attr: {width: scoretype > 5 ? '65%': '72%' } ">
|
||||||
data-bind="style: {backgroundColor: disabled() ? '#d9d9d9' : '#e7e2e5'}"> score
|
</th>
|
||||||
</th>
|
<th class="header2" style="padding-left: 2px;text-align:left"
|
||||||
</tr>
|
data-bind="style: {backgroundColor: $parent.disabled() ? '#d9d9d9' : '#e7e2e5'},
|
||||||
<tbody data-bind="foreach: indicatorscores">
|
attr: {width: scoretype > 5 ? '32%': '22%'} "> score
|
||||||
<tr style="border-bottom: 1px solid #ebebeb">
|
</th>
|
||||||
<td style="text-align:right;vertical-align:top" data-bind="text: nummer,
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody >
|
||||||
|
<tr style="border-bottom: 1px solid #ebebeb; ">
|
||||||
|
<td style="text-align:right;vertical-align:top; padding-top: 5px;" data-bind="text: nummer,
|
||||||
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }">
|
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }">
|
||||||
</td>
|
</td>
|
||||||
<td data-bind="text: omschrijving,
|
<td data-bind="text: omschrijving,
|
||||||
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" style="vertical-align:top">
|
style: {color: $parent.disabled()? '#d9d9d9' : '#262626' }" style="vertical-align:top; padding-top: 5px;">
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="vertical-align:top; padding-top: 5px;" >
|
||||||
<div class="nietVoorPdf">
|
|
||||||
<span data-bind="visible: scoretype==1">
|
<span class="nietVoorPdf" data-bind="visible: scoretype==1">
|
||||||
<input class="rapport"
|
<input class="rapport"
|
||||||
data-bind="textInput: score,
|
data-bind="textInput: score,
|
||||||
event:{input: $root.fUpdateScoretype12},
|
event:{input: $root.fUpdateScoretype12},
|
||||||
enable: $root.editok() && $parent.disabled() == false,
|
enable: $root.editok() && $parent.disabled() == false,
|
||||||
attr:{'id' : $index}" />
|
attr:{'id' : $index}" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
<div class="alleenVoorPdf">
|
<span class="alleenVoorPdf" data-bind="visible: scoretype==1 || scoretype == 2,
|
||||||
<span data-bind="visible: scoretype==1 || scoretype == 2,
|
|
||||||
text: score">
|
text: score">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
<div class="nietVoorPdf">
|
|
||||||
<span data-bind="visible: scoretype == 2">
|
<span class="nietVoorPdf"data-bind="visible: scoretype == 2">
|
||||||
<input class="integer"
|
<input class="integer"
|
||||||
data-bind="textInput: score,
|
data-bind="textInput: score,
|
||||||
event:{input: $root.fUpdateScoretype12},
|
event:{input: $root.fUpdateScoretype12},
|
||||||
visible: scoretype==2,
|
visible: scoretype==2,
|
||||||
enable: $root.editok() && $parent.disabled() == false" /> %
|
enable: $root.editok() && $parent.disabled() == false" /> %
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div data-bind="visible: scoretype==3 || scoretype == 4 || scoretype == 5 || scoretype == 6 || scoretype==7 ">
|
|
||||||
|
<span data-bind="visible: scoretype==3 || scoretype == 4 || scoretype == 5 || scoretype == 6 || scoretype==7 ">
|
||||||
<!-- ko if: $parent.disabled() == false -->
|
<!-- ko if: $parent.disabled() == false -->
|
||||||
<!-- ko foreach: $root.scoreopties -->
|
<!-- ko foreach: $root.scoreopties -->
|
||||||
<!-- ko if: $parent.scoretype == type -->
|
<!-- ko if: $parent.scoretype == type -->
|
||||||
@@ -103,7 +106,7 @@
|
|||||||
event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)},
|
event:{click: $root.fUpdateScoretypeVanaf3.bind($data, $parent.id)},
|
||||||
attr: {'name': $parent.id , 'value': value, 'checked': value == $parent.score()},
|
attr: {'name': $parent.id , 'value': value, 'checked': value == $parent.score()},
|
||||||
enable: $root.editok() " />
|
enable: $root.editok() " />
|
||||||
<span style="vertical-align:top; display: inline-block; margin-left:5px;" data-bind="text: optie"> </span>
|
<span style="vertical-align:top; display: inline-block; margin-left:5px;margin-right: 20px;" data-bind="text: optie"> </span>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
@@ -113,10 +116,11 @@
|
|||||||
<input type='radio'
|
<input type='radio'
|
||||||
data-bind="checked: $parent.score(),
|
data-bind="checked: $parent.score(),
|
||||||
enable: false " />
|
enable: false " />
|
||||||
<span style="vertical-align:top; display: inline-block; margin-left:5px;" data-bind="text: optie"> </span>
|
<span style="vertical-align:top; display: inline-block; margin-left:5px; margin-right: 20px;" data-bind="text: optie"> </span>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 100 KiB |
@@ -112,9 +112,9 @@ ls.initGebruikersModel = function(){
|
|||||||
otherUsers : ko.observableArray([]),
|
otherUsers : ko.observableArray([]),
|
||||||
functies :ko.observableArray([]),
|
functies :ko.observableArray([]),
|
||||||
zoekstring : ko.observable(''),
|
zoekstring : ko.observable(''),
|
||||||
titel : ko.observable({title: ko.observable(), status: ko.observable()} ),
|
titel : ko.observable({title: ko.observable(), status: ko.observable()} ),
|
||||||
autorisatieopties : ko.observableArray([]),
|
autorisatieopties : ko.observableArray([]),
|
||||||
focusop : ko.observable(1), //werkt weer eens niet
|
focusop : ko.observable(1), //werkt weer eens niet
|
||||||
bezig : ko.observable(false),
|
bezig : ko.observable(false),
|
||||||
|
|
||||||
initBindings :function(){
|
initBindings :function(){
|
||||||
@@ -320,12 +320,19 @@ ls.initGebruikersModel = function(){
|
|||||||
|
|
||||||
fSendNewWW: function(){
|
fSendNewWW: function(){
|
||||||
var self = ls.GebruikersModel;
|
var self = ls.GebruikersModel;
|
||||||
$.post("index.php/shared/users/sendnewww/" + self.selectedUser().userid, function(result){
|
|
||||||
|
if (self.bezig()) return
|
||||||
|
let sd = {userid: self.selectedUser().userid,
|
||||||
|
orgid : self.selectedOrg().id}
|
||||||
|
self.bezig(true)
|
||||||
|
$.post("index.php/shared/users/SendNewWW" ,sd, function(result){
|
||||||
if (result) {
|
if (result) {
|
||||||
apprise("Er is een e-mail verstuurd naar " +self.selectedUser().email() + " met daarin het nieuwe wachtwoord.");
|
apprise("Er is een e-mail verstuurd naar " +self.selectedUser().email() + " met daarin het nieuwe wachtwoord.");
|
||||||
}
|
}
|
||||||
|
self.bezig(false)
|
||||||
},'json');
|
},'json');
|
||||||
},
|
},
|
||||||
|
|
||||||
fToggleGeopend : function(){
|
fToggleGeopend : function(){
|
||||||
this.geopend(!this.geopend());
|
this.geopend(!this.geopend());
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -372,8 +372,8 @@ mh.initOmvangModel = function(){
|
|||||||
aantal.push(Number(o.aantalleerlingen));
|
aantal.push(Number(o.aantalleerlingen));
|
||||||
var aantalsbo = 0;
|
var aantalsbo = 0;
|
||||||
var aantalso = 0;
|
var aantalso = 0;
|
||||||
if(o.licht) aantalsbo = Number(o.licht);
|
if(o.licht()) aantalsbo = Number(o.licht());
|
||||||
if(o.zwaar) aantalsbo = aantalsbo + Number(o.zwaar);
|
if(o.zwaar()) aantalsbo = aantalsbo + Number(o.zwaar());
|
||||||
datasbo.push(Number(aantalsbo) > 0 ? Number(aantalsbo) : null);
|
datasbo.push(Number(aantalsbo) > 0 ? Number(aantalsbo) : null);
|
||||||
if(o.laag()) aantalso = (Number(o.laag()));
|
if(o.laag()) aantalso = (Number(o.laag()));
|
||||||
if(o.midden()) aantalso = aantalso + Number(o.midden());
|
if(o.midden()) aantalso = aantalso + Number(o.midden());
|
||||||
@@ -644,7 +644,7 @@ mh.initOmvangModel = function(){
|
|||||||
chart: {
|
chart: {
|
||||||
plotBackgroundColor: null,
|
plotBackgroundColor: null,
|
||||||
plotBorderWidth: null,
|
plotBorderWidth: null,
|
||||||
height: 800,
|
height: 850,
|
||||||
plotShadow: false,
|
plotShadow: false,
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
margin: [0, 0, 0, 0],
|
margin: [0, 0, 0, 0],
|
||||||
@@ -683,10 +683,10 @@ mh.initOmvangModel = function(){
|
|||||||
padding: 0,
|
padding: 0,
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
floating: false,
|
floating: false,
|
||||||
x: -5,
|
x: 0,
|
||||||
y: 260,
|
y: 260,
|
||||||
width: 350,
|
// width: 350,
|
||||||
height: 500,
|
// height: 500,
|
||||||
itemWidth: breedte,
|
itemWidth: breedte,
|
||||||
itemDistance: 0,
|
itemDistance: 0,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user