translate user roles on user page

This commit is contained in:
coderkun 2014-06-24 21:00:48 +02:00
commit f5344aff28
2 changed files with 13 additions and 1 deletions

View file

@ -1,5 +1,15 @@
<ul> <ul>
<?php foreach($roles as &$role) : ?> <?php foreach($roles as &$role) : ?>
<li><?=$role['name']?></li> <li>
<?php switch($role['name']) {
case 'admin': echo _('Admin');
break;
case 'moderator': echo _('Moderator');
break;
case 'user': echo _('User');
break;
}
?>
</li>
<?php endforeach ?> <?php endforeach ?>
</ul> </ul>

View file

@ -99,6 +99,8 @@
<input name="email" type="email" placeholder="<?=_('Email address')?>" title="<?=_('Email address')?>" required="required" value="<?=$email?>" <?=(array_key_exists('email', $validation)) ? 'class="invalid"' : null?> /><br /> <input name="email" type="email" placeholder="<?=_('Email address')?>" title="<?=_('Email address')?>" required="required" value="<?=$email?>" <?=(array_key_exists('email', $validation)) ? 'class="invalid"' : null?> /><br />
<label for="password"><?=_('Password')?>:</label> <label for="password"><?=_('Password')?>:</label>
<input name="password" type="password" placeholder="<?=_('Password')?>" title="<?=_('Password')?>" maxlength="<?=$validationSettings['password']['maxlength']?>" <?=(array_key_exists('password', $validation)) ? 'class="invalid"' : null?> /><br /> <input name="password" type="password" placeholder="<?=_('Password')?>" title="<?=_('Password')?>" maxlength="<?=$validationSettings['password']['maxlength']?>" <?=(array_key_exists('password', $validation)) ? 'class="invalid"' : null?> /><br />
<input id="mailing" type="checkbox" name="mailing" <?php if($mailing) : ?>checked="checked"<?php endif ?> />
<label for="mailing"><?=_('Mail notifications')?></label>
</fieldset> </fieldset>
<input type="submit" name="save" value="<?=_('save')?>" /> <input type="submit" name="save" value="<?=_('save')?>" />
</form> </form>