Changeset 1090:ed55b73cde39
- Timestamp:
- 12/20/12 23:43:13 (13 years ago)
- Branch:
- twig
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r1089 r1090 154 154 catch (Exception $e) { } 155 155 156 $form = new dcForm($core, 'quickentry','post.php');156 $form = new dcForm($core,array('quickentry','quick-entry'),'post.php'); 157 157 $form 158 158 ->addField( -
inc/admin/class.dc.form.php
r1058 r1090 201 201 class dcForm 202 202 { 203 protected $id; 203 204 protected $name; 204 205 protected $core; … … 218 219 } 219 220 221 protected function getNID($nid) 222 { 223 if (is_array($nid)) { 224 $this->name = $nid[0]; 225 $this->id = !empty($nid[1]) ? $nid[1] : null; 226 } 227 else { 228 $this->id = null; 229 $this->name = $nid; 230 } 231 } 232 220 233 public function __construct($core,$name,$action,$method='POST') 221 234 { 222 235 $this->core = $core; 223 $this-> name = $name;236 $this->getNID($name); 224 237 $this->method = $method; 225 238 $this->action = $action; … … 260 273 { 261 274 echo sprintf( 262 '<form method="%s" action="%s">', 275 '<form%s method="%s" action="%s">', 276 empty($this->id) ? '' : ' id="'.$this->id.'"', 263 277 $this->method, 264 278 $this->action
Note: See TracChangeset
for help on using the changeset viewer.