@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | class HtmlModal extends BaseHtml { |
15 | 15 | protected $title="HtmlModal Title"; |
16 | 16 | protected $content=""; |
17 | - protected $buttons=array (); |
|
17 | + protected $buttons=array(); |
|
18 | 18 | protected $showOnStartup=false; |
19 | 19 | protected $draggable=false; |
20 | 20 | protected $validCondition=NULL; |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | public function __construct($identifier, $title="", $content="", $buttonCaptions=array()) { |
28 | 28 | parent::__construct($identifier); |
29 | 29 | $this->_template=include 'templates/tplModal.php'; |
30 | - $this->buttons=array (); |
|
30 | + $this->buttons=array(); |
|
31 | 31 | $this->title=$title; |
32 | 32 | $this->content=$content; |
33 | - foreach ( $buttonCaptions as $button ) { |
|
33 | + foreach ($buttonCaptions as $button) { |
|
34 | 34 | $this->addButton($button); |
35 | 35 | } |
36 | 36 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param string $value |
66 | 66 | * @return HtmlButton |
67 | 67 | */ |
68 | - public function addOkayButton($value="Okay",$jsCode="") { |
|
68 | + public function addOkayButton($value="Okay", $jsCode="") { |
|
69 | 69 | $btn=$this->addButton($value, "btn-primary"); |
70 | 70 | $btn->onClick("if(".$this->getValidCondition()."){ ".$jsCode."$('#".$this->identifier."').modal('hide');}"); |
71 | 71 | return $btn; |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | * @param string $viewName |
115 | 115 | * @param array $params The parameters to pass to the view |
116 | 116 | */ |
117 | - public function renderView(JsUtils $js,$initialController,$viewName, $params=array()) { |
|
118 | - $this->content=$js->renderContent($initialController, $viewName,$params); |
|
117 | + public function renderView(JsUtils $js, $initialController, $viewName, $params=array()) { |
|
118 | + $this->content=$js->renderContent($initialController, $viewName, $params); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -126,8 +126,8 @@ discard block |
||
126 | 126 | * @param string $actionName the action name |
127 | 127 | * @param array $params |
128 | 128 | */ |
129 | - public function forward(JsUtils $js,$initialControllerInstance,$controllerName,$actionName,$params=NULL){ |
|
130 | - $this->content=$js->forward($initialControllerInstance, $controllerName, $actionName,$params); |
|
129 | + public function forward(JsUtils $js, $initialControllerInstance, $controllerName, $actionName, $params=NULL) { |
|
130 | + $this->content=$js->forward($initialControllerInstance, $controllerName, $actionName, $params); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | /* |
@@ -135,10 +135,10 @@ discard block |
||
135 | 135 | * @see BaseHtml::run() |
136 | 136 | */ |
137 | 137 | public function run(JsUtils $js) { |
138 | - if($this->content instanceof BaseHtml){ |
|
138 | + if ($this->content instanceof BaseHtml) { |
|
139 | 139 | $this->content->run($js); |
140 | 140 | } |
141 | - $this->_bsComponent=$js->bootstrap()->modal("#".$this->identifier, array ( |
|
141 | + $this->_bsComponent=$js->bootstrap()->modal("#".$this->identifier, array( |
|
142 | 142 | "show" => $this->showOnStartup |
143 | 143 | )); |
144 | 144 | if ($this->draggable) |