Skip to content

Commit

Permalink
chore: buttons have a discernible text
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Jul 19, 2023
1 parent 8c2fdab commit 5c8d175
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion actions/groups/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
$admin_approve = ($admin_approve && !elgg_is_admin_logged_in()); // admins don't need to wait

$concept_group = (bool) elgg_get_plugin_setting('concept_groups', 'group_tools');
$concept_group = $concept_group && !empty(get_input('concept_group'));
$concept_group = $concept_group && (bool) get_input('concept_group');

// new groups get access private, so an admin can validate it
$access_id = (int) $group->access_id;
Expand Down
4 changes: 1 addition & 3 deletions actions/groups/invite.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
}

// add users directly?
if (get_input('submit') == elgg_echo('group_tools:add_users')) {
$adding = true;
}
$adding = (bool) get_input('submit');
}

$group_guid = (int) get_input('group_guid');
Expand Down
2 changes: 1 addition & 1 deletion views/default/admin/groups/bulk_delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
$batch = new ElggBatch('elgg_get_entities', $options);

$delete_button = elgg_view('input/submit', [
'value' => elgg_echo('group_tools:delete_selected'),
'text' => elgg_echo('group_tools:delete_selected'),
'class' => 'elgg-button-submit float-alt mvs',
'data-confirm' => elgg_echo('deleteconfirm:plural'),
]);
Expand Down
3 changes: 2 additions & 1 deletion views/default/forms/groups/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@
$buttons[] = [
'#type' => 'submit',
'name' => 'concept_group',
'value' => elgg_echo('group_tools:group:edit:save:concept'),
'value' => 1,
'text' => elgg_echo('group_tools:group:edit:save:concept'),
];
}

Expand Down
6 changes: 4 additions & 2 deletions views/default/forms/groups/invite.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,16 @@
[
'#type' => 'submit',
'name' => 'submit',
'value' => elgg_echo('invite'),
'value' => 0,
'text' => elgg_echo('invite'),
],
];
if (elgg_is_admin_logged_in()) {
$footer_fields[] = [
'#type' => 'submit',
'name' => 'submit',
'value' => elgg_echo('group_tools:add_users'),
'value' => 1,
'text' => elgg_echo('group_tools:add_users'),
'data-confirm' => elgg_echo('group_tools:group:invite:add:confirm'),
];
}
Expand Down

0 comments on commit 5c8d175

Please sign in to comment.