".
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;
global $cms_module_carousel_view_carousel_autohover;
global $cms_module_carousel_view_carousel_pager;
$this->parameters['mode'] = $cms_module_carousel_view_carousel_mode;
$this->parameters['speed'] = (int) $cms_module_carousel_view_carousel_speed;
$this->parameters['pause'] = (int) $cms_module_carousel_view_carousel_pause;
$this->parameters['display_quantity'] = (int) $cms_module_carousel_view_carousel_display_quantity;
$this->parameters['slide_quantity'] = (int) $cms_module_carousel_view_carousel_slide_quantity;
$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;
$this->parameters['autohover'] = $cms_module_carousel_view_carousel_autohover==1 ? true : false;
$this->parameters['pager'] = $cms_module_carousel_view_carousel_pager==1 ? true : false;
return parent::save_form();
}
public function get_headers($datas=array()){
global $base_path;
$headers = parent::get_headers($datas);
$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(){
if (static::class == "cms_module_carousel_view_carousel") {
$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_merge($format_datas,parent::get_format_data_structure());
return $format_datas;
}
return parent::get_format_data_structure();
}
}