Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

loading products from db and changing relevant fields to select field…

…s fixes bug 762106
  • Loading branch information...
commit 34eaecb60c52a64b7bf00fdc7241e9c28a47e9b6 1 parent b4f3d3a
@schalkneethling authored
View
3  webapp-php/application/config/release_channels.php-dist
@@ -0,0 +1,3 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+ $config['channels'] = array('Release', 'Beta', 'Aurora', 'Nightly');
+?>
View
3  webapp-php/application/controllers/admin.php
@@ -66,7 +66,10 @@ public function branch_data_sources()
$this->setView('admin/branch_data_sources');
$this->setViewData(
array(
+ 'products_list' => $this->branch_model->getProducts(),
'products' => $branch_data['products'],
+ 'platforms' => Kohana::config('platforms.platforms'),
+ 'release_channels' => Kohana::config('release_channels.channels'),
'versions' => $branch_data['versions'],
'missing_visibility_entries' => $this->branch_model->getProductVersionsWithoutVisibility(),
'non_current_versions' => $this->branch_model->getNonCurrentProductVersions(true),
View
12 webapp-php/application/views/admin/branch_data_sources/add_products.php
@@ -8,7 +8,9 @@
<fieldset>
<div class="field">
<label for="product">Product Name:</label>
- <input type="text" name="product" id="product" required />
+ <select id="product" name="product">
+ <?php View::factory('common/products_select', array('products' => $products_list))->render(TRUE); ?>
+ </select>
</div>
<div class="field">
<label for="version">Version:</label>
@@ -16,7 +18,9 @@
</div>
<div class="field">
<label for="release_channel">Release Channel:</label>
- <input type="text" name="release_channel" id="release_channel" required />
+ <select id="release_channel" name="release_channel">
+ <?php View::factory('common/release_channels_select', array('channels' => $release_channels))->render(TRUE); ?>
+ </select>
</div>
<div class="field">
<label for="build_id">Build ID:</label>
@@ -24,7 +28,9 @@
</div>
<div class="field">
<label for="platform">Platform</label>
- <input type="text" name="platform" id="platform" required />
+ <select id="platform" name="platform">
+ <?php View::factory('common/platforms_select', array('platforms' => $platforms))->render(TRUE); ?>
+ </select>
</div>
<div class="field">
<label for="repository">Repository:</label>
View
5 webapp-php/application/views/common/platforms_select.php
@@ -0,0 +1,5 @@
+<?php foreach ($platforms as $p) { ?>
+ <option value="<?php out::H($p); ?>" <?php if (isset($platform) && ($p == $platform)) { ?> selected="selected" <?php } ?>>
+ <?php out::H($p); ?>
+ </option>
+<?php } ?>
View
5 webapp-php/application/views/common/products_select.php
@@ -0,0 +1,5 @@
+<?php foreach ($products as $p) { ?>
+ <option value="<?php out::H($p); ?>" <?php if (isset($product) && ($p == $product)) { ?> selected="selected" <?php } ?>>
+ <?php out::H($p); ?>
+ </option>
+<?php } ?>
View
5 webapp-php/application/views/common/release_channels_select.php
@@ -0,0 +1,5 @@
+<?php foreach ($channels as $c) { ?>
+ <option value="<?php out::H($c); ?>" <?php if (isset($channel) && ($c == $channel)) { ?> selected="selected" <?php } ?>>
+ <?php out::H($c); ?>
+ </option>
+<?php } ?>
View
8 webapp-php/application/views/daily/daily_search.php
@@ -23,13 +23,7 @@
<th>Product</th>
<td>
<select id="daily_search_version_form_products" name="p">
- <?php foreach ($products as $p) { ?>
- <option value="<?php out::H($p); ?>"
- <?php if ($p == $product) { ?>
- SELECTED
- <?php } ?>
- ><?php out::H($p); ?></option>
- <?php } ?>
+ <?php View::factory('common/products_select', array('products' => $products))->render(TRUE); ?>
</select>
</td>
</tr>
View
8 webapp-php/css/screen.css
@@ -1605,6 +1605,14 @@ p.advanced {
#add_product fieldset {
margin-top: 1em;
}
+#add_product select {
+ padding-top: 7px;
+ width: 207px;
+ height: 30px;
+}
+#add_product option {
+ padding: .5em;
+}
/**
* Form styles
*/
Please sign in to comment.
Something went wrong with that request. Please try again.