".
parent::get_form()
."
".notice_tpl::gen_tpl_select("cms_module_common_view_django_template_record_content",$this->parameters['used_template'])."
";
return $form;
}
public function save_form(){
global $cms_module_carousel_view_carousel_mode;
global $cms_module_carousel_view_carousel_speed;
global $cms_module_carousel_view_carousel_pause;
global $cms_module_carousel_view_carousel_display_quantity;
global $cms_module_carousel_view_carousel_slide_quantity;
global $cms_module_carousel_view_carousel_autostart;
global $cms_module_carousel_view_carousel_css;
global $cms_module_common_view_django_template_record_content;
$this->parameters['mode'] = $cms_module_carousel_view_carousel_mode;
$this->parameters['speed'] = $cms_module_carousel_view_carousel_speed+0;
$this->parameters['pause'] = $cms_module_carousel_view_carousel_pause+0;
$this->parameters['display_quantity'] = $cms_module_carousel_view_carousel_display_quantity+0;
$this->parameters['slide_quantity'] = $cms_module_carousel_view_carousel_slide_quantity+0;
$this->parameters['autostart'] = $cms_module_carousel_view_carousel_autostart==1 ? true : false;
$this->parameters['css'] = stripslashes($cms_module_carousel_view_carousel_css);
$this->parameters['used_template'] = $cms_module_common_view_django_template_record_content;
return parent::save_form();
}
public function get_headers(){
global $base_path;
$headers = parent::get_headers();
$headers[]= "";
$args = array(
'do' => "generate_css"
);
$headers[]= "
".$this->get_format_data_structure_tree("cms_module_common_view_django_template_content")."
";
// css
$form.="
";
return $form;
}
public function save_manage_form($managed_datas){
global $cms_template;
global $cms_template_delete;
global $cms_module_common_view_django_template_name,$cms_module_common_view_django_template_content;
global $cms_module_carousel_view_carousel_manage_default_css;
if($cms_template_delete){
unset($managed_datas['templates'][$cms_template_delete]);
}else{
if($cms_template == "new"){
$cms_template = "template".(cms_module_common_view_django::get_max_template_id($managed_datas['templates'])+1);
}
$managed_datas['templates'][$cms_template] = array(
'name' => stripslashes($cms_module_common_view_django_template_name),
'content' => stripslashes($cms_module_common_view_django_template_content),
'css' => stripslashes($cms_module_carousel_view_carousel_manage_default_css)
);
}
return $managed_datas;
}
public function get_format_data_structure(){
$datas = new cms_module_carousel_datasource_notices();
$format_datas = $datas->get_format_data_structure();
$format_datas[0]['children'][] = array(
'var' => "records[i].content",
'desc' => $this->msg['cms_module_carousel_view_carousel_record_content_desc']
);
$format_datas[]= array(
'var' => "id",
'desc'=> $this->msg['cms_module_carousel_view_carousel_id_desc']
);
return $format_datas;
}
}