]> _ Git - physioassist.git/commitdiff
wip #738 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 19 Sep 2016 16:40:42 +0000 (16:40 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 19 Sep 2016 16:40:42 +0000 (16:40 +0000)
framework/application/forms/CMS/Sub/Asset.php [new file with mode: 0644]
framework/application/forms/CMS/Sub/Assets.php [new file with mode: 0644]
framework/application/forms/CMS/Sub/Operation.php

diff --git a/framework/application/forms/CMS/Sub/Asset.php b/framework/application/forms/CMS/Sub/Asset.php
new file mode 100644 (file)
index 0000000..3b80a7d
--- /dev/null
@@ -0,0 +1,26 @@
+<?php\r
+\r
+/**\r
+ * Created by IntelliJ IDEA.\r
+ * User: Vincent\r
+ * Date: 19/09/2016\r
+ * Time: 17:56\r
+ */\r
+class Simeox_Form_CMS_Sub_Asset extends CubeIT_Form_SubForm {\r
+       public function init() {\r
+               parent::init();\r
+\r
+               $title = new Zend_Form_Element_Text('title');\r
+               $title->setLabel('Titre');\r
+               $this->addElement($title);\r
+\r
+               $url = new CubeIT_Form_Element_Url("url");\r
+               $url->setLabel('URL de la vidéo ou du document');\r
+               $this->addElement($url);\r
+\r
+               $thumbnail = new CubeIT_Form_Element_File_Image('thumbnail');\r
+               $thumbnail->setMaxItems(1);\r
+               $thumbnail->setLabel('Miniature');\r
+               $this->addElement($thumbnail);\r
+       }\r
+}
\ No newline at end of file
diff --git a/framework/application/forms/CMS/Sub/Assets.php b/framework/application/forms/CMS/Sub/Assets.php
new file mode 100644 (file)
index 0000000..9814d9d
--- /dev/null
@@ -0,0 +1,16 @@
+<?php\r
+\r
+/**\r
+ * Created by IntelliJ IDEA.\r
+ * User: Vincent\r
+ * Date: 19/09/2016\r
+ * Time: 18:35\r
+ */\r
+class Simeox_Form_CMS_Sub_Assets extends CubeIT_Form_Multi_SubForm {\r
+       public function init() {\r
+               parent::init();\r
+               $this->setBaseLegend('Editer la ressource « $title »')\r
+                       ->setNewLegend('Nouvelle ressource')\r
+                       ->setBaseSubForm(new Simeox_Form_CMS_Sub_Asset());\r
+       }\r
+}
\ No newline at end of file
index 55cea2ffa39bb743aa8712663c37e1d24dbd9b75..0fdfe75db87680d5b8f4f38e6a27d0e9d0c03592 100644 (file)
@@ -2,32 +2,40 @@
 
 class Simeox_Form_CMS_Sub_Operation extends CubeIT_Form_SubForm {
 
-    public function init() {
-        parent::init();
+       public function init() {
+               parent::init();
 
-        $heading = new Zend_Form_Element_Text('heading');
-        $heading->setLabel('Titre');
-        $this->addElement($heading);
+               $heading = new Zend_Form_Element_Text('heading');
+               $heading->setLabel('Titre');
+               $this->addElement($heading);
 
-        $subheading = new Zend_Form_Element_Text('subheading');
-        $subheading->setAttrib('rows', 2);
-        $subheading->setLabel('Sous-titre');
-        $this->addElement($subheading);
+               $subheading = new Zend_Form_Element_Text('subheading');
+               $subheading->setAttrib('rows', 2);
+               $subheading->setLabel('Sous-titre');
+               $this->addElement($subheading);
 
-        $content = new Simeox_Form_Element_Markitup('content');
-        $content->setLabel('Contenus');
-        $this->addElement($content);
+               $content = new Simeox_Form_Element_Markitup('content');
+               $content->setLabel('Contenus');
+               $this->addElement($content);
 
-        $video = new CubeIT_Form_Element_WebVideo('video');
-        $video->setLabel('Video');
-        $this->addElement($video);
+               $video = new CubeIT_Form_Element_WebVideo('video');
+               $video->setLabel('Video');
+               $this->addElement($video);
 
-        $bg_image = new CubeIT_Form_Element_File_Image('bg_image');
-        $bg_image->setLabel("Image de fond");
-        $bg_image->setMaxItems(1);
-        $this->addElement($bg_image);
+               $videos = new Simeox_Form_CMS_Sub_Assets('videos');
+               $video->setLabel('Vidéos');
+               $this->addSubForm($videos, 'videos');
 
-    }
+               $documents = new Simeox_Form_CMS_Sub_Assets('documents');
+               $documents->setLabel('Documents');
+               $this->addSubForm($documents, 'documents');
+
+               $bg_image = new CubeIT_Form_Element_File_Image('bg_image');
+               $bg_image->setLabel("Image de fond");
+               $bg_image->setMaxItems(1);
+               $this->addElement($bg_image);
+
+       }
 
 
 }
\ No newline at end of file