Browse Source

Anomalie #445: Ajout d'un élèment dans ungroupe: pof

Sevajol Bastien 12 years ago
parent
commit
8baa842769

+ 1 - 1
src/Muzich/CoreBundle/Resources/views/Info/development.html.twig View File

9
   <h1>Muzich est en cours de construction</h1>
9
   <h1>Muzich est en cours de construction</h1>
10
 
10
 
11
   <p>
11
   <p>
12
-    Actuellement vous utilisez la version <strong>0.8</strong> de Muzich. De nombreuses 
12
+    Actuellement vous utilisez la version <strong>0.9</strong> de Muzich. De nombreuses 
13
     fonctionnalités doivent voir le jours au fur et a mesure du développement.
13
     fonctionnalités doivent voir le jours au fur et a mesure du développement.
14
   </p>
14
   </p>
15
 
15
 

+ 1 - 1
src/Muzich/HomeBundle/Resources/views/Show/showGroup.html.twig View File

61
       <a href="#" id="element_add_close_link" class="button">
61
       <a href="#" id="element_add_close_link" class="button">
62
         &lt;&lt; {{ 'group.add_element_box.close'|trans({}, 'navigationui') }}
62
         &lt;&lt; {{ 'group.add_element_box.close'|trans({}, 'navigationui') }}
63
       </a>
63
       </a>
64
-      
64
+      <input type="hidden" id="add_element_group_page" value="{{ group.slug }}" />
65
       <form novalidate name="{{ add_form_name }}" action="{{ path('element_add', {'group_slug' : group.slug}) }}" method="post" {{ form_enctype(add_form) }}>
65
       <form novalidate name="{{ add_form_name }}" action="{{ path('element_add', {'group_slug' : group.slug}) }}" method="post" {{ form_enctype(add_form) }}>
66
 
66
 
67
         {% include "MuzichCoreBundle:Element:form.add.html.twig" with { 'form': add_form, 'form_name': add_form_name } %}
67
         {% include "MuzichCoreBundle:Element:form.add.html.twig" with { 'form': add_form, 'form_name': add_form_name } %}

+ 10 - 1
web/bundles/muzichcore/js/muzich.js View File

1377
         form_add_hide_errors();
1377
         form_add_hide_errors();
1378
         $('#form_add_loader').hide();
1378
         $('#form_add_loader').hide();
1379
         $('input#form_add_step').val('2');
1379
         $('input#form_add_step').val('2');
1380
-        $('form[name="add"]').attr('action', url_element_add);
1380
+        
1381
+        // On doit avoir le slug du groupe si on ajoute a un groupe
1382
+        if (!$('input#add_element_group_page').length)
1383
+        {
1384
+          $('form[name="add"]').attr('action', url_element_add);
1385
+        }
1386
+        else
1387
+        {
1388
+          $('form[name="add"]').attr('action', url_element_add+'/'+$('input#add_element_group_page').val());
1389
+        }
1381
         $('span#add_url_title_url').html($('input#element_add_url').val());
1390
         $('span#add_url_title_url').html($('input#element_add_url').val());
1382
       }
1391
       }
1383
       else
1392
       else