repeat_new_password_label: 'Gentag adgangskode'
plain_password_label: '????'
email_label: 'Emailadresse'
- # group: 'Group'
# enabled_label: 'Enabled'
# last_login_label: 'Last login'
# twofactor_label: Two factor authentication
repeat_new_password_label: 'Neues Kennwort wiederholen'
plain_password_label: '????'
email_label: 'E-Mail-Adresse'
- # group: 'Group'
enabled_label: 'Aktiviert'
last_login_label: 'Letzter Login'
twofactor_label: Zwei-Faktor-Authentifizierung
repeat_new_password_label: 'Repeat new password'
plain_password_label: '????'
email_label: 'Email'
- group: 'Group'
enabled_label: 'Enabled'
last_login_label: 'Last login'
twofactor_label: Two factor authentication
repeat_new_password_label: 'رمز تازه را دوباره بنویسید'
plain_password_label: '????'
email_label: 'نشانی ایمیل'
- # group: 'Group'
# enabled_label: 'Enabled'
# last_login_label: 'Last login'
# twofactor_label: Two factor authentication
menu:
left:
-<<<<<<< 5da541f5bdeec8ad968ba75a30ca2d19ea64d1f2
unread: "Non lus"
starred: "Favoris"
archive: "Lus"
repeat_new_password_label: 'Ripeti password'
plain_password_label: '????'
email_label: 'E-mail'
- # group: 'Group'
# enabled_label: 'Enabled'
# last_login_label: 'Last login'
# twofactor_label: Two factor authentication
repeat_new_password_label: 'Confirmatz vòstre novèl senhal'
plain_password_label: 'Senhal en clar'
email_label: 'Adreça de corrièl'
- # group: 'Group'
enabled_label: 'Actiu'
last_login_label: 'Darrièra connexion'
twofactor_label: 'Autentificacion doble-factor'
repeat_new_password_label: 'Powtórz nowe hasło'
plain_password_label: 'Jawne hasło'
email_label: 'Adres email'
- # group: 'Group'
enabled_label: 'Włączony'
last_login_label: 'Ostatnie logowanie'
twofactor_label: Autoryzacja dwuetapowa
repeat_new_password_label: 'Repeat new password'
plain_password_label: '????'
email_label: 'E-mail'
- # group: 'Group'
# enabled_label: 'Enabled'
# last_login_label: 'Last login'
# twofactor_label: Two factor authentication
repeat_new_password_label: 'Yeni şifrenin tekrarı'
plain_password_label: '????'
email_label: 'E-posta'
- # group: 'Group'
# enabled_label: 'Enabled'
# last_login_label: 'Last login'
# twofactor_label: Two factor authentication
namespace Wallabag\GroupBundle\Entity;
+use Doctrine\Common\Collections\ArrayCollection;
use FOS\UserBundle\Model\Group as BaseGroup;
use Doctrine\ORM\Mapping as ORM;
use Wallabag\UserBundle\Entity\User;
namespace Wallabag\GroupBundle\Form;
-use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
'required' => false,
'label' => 'group.form.name_label',
])
- ->add('users', EntityType::class, array(
- 'class' => 'WallabagUserBundle:User',
- 'choice_label' => 'username',
- 'multiple' => true,
- 'expanded' => true,
- ))
->add('save', SubmitType::class, [
'label' => 'group.form.save',
])
</div>
</div>
- <div class="row">
- <div class="input-field col s12">
- {{ form_label(edit_form.users) }}
- {{ form_errors(edit_form.users) }}
- {{ form_widget(edit_form.users) }}
- </div>
- </div>
-
<br/>
{{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
<div class="input-field col s12">
<p class="help">{{ 'group.description'|trans|raw }}</p>
- <table class="bordered">
- <thead>
- <tr>
- <th>{{ 'group.form.name_label'|trans }}</th>
- <th>{{ 'group.form.roles_label'|trans }}</th>
- <th>{{ 'group.list.actions'|trans }}</th>
- </tr>
- </thead>
- <tbody>
- {% for group in groups %}
- <tr>
- <td>{{ group.name }}</td>
- <td></td>
- <td>
- <a href="{{ path('group_edit', { 'id': group.id }) }}">{{ 'group.list.edit_action'|trans }}</a>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
+ {% if groups is not empty %}
+ <table class="bordered">
+ <thead>
+ <tr>
+ <th>{{ 'group.form.name_label'|trans }}</th>
+ <th>{{ 'group.form.roles_label'|trans }}</th>
+ <th>{{ 'group.list.actions'|trans }}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for group in groups %}
+ <tr>
+ <td>{{ group.name }}</td>
+ <td></td>
+ <td>
+ <a href="{{ path('group_edit', { 'id': group.id }) }}">{{ 'group.list.edit_action'|trans }}</a>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% endif %}
<br />
<p>
<a href="{{ path('group_new') }}" class="waves-effect waves-light btn">{{ 'group.list.create_new_one'|trans }}</a>
private $authCode;
/**
- * @ORM\ManyToMany(targetEntity="Wallabag\GroupBundle\Entity\Group", inversedBy="users")
+ * @ORM\ManyToMany(targetEntity="Wallabag\GroupBundle\Entity\Group", inversedBy="users", cascade={"persist"})
* @ORM\JoinTable(name="user_group",
* joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="group_id", referencedColumnName="id")}
namespace Wallabag\UserBundle\Form;
+use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
->add('email', EmailType::class, [
'label' => 'user.form.email_label',
])
+ ->add('groups', EntityType::class, array(
+ 'class' => 'WallabagGroupBundle:Group',
+ 'choice_label' => 'name',
+ 'multiple' => true,
+ 'expanded' => true,
+ ))
->add('save', SubmitType::class, [
'label' => 'user.form.save',
])
namespace Wallabag\UserBundle\Form;
+use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
'required' => true,
'label' => 'user.form.username_label',
])
+ ->add('groups', EntityType::class, array(
+ 'class' => 'WallabagGroupBundle:Group',
+ 'choice_label' => 'name',
+ 'multiple' => true,
+ 'expanded' => true,
+ ))
->add('email', EmailType::class, [
'required' => true,
'label' => 'user.form.email_label',
</div>
</div>
+ <div class="row">
+ <div class="input-field col s12">
+ {{ form_label(edit_form.groups) }}
+ {{ form_errors(edit_form.groups) }}
+ {{ form_widget(edit_form.groups) }}
+ </div>
+ </div>
+
<div class="row">
<div class="input-field col s12">
{{ form_widget(edit_form.enabled) }}
{{ form_rest(searchForm) }}
</form>
</div>
-
+
</div>
<table class="bordered">
</div>
</div>
+ <div class="row">
+ <div class="input-field col s12">
+ {{ form_errors(form.groups) }}
+ {{ form_widget(form.groups) }}
+ </div>
+ </div>
+
{{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
{{ form_rest(form) }}
</form>