aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'php/inc/forms')
-rw-r--r--php/inc/forms/location.php23
-rw-r--r--php/inc/forms/mirror.php27
-rw-r--r--php/inc/forms/os.php16
-rw-r--r--php/inc/forms/product.php16
-rw-r--r--php/inc/forms/region.php16
-rw-r--r--php/inc/forms/user.php37
6 files changed, 135 insertions, 0 deletions
diff --git a/php/inc/forms/location.php b/php/inc/forms/location.php
new file mode 100644
index 0000000..60e35cb
--- /dev/null
+++ b/php/inc/forms/location.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * File location form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Product', 'product','label-small');
+form_select('product_id','product','',mirror_get_products_select(),$posts['product_id']);
+echo ' [<a href="./products.php">edit products</a>]';
+echo '</div><br />';
+
+echo '<div>';
+form_label('OS', 'os','label-small');
+form_select('os_id','os','',mirror_get_oss_select(),$posts['os_id']);
+echo ' [<a href="./os.php">edit operating systems</a>]';
+echo '</div><br />';
+
+echo '<div>';
+form_label('File Location', 'floc','label-small');
+form_text('location_path', 'floc', '', $posts['location_path'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/mirror.php b/php/inc/forms/mirror.php
new file mode 100644
index 0000000..c1e7dcb
--- /dev/null
+++ b/php/inc/forms/mirror.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Region form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Mirror Name', 'mname','label-small');
+form_text('mirror_name', 'mname', '', $posts['mirror_name'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Region', 'mregion','label-small');
+form_select('region_id','mregion','',mirror_get_regions_select(),$posts['region_id']);
+echo ' [<a href="./regions.php">edit regions</a>]';
+echo '</div><br />';
+
+echo '<div>';
+form_label('Base URL', 'murl','label-small');
+form_text('mirror_baseurl', 'murl', '', $posts['mirror_baseurl'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Rating', 'mrating','label-small');
+form_text('mirror_rating', 'mrating', '', $posts['mirror_rating'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/os.php b/php/inc/forms/os.php
new file mode 100644
index 0000000..63a7643
--- /dev/null
+++ b/php/inc/forms/os.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * OS form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('OS Name', 'oname','label-small');
+form_text('os_name', 'oname', '', $posts['os_name'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Priority', 'p','label-small');
+form_text('os_priority', 'p', '', $posts['os_priority'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/product.php b/php/inc/forms/product.php
new file mode 100644
index 0000000..0dc3c04
--- /dev/null
+++ b/php/inc/forms/product.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Product form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Product Name', 'pname','label-small');
+form_text('product_name', 'pname', '', $posts['product_name'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Priority', 'pty','label-small');
+form_text('product_priority', 'pty', '', $posts['product_priority'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/region.php b/php/inc/forms/region.php
new file mode 100644
index 0000000..9262809
--- /dev/null
+++ b/php/inc/forms/region.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Region form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Region Name', 'rname','label-small');
+form_text('region_name', 'rname', '', $posts['region_name'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Priority', 'rp','label-small');
+form_text('region_priority', 'rp', '', $posts['region_priority'], 30, 100);
+echo '</div><br />';
+?>
diff --git a/php/inc/forms/user.php b/php/inc/forms/user.php
new file mode 100644
index 0000000..bfd92bc
--- /dev/null
+++ b/php/inc/forms/user.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * User form.
+ * @package mirror
+ * @subpackage forms
+ */
+echo '<div>';
+form_label('Username', 'uname','label-small');
+form_text('username', 'uname', '', $posts['username'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Password', 'password','label-small');
+form_password('password', 'password', '', 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Re-enter Password', 'rpassword','label-small');
+form_password('rpassword', 'rpassword', '', 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('First Name', 'fname','label-small');
+form_text('user_firstname', 'fname', '', $posts['user_firstname'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Last Name', 'lname','label-small');
+form_text('user_lastname', 'lname', '', $posts['user_lastname'], 30, 100);
+echo '</div><br />';
+
+echo '<div>';
+form_label('Email', 'email','label-small');
+form_text('user_email', 'email', '', $posts['user_email'], 30, 100);
+echo '</div><br />';
+
+?>