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