parent
2855aa90d5
commit
0d542c7a76
@ -25,7 +25,5 @@ final class SapphireEventPublishingService implements IEventPublishingService {
|
||||
$parent = EventHolder::get()->first();
|
||||
if(!$parent) throw new NotFoundEntityException('EventHolder','');
|
||||
$event->setParent($parent); // Should set the ID once the Holder is created...
|
||||
$event->write();
|
||||
//$event->doPublish();
|
||||
}
|
||||
}
|
@ -122,7 +122,7 @@ final class EventRegistrationRequestManager {
|
||||
$event = $factory->buildEvent($request);
|
||||
$event_repository->add($event);
|
||||
$request->markAsPosted();
|
||||
|
||||
$event_publishing_service->publish($event);
|
||||
//send Accepted message
|
||||
$point_of_contact = $request->getPointOfContact();
|
||||
$name_to = $point_of_contact->getName();
|
||||
@ -139,7 +139,7 @@ final class EventRegistrationRequestManager {
|
||||
return $event;
|
||||
});
|
||||
|
||||
$event_publishing_service->publish($event);
|
||||
|
||||
return $event;
|
||||
}
|
||||
|
||||
|
@ -120,6 +120,8 @@ jQuery(document).ready(function($) {
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Post": function() {
|
||||
var btn = $(".ui-dialog-buttonset button:contains('Post')",$(this).parent());
|
||||
btn.attr("disabled", true);
|
||||
var id = $(this).data('id');
|
||||
var row = $(this).data('row');
|
||||
var url = 'api/v1/event-registration-requests/'+id+'/posted';
|
||||
@ -133,6 +135,7 @@ jQuery(document).ready(function($) {
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
ajaxError(jqXHR, textStatus, errorThrown);
|
||||
btn.attr("disabled", false);
|
||||
}
|
||||
});
|
||||
$(this).dialog( "close" );
|
||||
|
@ -25,7 +25,5 @@ implements IJobPublishingService
|
||||
$parent = JobHolder::get()->first();
|
||||
if(!$parent) throw new NotFoundEntityException('JobHolder','');
|
||||
$job->setParent($parent); // Should set the ID once the Holder is created...
|
||||
$job->write();
|
||||
//$job->doPublish();
|
||||
}
|
||||
}
|
@ -136,13 +136,15 @@ final class JobRegistrationRequestManager {
|
||||
$repository = $this->repository;
|
||||
$factory = $this->factory;
|
||||
$jobs_repository = $this->jobs_repository;
|
||||
$jobs_publishing_service = $this->jobs_publishing_service ;
|
||||
|
||||
$job = $this->tx_manager->transaction(function() use ($id, $repository, $jobs_repository, $factory, $jobs_link){
|
||||
$job = $this->tx_manager->transaction(function() use ($id, $repository, $jobs_repository, $factory, $jobs_link, $jobs_publishing_service){
|
||||
$request = $repository->getById($id);
|
||||
if(!$request) throw new NotFoundEntityException('JobRegistrationRequest',sprintf('id %s',$id ));
|
||||
$job = $factory->buildJob($request);
|
||||
$jobs_repository->add($job);
|
||||
$request->markAsPosted();
|
||||
$jobs_publishing_service->publish($job);
|
||||
//send Accepted message
|
||||
$point_of_contact = $request->getPointOfContact();
|
||||
$name_to = $point_of_contact->getName();
|
||||
@ -155,11 +157,10 @@ final class JobRegistrationRequestManager {
|
||||
'JobLink' => $jobs_link,
|
||||
));
|
||||
$email->send();
|
||||
|
||||
return $job;
|
||||
});
|
||||
|
||||
$this->jobs_publishing_service->publish($job);
|
||||
|
||||
return $job;
|
||||
}
|
||||
|
||||
|
@ -176,6 +176,8 @@ jQuery(document).ready(function($) {
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Post": function() {
|
||||
var btn = $(".ui-dialog-buttonset button:contains('Post')",$(this).parent());
|
||||
btn.attr("disabled", true);
|
||||
var id = $(this).data('id');
|
||||
var row = $(this).data('row');
|
||||
var url = 'api/v1/job-registration-requests/'+id+'/posted';
|
||||
@ -189,6 +191,7 @@ jQuery(document).ready(function($) {
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
ajaxError(jqXHR, textStatus, errorThrown);
|
||||
btn.attr("disabled", false);
|
||||
}
|
||||
});
|
||||
$(this).dialog( "close" );
|
||||
|
@ -168,6 +168,8 @@ jQuery(document).ready(function($) {
|
||||
|
||||
$(form).submit(function( event ) {
|
||||
if(job_valid) return;
|
||||
|
||||
$('#JobRegistrationRequestForm_JobRegistrationRequestForm_action_saveJobRegistrationRequest').prop('disabled', true);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
@ -227,9 +229,11 @@ jQuery(document).ready(function($) {
|
||||
cancelProcess:function(){
|
||||
job_valid = false;
|
||||
ajaxIndicatorStop();
|
||||
$('#JobRegistrationRequestForm_JobRegistrationRequestForm_action_saveJobRegistrationRequest').prop('disabled', false);
|
||||
},
|
||||
errorMessage:function(location){
|
||||
return 'job location: address ( city:'+location.city+',state: '+location.state+', country:'+location.country+' )';
|
||||
$('#JobRegistrationRequestForm_JobRegistrationRequestForm_action_saveJobRegistrationRequest').prop('disabled', false);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
@ -43,8 +43,7 @@ final class Custom_SS_LogEmailWriter extends SS_LogEmailWriter {
|
||||
$formattedData = $this->_formatter->format($event);
|
||||
$subject = $formattedData['subject'];
|
||||
$body = $formattedData['data'];
|
||||
$email = EmailFactory::getInstance()->buildEmail(self::$send_from, $this->emailAddress,$subject, $body);
|
||||
|
||||
$email = new Email(self::$send_from, $this->emailAddress,$subject, $body);
|
||||
$email->send();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user