Skip to content

Commit

Permalink
Removed subscriber actions from my memberships page
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Nov 3, 2022
1 parent 2b81c42 commit 55374bb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 23 deletions.
46 changes: 25 additions & 21 deletions View/Elements/Components/subscriberList.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,35 @@
<p>You do not have access to view memberships.</p>
</div>
<div class="modal-body subs">
<?php if ($addSubscribers) : ?>
<div class="d-flex mb-4">
<?php echo $this->Form->create(false, array(
'url' => array('controller' => 'grouper_groups', 'action' => 'groupSubscribers'),
'class' => 'add-user-form w-100',
'id' => 'add-user-form',
)); ?>
<label class="sr-only" for="addUser"><?php echo _txt('pl.grouperlite.search.tags.text'); ?></label>
<div class="input-group">
<?php echo $this->Form->input("addUser", array('label' => false, 'class' => 'form-control', 'value' => isset($searchcriteria) ? $searchcriteria : '')) ?>
<!--<input type="text" name="search" class="form-control" value="<?php echo isset($searchcriteria) ? $searchcriteria : ''; ?>" /> -->

<div class="input-group-append">
<button id="addUserbutton" class=" btn btn-grouper btn-primary px-4" type="submit" value="Submit">
<em class="material-icons lg" aria-hidden="true">add</em>
<span class="ml-2"><?php echo _txt('pl.grouperlite.action.add-user'); ?></span>
</button>
</div>

<div class="d-flex mb-4">
<?php echo $this->Form->create(false, array(
'url' => array('controller' => 'grouper_groups', 'action' => 'groupSubscribers'),
'class' => 'add-user-form w-100',
'id' => 'add-user-form',
)); ?>
<label class="sr-only" for="addUser"><?php echo _txt('pl.grouperlite.search.tags.text'); ?></label>
<div class="input-group">
<?php echo $this->Form->input("addUser", array('label' => false, 'class' => 'form-control', 'value' => isset($searchcriteria) ? $searchcriteria : '')) ?>
<!--<input type="text" name="search" class="form-control" value="<?php echo isset($searchcriteria) ? $searchcriteria : ''; ?>" /> -->
<div class="input-group-append">
<button id="addUserbutton" class=" btn btn-grouper btn-primary px-4" type="submit" value="Submit">
<em class="material-icons lg" aria-hidden="true">add</em>
<span class="ml-2"><?php echo _txt('pl.grouperlite.action.add-user'); ?></span>
</button>
</div>
<?php echo $this->Form->end(); ?>
</div>
<div>
<p class="alert alert-danger error"></p>
</div>
<?php echo $this->Form->end(); ?>
</div>
<div>
<p class="alert alert-danger error"></p>
</div>
<?php endif; ?>
<table class="table table-striped">
<tbody id="sub-body"></tbody>
</table>

</div>
<div class="modal-footer d-flex justify-content-end">
<button type="button" class="btn btn-grouper btn-link" data-dismiss="modal"><?php echo _txt('pl.grouperlite.action.close'); ?></button>
Expand Down Expand Up @@ -208,9 +210,11 @@
"class" => "remove-user-form",
"id" => "remove-user-form"
)); ?>',
<?php if ($addSubscribers) : ?>
'<button data-user="' + item.id + '" class="btn btn-grouper btn-block btn-primary btn-sm m-1 text-nowrap member-del-btn">',
'<?php echo _txt('pl.grouperlite.action.remove-user'); ?>',
'</button>',
<?php endif; ?>
'<?php echo $this->Form->end(); ?>',
'</td>',
'</tr>'
Expand Down
2 changes: 1 addition & 1 deletion View/GrouperGroups/groupmember.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,5 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
</div>
<?php endif; ?>

<?php echo $this->element('Components/subscriberList'); ?>
<?php echo $this->element('Components/subscriberList', array('addSubscribers' => false)); ?>
<!--/nocache-->
2 changes: 1 addition & 1 deletion View/GrouperGroups/groupowner.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ $collapsed = $config['defaultCollapse'] === 'collapsed' ? true : false;
<p class="lead mb-0 text-center"><?php echo _txt('pl.grouperlite.groups.zero-state'); ?></p>
</div>
<?php endif; ?>
<?php echo $this->element('Components/subscriberList'); ?>
<?php echo $this->element('Components/subscriberList', array('addSubscribers' => true)); ?>
<!--/nocache-->

0 comments on commit 55374bb

Please sign in to comment.