Skip to content

Commit

Permalink
Fixed error message for add user
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Mar 15, 2022
1 parent fb88eec commit 0350dfd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions Lib/lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
'pl.grouperlite.message.user-not-found-error' => 'Error: User not found.',
'pl.grouperlite.message.user-not-added-error' => 'Error: Unable to add user.',
'pl.grouperlite.message.user-not-removed-error' => 'Error: Unable to remove user.',
'pl.grouperlite.message.user-authorization-error' => 'Error: Not authorized to add user.',

'pl.grouperlite.form.group.template.label' => 'Select a template',
'pl.grouperlite.form.group.template.empty' => '(choose one)',
Expand Down
14 changes: 8 additions & 6 deletions View/Elements/Components/subscriberList.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
); ?>';

var addUrl = '<?php print $this->Html->url(
array(
'plugin' => "grouper_lite",
'controller' => 'grouper_groups',
'action' => 'addSubscriber.json'
)
); ?>';
array(
'plugin' => "grouper_lite",
'controller' => 'grouper_groups',
'action' => 'addSubscriber.json'
)
); ?>';
$('.members-btn').click(function(ev) {
var $this = $(this);
group = $this.data('id');
Expand Down Expand Up @@ -167,6 +167,8 @@
error: function(ev) {
var msg = ev.status === 404 ?
'<?php echo _txt('pl.grouperlite.message.user-not-found-error'); ?>' :
ev.status === 401 ?
'<?php echo _txt('pl.grouperlite.message.user-authorization-error'); ?>' :
'<?php echo _txt('pl.grouperlite.message.user-not-added-error'); ?>';

var err = $('#subscribers .error');
Expand Down

0 comments on commit 0350dfd

Please sign in to comment.