Skip to content

Commit

Permalink
small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepollak committed Feb 16, 2016
1 parent 3b07a21 commit 9eb9090
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions assets/dist/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ Styles
float: left; }
#clef-settings-container .invite-users .invite-users__individually-container, #connect-clef-account .invite-users .invite-users__individually-container {
padding-bottom: 25px;
margin-top: 10px;
margin-bottom: 25px;
border-bottom: 1px solid #eee; }
#clef-settings-container .invite-users .invite-users__individually, #connect-clef-account .invite-users .invite-users__individually {
Expand Down
2 changes: 1 addition & 1 deletion assets/dist/css/admin.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/src/sass/_settings-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@

.invite-users__individually-container {
padding-bottom: 25px;
margin-top: 10px;
margin-bottom: 25px;
border-bottom: 1px solid #eee;
}
Expand Down
2 changes: 2 additions & 0 deletions includes/class.clef-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ public function handle_invite_bulk_action_admin_notices() {

public function add_dashboard_widget() {
if ($this->settings->is_configured()) return;
if (!current_user_can('manage_options')) return;


$name = 'clef_setup_widget';

Expand Down
14 changes: 8 additions & 6 deletions includes/class.clef-invite.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ function send_email() {
public static function invite_users($users, $is_network_admin) {
$errors = array();
foreach ($users as &$user) {
$invite = new ClefInvite($user, $is_network_admin);
$invite->persist();
$success = $invite->send_email();
if (!$success) {
$errors[] = $user->user_email;
if (!ClefUtils::user_has_clef($user)) {
$invite = new ClefInvite($user, $is_network_admin);
$invite->persist();
$success = $invite->send_email();
if (!$success) {
$errors[] = $user->user_email;
}
}
}

Expand All @@ -72,7 +74,7 @@ public static function invite_users($users, $is_network_admin) {
$message .= __(". Copy and paste the preview email to your users and they'll be walked through a tutorial to connect with Clef", 'wpclef');
}
throw new Exception($message);
} else {
} else {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/form.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
</div>
<div class="clef-settings clef-settings__buttons">
<?php submit_button("Save settings", "primary clef-settings__saveButton"); ?>
<?php submit_button("Reset settings", "delete clef-settings__resetButton"); ?>
<?php submit_button("Reset Application ID and Secret", "delete clef-settings__resetButton"); ?>
</div>
</form>

Expand Down
3 changes: 2 additions & 1 deletion templates/js-templates/invite.tpl.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script id="invite-users-template" type="text/template">
<div class="invite-users">
<a class="next" style="display:none;"><?php _e("Skip and finish setup", "wpclef"); ?></a>
<a class="next button button-primary" style="display:none;"><?php _e("Skip and finish setup", "wpclef"); ?></a>
<div class="clear"></div>
<div class="inputs-container">
<div class="invite-users__individually-container">
<h3>Invite users individually or in bulk</h3>
Expand Down

0 comments on commit 9eb9090

Please sign in to comment.