Permalink
Browse files

Correct convention for forms

  • Loading branch information...
1 parent 84f806a commit ed593c753b1738a5a4aa2a116d5ded3f5b3fc6ff Ryan Thompson committed Feb 27, 2014
Showing with 10 additions and 10 deletions.
  1. +10 −10 system/cms/modules/streams_core/src/Pyro/Module/Streams/Ui/EntryUi.php
@@ -284,6 +284,16 @@ protected function triggerForm()
$this->formUrl = $_SERVER['QUERY_STRING'] ? uri_string() . '?' . $_SERVER['QUERY_STRING'] : uri_string();
+ if ($this->getTitle() === null) {
+ $this->title(
+ lang(
+ $this->model->getStream()->stream_namespace
+ . '.stream.' . $this->model->getStream()->stream_slug
+ . '.' . ($this->model->getKey() ? 'edit' : 'create')
+ )
+ );
+ }
+
if (empty($this->tabs)) {
$this->content = ci()->load->view($this->view ? : 'streams_core/entries/form', $this->attributes, true);
} else {
@@ -300,16 +310,6 @@ protected function triggerForm()
);
}
- if ($this->getTitle() === null) {
- $this->title(
- lang(
- $this->model->getStream()->stream_namespace
- . ':' . $this->model->getStream()->stream_slug
- . '.' . ($this->model->getKey() ? 'edit' : 'create')
- )
- );
- }
-
return $this;
}

0 comments on commit ed593c7

Please sign in to comment.