Selaa lähdekoodia

Style signup page

raylu 14 vuotta sitten
vanhempi
commit
d4b6945d87
2 muutettua tiedostoa jossa 28 lisäystä ja 13 poistoa
  1. 26 11
      views/signup/index.html.php
  2. 2 2
      webroot/css/signup.css

+ 26 - 11
views/signup/index.html.php

@@ -2,16 +2,31 @@
 $this->styles($this->html->style("/css/signup.css"));
 ?>
 
-<?php if (isset($key)): ?>
-Confirmation Link: <a href="<?=$link ?>/<?=$key->key ?>"> Link </a>
-<?php else: ?>
-<?=$this->flashMessage->output(); ?>
+<?php
+if (isset($key))
+{
+	echo "Confirmation Link: <a href=\"<?=$link ?>/<?=$key->key ?>\"> Link </a>";
+}
+else
+{
+	$template = '<tr{:wrap}><td>{:label}</td><td>{:input}</td><td>{:error}</td></tr>';
+	?>
+	<?= $this->flashMessage->output(); ?>
 
 
-<?=$this->form->create($user); ?>
-	<?=$this->form->field('username'); ?>
-	<?=$this->form->field('newpass', array('type' => 'password', 'label' => 'password')); ?>
-	<?=$this->form->field('email'); ?>
-	<?=$this->form->submit('Signup!'); ?>
-<?=$this->form->end(); ?>
-<?php endif; ?>
+	<div id="signup">
+	<?= $this->form->create($user); ?>
+		<table>
+			<?= $this->form->field('username',
+					array('template' => $template, 'id' => 's_username')) ?>
+			<?= $this->form->field('newpass',
+					array('template' => $template, 'id' => 's_password', 'label' => 'Password')) ?>
+			<?= $this->form->field('email',
+					array('template' => $template, 'id' => 's_email')) ?>
+		</table>
+	<?= $this->form->submit('Signup!'); ?>
+	<?= $this->form->end(); ?>
+	</div>
+<?php
+}
+?>

+ 2 - 2
webroot/css/signup.css

@@ -1,9 +1,9 @@
 #signup {
-	float: right;
+	width: 100%;
 	text-align: center;
 }
 #signup table {
-	margin-bottom: 5px;
+	margin: 0 auto 5px;
 }
 #signup table tr td:first-child {
 	text-align: right;