diff --git a/src/Form/UwContentAccessForm.php b/src/Form/UwContentAccessForm.php index 4eace56cee3a5d260070a374303cd25fe7c62f82..3ef33d2d1d6bedaae696d165e2e8e519929e8b04 100644 --- a/src/Form/UwContentAccessForm.php +++ b/src/Form/UwContentAccessForm.php @@ -90,7 +90,7 @@ class UwContentAccessForm extends FormBase { } } - // Increment the row counter. + // Increment the row count. $row_count++; // Set the functionality column. @@ -116,10 +116,11 @@ class UwContentAccessForm extends FormBase { } } + // The submit button. $form['actions']['#type'] = 'actions'; $form['actions']['submit'] = array( '#type' => 'submit', - '#value' => $this->t('Submit'), + '#value' => $this->t('Save permissions'), '#button_type' => 'primary', ); @@ -186,6 +187,14 @@ class UwContentAccessForm extends FormBase { } } } + + // Step through each of the roles and save the role object, + // so that the permissions get saved. + foreach ($uw_role_objects as $uw_role_object) { + + // Save the role object. + $uw_role_object->save(); + } } /**