mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@60287 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c4651a2fda
commit
574fdb190d
@ -167,7 +167,9 @@ abstract class ModelAdmin extends LeftAndMain {
|
||||
protected function ManagedModelsSelect() {
|
||||
$models = $this->getManagedModels();
|
||||
$modelMap = array();
|
||||
foreach($models as $modelName) $modelMap[$modelName] = singleton($modelName)->singular_name();
|
||||
foreach($models as $modelName) {
|
||||
if(singleton($modelName)->canCreate(Member::currentUser())) $modelMap[$modelName] = singleton($modelName)->singular_name();
|
||||
}
|
||||
|
||||
$form = new Form(
|
||||
$this,
|
||||
@ -616,7 +618,7 @@ class ModelAdmin_RecordController extends Controller {
|
||||
* @return mixed
|
||||
*/
|
||||
function doSave($data, $form, $request) {
|
||||
$this->currentRecord->update($request->postVars());
|
||||
$form->saveInto($this->currentRecord);
|
||||
$this->currentRecord->write();
|
||||
|
||||
// Behaviour switched on ajax.
|
||||
|
@ -39,6 +39,8 @@ jQuery(document).ready(function() {
|
||||
jQuery.post(uri, data, function(result){
|
||||
jQuery('#right #ModelAdminPanel').html(result);
|
||||
|
||||
statusMessage("Saved");
|
||||
|
||||
// TODO/SAM: It seems a bit of a hack to have to list all the little updaters here.
|
||||
// Is livequery a solution?
|
||||
Behaviour.apply(); // refreshes ComplexTableField
|
||||
|
Loading…
Reference in New Issue
Block a user