Skip to content

Commit

Permalink
Fix "Theme My Login" plugin Compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomollet committed Sep 23, 2014
1 parent 7ebef1c commit 3ff1cdb
Show file tree
Hide file tree
Showing 18 changed files with 4,942 additions and 3,974 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
* Find an Events plugin
* WooCommerce compatibility



### 0.1.5: September 24nd, 2014
* Fix "Theme My Login" plugin Compatibility

### 0.1.4: July 22nd, 2014
* Upgrade Boostrap to v3.2.0
* Adding Boostrap Sass and Grunt support (see readme for installation)
Expand Down
15 changes: 12 additions & 3 deletions css/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -6780,6 +6780,12 @@ iframe {
margin-left: 0;
width: 100%;
}
.in-frame #content {
padding: 0;
}
.in-frame .gform_footer {
margin-bottom: 0;
}

#modal-frame {
width: 100%;
Expand Down Expand Up @@ -6908,23 +6914,26 @@ a.edit-post:after {
width: 75%;
}
}
.form-horizontal .help-block, .form-horizontal .form-actions {
.form-horizontal .help-block, .form-horizontal .form-actions, .form-horizontal .form-input-offset {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
.form-horizontal .help-block, .form-horizontal .form-actions {
.form-horizontal .help-block, .form-horizontal .form-actions, .form-horizontal .form-input-offset {
float: left;
width: 75%;
}
}
@media (min-width: 768px) {
.form-horizontal .help-block, .form-horizontal .form-actions {
.form-horizontal .help-block, .form-horizontal .form-actions, .form-horizontal .form-input-offset {
margin-left: 25%;
}
}
.form-horizontal .form-input-offset .checkbox {
margin-left: 20px;
}

/* hide the honeypot field ------------------------------------------------------*/
/*
Expand Down
2 changes: 1 addition & 1 deletion css/application.min.css

Large diffs are not rendered by default.

42 changes: 25 additions & 17 deletions form-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,34 @@
<form name="form-login" id="form-login<?php $template->the_instance(); ?>" action="<?php $template->the_action_url('login'); ?>" method="post" class="form form-horizontal form-login">

<div class="form-group">
<label class="control-label" for="userlogin<?php $template->the_instance(); ?>"><?php _e('Username', 'stormbringer') ?></label>
<label class="control-label" for="userlogin<?php $template->the_instance(); ?>"><?php _e('Nom d\'utilisateur', 'stormbringer') ?></label>

<div class="form-field">
<input placeholder="<?php _e('Username', 'stormbringer') ?>" type="text" name="log" id="userlogin<?php $template->the_instance(); ?>" class="form-control" value="<?php $template->the_posted_value('log'); ?>"/>
<div class="form-input">
<input placeholder="<?php _e('Nom d\'utilisateur', 'stormbringer') ?>" type="text" name="log" id="userlogin<?php $template->the_instance(); ?>" class="form-control" value="<?php $template->the_posted_value('log'); ?>"/>
</div>
</div>

<div class="form-group">
<label class="control-label" for="userpass-<?php $template->the_instance(); ?>"><?php _e('Password', 'stormbringer') ?></label>
<label class="control-label" for="userpass-<?php $template->the_instance(); ?>"><?php _e('Mot de passe', 'stormbringer') ?></label>

<div class="form-field">
<input placeholder="<?php _e('Password', 'stormbringer') ?>" type="password" name="pwd" id="userpass<?php $template->the_instance(); ?>" class="form-control" value=""/>
<div class="form-input">
<input placeholder="<?php _e('Mot de passe', 'stormbringer') ?>" type="password" name="pwd" id="userpass<?php $template->the_instance(); ?>" class="form-control" value=""/>
</div>
<?php
if ($this->options['show_pass_link']):?>
<div class="help-block"><small>
<?php
printf('<a href="%s">%s</a>', $this->get_action_url('lostpassword'), $this->get_title('lostpassword'));
?></small>
</div>
<?php endif; ?>
</div>


<div class="form-group">
<div class="form-field">
<div class="form-input form-input-offset">
<label class="checkbox">
<input name="rememberme" type="checkbox" id="rememberme<?php $template->the_instance(); ?>" value="forever"/> <?php _e('Remember Me', 'stormbringer'); ?>
<input name="rememberme" type="checkbox" id="rememberme<?php $template->the_instance(); ?>" value="forever"/> <?php _e('Se souvenir de moi', 'stormbringer'); ?>
</label>
</div>
</div>
Expand All @@ -42,15 +50,15 @@
do_action_ref_array('tml_login_form', array(&$template)); // TML hook
?>

<div class="form-group form-actions">
<input class="btn btn-primary" type="submit" name="form-submit" id="form-submit<?php $template->the_instance(); ?>" value="<?php _e('Log In', 'stormbringer'); ?>"/>
<?php
if ($this->options['show_pass_link'])
printf('<a href="%s">%s</a>', $this->get_action_url('lostpassword'), $this->get_title('lostpassword'));
?>
<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url('login'); ?>"/>
<input type="hidden" name="testcookie" value="1"/>
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>"/>
<div class="form-group">
<div class="form-actions">
<input class="btn btn-primary" type="submit" name="form-submit" id="form-submit<?php $template->the_instance(); ?>" value="<?php _e('Se connecter', 'stormbringer'); ?>"/>

<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url('login'); ?>"/>
<input type="hidden" name="testcookie" value="1"/>
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>"/>

</div>
</div>

<div class="movetomodal-footer">
Expand Down
20 changes: 10 additions & 10 deletions form-lostpassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
<form name="form-lostpassword" id="form-lostpassword<?php $template->the_instance(); ?>" action="<?php $template->the_action_url('lostpassword'); ?>" method="post" class="form-horizontal form-lostpassword">

<div class="form-group">
<label class="control-label" for="userlogin<?php $template->the_instance(); ?>"><?php _e('Username or E-mail:', 'stormbringer') ?></label>
<label class="control-label" for="userlogin<?php $template->the_instance(); ?>"><?php _e('Nom d\'utilisateur ou e-mail', 'stormbringer') ?></label>

<div class="controls">
<input placeholder="<?php _e('Username or E-mail:', 'stormbringer') ?>" type="text" name="user_login" id="userlogin<?php $template->the_instance(); ?>" class="input-small" value="<?php $template->the_posted_value('user_login'); ?>"/>
<div class="form-input">
<input placeholder="<?php _e('Nom d\'utilisateur ou e-mail', 'stormbringer') ?>" type="text" name="user_login" id="userlogin<?php $template->the_instance(); ?>" class="form-control" value="<?php $template->the_posted_value('user_login'); ?>"/>
</div>
</div>

<?php
do_action('lostpassword_form'); // Wordpress hook
do_action_ref_array('tml_lostpassword_form', array(&$template)); // TML hook
?>

<div class="form-actions">
<input class="btn btn-primary" type="submit" name="form-submit" id="form-submit<?php $template->the_instance(); ?>" value="<?php _e('Get New Password', 'stormbringer'); ?>"/>
<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url('lostpassword'); ?>"/>
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>"/>
</div>

<div class="form-group">
<div class="form-actions">
<input class="btn btn-primary" type="submit" name="form-submit" id="form-submit<?php $template->the_instance(); ?>" value="<?php _e('Obtenir un nouveau mot de passe', 'stormbringer'); ?>"/>
<input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url('lostpassword'); ?>"/>
<input type="hidden" name="instance" value="<?php $template->the_instance(); ?>"/>
</div>
</div>
</form>
<?php //$template->the_action_links(array('lostpassword' => false)); ?>
86 changes: 44 additions & 42 deletions form-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,48 +27,48 @@
<?php do_action('profile_personal_options', $profileuser); ?>

<fieldset>
<legend><?php _e('Name', 'stormbringer') ?></legend>
<legend><?php _e('Nom', 'stormbringer') ?></legend>


<div class="form-group">
<label class="control-label" for="user_login"><?php _e('Username', 'stormbringer') ?></label>
<label class="control-label" for="user_login"><?php _e('Nom d\'utilisateur', 'stormbringer') ?></label>

<div class="form-field">
<input placeholder="<?php _e('Username', 'stormbringer') ?>" disabled="disabled" type="text" name="user_login" id="user_login" class="form-control" value="<?php echo esc_attr($profileuser->user_login); ?>"/>
<span class="help-block"><?php _e('Your username cannot be changed.', 'stormbringer'); ?></span>
<div class="form-input">
<input placeholder="<?php _e('Nom d\'utilisateur', 'stormbringer') ?>" disabled="disabled" type="text" name="user_login" id="user_login" class="form-control" value="<?php echo esc_attr($profileuser->user_login); ?>"/>
</div>
<span class="help-block"><?php _e('Votre nom d\'utilisateur ne peut pas être changé', 'stormbringer'); ?></span>
</div>

<div class="form-group">
<label class="control-label" for="first_name"><?php _e('First name', 'stormbringer') ?></label>
<label class="control-label" for="first_name"><?php _e('Prénom', 'stormbringer') ?></label>

<div class="form-field">
<input placeholder="<?php _e('First name', 'stormbringer') ?>" type="text" name="first_name" id="first_name" class="form-control" value="<?php echo esc_attr($profileuser->first_name) ?>"/>
<div class="form-input">
<input placeholder="<?php _e('Prénom', 'stormbringer') ?>" type="text" name="first_name" id="first_name" class="form-control" value="<?php echo esc_attr($profileuser->first_name) ?>"/>
</div>
</div>

<div class="form-group">
<label class="control-label" for="last_name"><?php _e('Last name', 'stormbringer') ?></label>
<label class="control-label" for="last_name"><?php _e('Nom', 'stormbringer') ?></label>

<div class="form-field">
<input placeholder="<?php _e('Last name', 'stormbringer') ?>" type="text" name="last_name" id="last_name" class="form-control" value="<?php echo esc_attr($profileuser->last_name) ?>"/>
<div class="form-input">
<input placeholder="<?php _e('Nom', 'stormbringer') ?>" type="text" name="last_name" id="last_name" class="form-control" value="<?php echo esc_attr($profileuser->last_name) ?>"/>
</div>
</div>

<div class="form-group">
<label class="control-label" for="nickname"><?php _e('Nickname', 'stormbringer') ?>
<label class="control-label" for="nickname"><?php _e('Surnom', 'stormbringer') ?>
<span class="form-required">*</span></label>

<div class="form-field">
<input placeholder="<?php _e('Nickname', 'stormbringer') ?>" type="text" name="nickname" id="nickname" class="form-control" value="<?php echo esc_attr($profileuser->nickname) ?>"/>
<div class="form-input">
<input placeholder="<?php _e('Surnom', 'stormbringer') ?>" type="text" name="nickname" id="nickname" class="form-control" value="<?php echo esc_attr($profileuser->nickname) ?>"/>
</div>
</div>

<div class="form-group">
<label class="control-label" for="display_name"><?php _e('Display name publicly as', 'stormbringer') ?>
<label class="control-label" for="display_name"><?php _e('Nom affiché publiquement', 'stormbringer') ?>
<span class="form-required">*</span></label>

<div class="form-field">
<div class="form-input">
<select name="display_name" id="display_name" class="form-control">
<?php
$public_display = array();
Expand Down Expand Up @@ -98,21 +98,21 @@


<fieldset>
<legend><?php _e('Contact Info', 'stormbringer') ?></legend>
<legend><?php _e('Réseaux sociaux', 'stormbringer') ?></legend>

<div class="form-group">
<label class="control-label" for="email"><?php _e('E-mail', 'stormbringer') ?><span class="form-required">*</span></label>

<div class="form-field">
<div class="form-input">
<input placeholder="<?php _e('E-mail', 'stormbringer') ?>" type="text" name="email" id="email" class="form-control" value="<?php echo esc_attr($profileuser->user_email) ?>"/>
</div>
</div>

<div class="form-group">
<label class="control-label" for="url"><?php _e('Website', 'stormbringer') ?></label>

<div class="form-field">
<input placeholder="<?php _e('Website', 'stormbringer') ?>" type="text" name="url" id="url" class="form-control" value="<?php echo esc_attr($profileuser->user_url) ?>"/>
<div class="form-input">
<input placeholder="<?php _e('Site web', 'stormbringer') ?>" type="text" name="url" id="url" class="form-control" value="<?php echo esc_attr($profileuser->user_url) ?>"/>
</div>
</div>

Expand All @@ -122,7 +122,7 @@
<div class="form-group">
<label class="control-label" for="<?php echo $name; ?>"><?php echo apply_filters('user_' . $name . '_label', $desc); ?></label>

<div class="form-field">
<div class="form-input">
<input placeholder="<?php echo apply_filters('user_' . $name . '_label', $desc); ?>" type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" class="form-control" value="<?php echo esc_attr($profileuser->$name) ?>"/>
</div>
</div>
Expand All @@ -134,34 +134,34 @@
</fieldset>

<fieldset>
<legend><?php _e('About Yourself', 'stormbringer'); ?></legend>
<legend><?php _e('À propos de vous', 'stormbringer'); ?></legend>

<div class="form-group">
<label class="control-label" for="description"><?php _e('Biographical Info', 'stormbringer'); ?></label>

<div class="form-field">
<div class="form-input">
<textarea name="description" id="description" rows="5" cols="30" class="form-control"><?php echo esc_html($profileuser->description); ?></textarea>
<span class="help-block"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.', 'stormbringer'); ?></span>
</div>
<div class="help-block"><?php _e('Décrivez-vous en quelques mots.', 'stormbringer'); ?></div>
</div>

<?php
$show_password_fields = apply_filters('show_password_fields', true, $profileuser);
if ($show_password_fields) :
?>
<div class="form-group">
<label class="control-label" for="pass1"><?php _e('New Password', 'stormbringer'); ?></label>
<label class="control-label" for="pass1"><?php _e('Nouveau mot de passe', 'stormbringer'); ?></label>
<div class="form-input">
<input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" class="form-control"/>
</div>
<div class="help-block"><?php _e('Si vous souhaitez changer de mot de passe, sinon laissez le champ vide.', 'stormbringer'); ?></div>

<div class="form-field">
<input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" class="form-control"/>
<span class="help-block"><?php _e('If you would like to change the password type a new one. Otherwise leave this blank.', 'stormbringer'); ?></span><br/>
<div class="form-input form-input-offset">
<input type="password" name="pass2" id="pass2" size="16" value="" autocomplete="off" class="form-control"/>
<span class="help-block"><?php _e('Type your new password again.', 'stormbringer'); ?></span><br/>

<p id="pass-strength-result"><?php _e('Strength indicator', 'stormbringer'); ?></p>

<p class="help-block indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).', 'stormbringer'); ?></p>
</div>
<span class="help-block"><?php _e('Saisissez votre mot de passe à nouveau.', 'stormbringer'); ?></span><br/>
<p id="pass-strength-result" class="help-block"><?php _e('Force du mot de passe', 'stormbringer'); ?></p>
<p class="help-block indicator-hint"><?php _e('Conseil : Le mot de passe doit comporter au moins 8 charactères. Pour le rendre plus fort, utilisez des capitales et minuscules, chiffres et symboles comme ! " ? $ % ^ &amp; ).', 'stormbringer'); ?></p>
</div>
<?php endif; ?>
</fieldset>
Expand All @@ -171,12 +171,12 @@

<?php if (count($profileuser->caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true, $profileuser)) { ?>
<fieldset>
<legend><?php _e('Additional Capabilities', 'stormbringer') ?></legend>
<legend><?php _e('Permissions', 'stormbringer') ?></legend>

<div class="form-group">
<label class="control-label"><?php _e('Capabilities', 'stormbringer'); ?></label>
<label class="control-label"><?php _e('Permissions', 'stormbringer'); ?></label>

<div class="form-field">
<div class="form-input">
<?php
$output = '';
global $wp_roles;
Expand All @@ -194,12 +194,14 @@
</fieldset>
<?php } ?>

<div class="form-group form-actions">
<input class="btn btn-primary" type="submit" name="form-submit" value="<?php esc_attr_e('Update Profile', 'stormbringer'); ?>"/>
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($current_user->ID); ?>"/>
<input type="hidden" name="from" value="profile"/>
<input type="hidden" name="checkuser_id" value="<?php echo $current_user->ID; ?>"/>
<?php wp_nonce_field('update-user_' . $current_user->ID) ?>
<div class="form-group">
<div class="form-actions">
<input class="btn btn-primary" type="submit" name="form-submit" value="<?php esc_attr_e('Mettre à jour mon compte', 'stormbringer'); ?>"/>
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($current_user->ID); ?>"/>
<input type="hidden" name="from" value="profile"/>
<input type="hidden" name="checkuser_id" value="<?php echo $current_user->ID; ?>"/>
<?php wp_nonce_field('update-user_' . $current_user->ID) ?>
</div>
</div>

</form>
Loading

0 comments on commit 3ff1cdb

Please sign in to comment.