Author: sevein
Date: Fri Sep 23 10:43:16 2011
New Revision: 9802

Log:
Apply same markup to XML/CSV forms for consistency

Modified:
   trunk/apps/qubit/modules/object/actions/importSelectAction.class.php
   trunk/apps/qubit/modules/object/templates/importSelectSuccess.php

Modified: trunk/apps/qubit/modules/object/actions/importSelectAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/object/actions/importSelectAction.class.php        
Fri Sep 23 10:42:15 2011        (r9801)
+++ trunk/apps/qubit/modules/object/actions/importSelectAction.class.php        
Fri Sep 23 10:43:16 2011        (r9802)
@@ -21,19 +21,24 @@
 {
   public function execute($request)
   {
+    $this->form = new sfForm;
+
     $this->type = strtolower($request->getParameter('type'));
 
     switch ($this->type)
     {
       case 'xml':
         $this->title = $this->context->i18n->__('Import an XML file');
+
         break;
+
       case 'csv':
         $this->title = $this->context->i18n->__('Import a CSV file');
+
         break;
+
       default:
         $this->title = $this->context->i18n->__('Import a file');
-        break;
     }
   }
 }

Modified: trunk/apps/qubit/modules/object/templates/importSelectSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/object/templates/importSelectSuccess.php   Fri Sep 
23 10:42:15 2011        (r9801)
+++ trunk/apps/qubit/modules/object/templates/importSelectSuccess.php   Fri Sep 
23 10:43:16 2011        (r9802)
@@ -1,35 +1,54 @@
-<h1><?php echo $title; ?></h1>
+<h1><?php echo $title ?></h1>
 
-<?php echo form_tag(array('module' => 'object', 'action' => 'import'), 
array('multipart' => 'true')) ?>
-
-  <?php if ($sf_user->hasFlash('error')): ?>
+<?php if ($sf_user->hasFlash('error')): ?>
   <div class="messages error">
     <h3><?php echo __('Error encountered') ?></h3>
     <div><?php echo $sf_user->getFlash('error') ?></div>
   </div>
-  <?php endif; ?>
+<?php endif; ?>
+
+<?php echo $form->renderFormTag(url_for(array('module' => 'object', 'action' 
=> 'import')), array('enctype' => 'multipart/form-data')) ?>
+
+  <fieldset>
+
+    <legend><?php echo $title ?></legend>
 
-  <div class="form-item">
-    <input name="file" type="file"/>
-    <div class="description">
-      <?php echo __('Select a file to import') ?>
+    <div class="form-item">
+      <label><?php echo __('Select a file to import') ?></label>
+      <input name="file" type="file"/>
     </div>
-  </div>
 
-  <?php if ('csv' == $type): ?>
-    <select name="schema">
-      <option value=""><?php echo __('Auto-detect') ?></option>
-      <option value="isad">ISAD(G)</option>
-      <option value="rad">RAD</option>
-      <option value="isdiah">ISDIAH</option>
-    </select>
-  <?php endif; ?>
-
-  <div class="form-item">
-    <?php echo __('Do not index imported items') ?>
-    <input name="noindex" type="checkbox"/>
-  </div>
+    <?php if ('csv' == $type): ?>
+      <div class="form-item">
+        <label><?php echo __('Type') ?></label>
+        <select name="schema">
+          <option value=""><?php echo __('Auto-detect') ?></option>
+          <option value="isad">ISAD(G)</option>
+          <option value="rad">RAD</option>
+          <option value="isdiah">ISDIAH</option>
+        </select>
+      </div>
+    <?php endif; ?>
+
+    <div class="form-item">
+      <label>
+        <input name="noindex" type="checkbox"/>
+        <?php echo __('Do not index imported items') ?>
+      </label>
+    </div>
 
-  <input class="form-submit" type="submit" value="<?php echo __('Import') ?>"/>
+  </fieldset>
+
+  <div class="actions section">
+
+    <h2 class="element-invisible"><?php echo __('Actions') ?></h2>
+
+    <div class="content">
+      <ul class="clearfix links">
+        <li><input class="form-submit" type="submit" value="<?php echo 
__('Import') ?>"/></li>
+      </ul>
+    </div>
+
+  </div>
 
 </form>

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to