浏览代码

HUE-5043 [core] Fix wrongly closed html and svg elements

Enrico Berti 9 年之前
父节点
当前提交
99061a3

+ 4 - 4
apps/filebrowser/src/filebrowser/templates/editor_components.mako

@@ -83,13 +83,13 @@
         ${unicode(field) | n}
         ${unicode(field) | n}
       % else:
       % else:
         % if tag == 'textarea':
         % if tag == 'textarea':
-          <textarea name="${name or field.html_name | n}" ${make_attr_str(attrs) | n} />${extract_field_data(field) or ''}</textarea>
+          <textarea name="${name or field.html_name | n}" ${make_attr_str(attrs) | n}>${extract_field_data(field) or ''}</textarea>
         % elif tag == 'button':
         % elif tag == 'button':
-          <button name="${name or field.html_name | n}" ${make_attr_str(attrs) | n} value="${value}"/>${button_text or field.name or ''}</button>
+          <button name="${name or field.html_name | n}" ${make_attr_str(attrs) | n} value="${value}">${button_text or field.name or ''}</button>
         % elif tag == 'checkbox':
         % elif tag == 'checkbox':
-          <input type="checkbox" name="${name or field.html_name | n}" ${make_attr_str(attrs) | n} ${value and "CHECKED" or ""}/>${button_text or field.name or ''}</input>
+          <input type="checkbox" name="${name or field.html_name | n}" ${make_attr_str(attrs) | n} ${value and "CHECKED" or ""}/>${button_text or field.name or ''}
         % elif hidden:
         % elif hidden:
-          <input type="hidden" name="${name or field.html_name | n}" ${make_attr_str(attrs) | n} value="${extract_field_data(field)}"></input>
+          <input type="hidden" name="${name or field.html_name | n}" ${make_attr_str(attrs) | n} value="${extract_field_data(field)}" />
         % else:
         % else:
           %if file_chooser:
           %if file_chooser:
             <${tag} type="text" name="${name or field.html_name | n}" value="${extract_field_data(field) or ''}" class="${cls}" ${make_attr_str(attrs) | n}/><a class="btn fileChooserBtn" href="#" data-filechooser-destination="${field.html_name | n}">..</a>
             <${tag} type="text" name="${name or field.html_name | n}" value="${extract_field_data(field) or ''}" class="${cls}" ${make_attr_str(attrs) | n}/><a class="btn fileChooserBtn" href="#" data-filechooser-destination="${field.html_name | n}">..</a>

+ 2 - 2
apps/oozie/src/oozie/templates/editor/edit_bundle.mako

@@ -133,7 +133,7 @@ ${ layout.menubar(section='bundles') }
           <a id="backBtn" class="btn disabled">${ _('Back') }</a>
           <a id="backBtn" class="btn disabled">${ _('Back') }</a>
           <a id="nextBtn" class="btn btn-primary disable-feedback">${ _('Next') }</a>
           <a id="nextBtn" class="btn btn-primary disable-feedback">${ _('Next') }</a>
           % if bundle.is_editable(user):
           % if bundle.is_editable(user):
-            <input type="submit" class="btn btn-primary save" style="margin-left: 30px" value="${ _('Save bundle') }"></input>
+            <input type="submit" class="btn btn-primary save" style="margin-left: 30px" value="${ _('Save bundle') }" />
           % endif
           % endif
         </div>
         </div>
       </div>
       </div>
@@ -203,7 +203,7 @@ ${ layout.menubar(section='bundles') }
           </div>
           </div>
             % if bundled_coordinator_formset.forms and bundle.is_editable(user):
             % if bundled_coordinator_formset.forms and bundle.is_editable(user):
               <div class="form-actions" style="padding-left:10px">
               <div class="form-actions" style="padding-left:10px">
-                <input type="submit" class="btn btn-primary" value="${ _('Save') }"></input>
+                <input type="submit" class="btn btn-primary" value="${ _('Save') }" />
               </div>
               </div>
             % endif
             % endif
         </div>
         </div>

文件差异内容过多而无法显示
+ 1 - 7
desktop/core/src/desktop/templates/hue_icons.mako


+ 6 - 6
desktop/libs/indexer/src/indexer/templates/indexes.mako

@@ -95,7 +95,7 @@ ${ commonheader(_("Solr Indexes"), "search", user, "60px") | n,unicode }
 <script type="text/html" id="create-index">
 <script type="text/html" id="create-index">
   <div class="snippet-settings" data-bind="visible: index.showCreateModal">
   <div class="snippet-settings" data-bind="visible: index.showCreateModal">
 
 
-    <input data-bind="value: index.name"></input>
+    <input type="text" data-bind="value: index.name"/>
 
 
     <a href="javascript:void(0)" class="btn" data-bind="click: index.create">
     <a href="javascript:void(0)" class="btn" data-bind="click: index.create">
       <i class="fa fa-plus-circle"></i> ${ _('Create index') }
       <i class="fa fa-plus-circle"></i> ${ _('Create index') }
@@ -112,7 +112,7 @@ ${ commonheader(_("Solr Indexes"), "search", user, "60px") | n,unicode }
 <script type="text/html" id="create-alias">
 <script type="text/html" id="create-alias">
   <div class="snippet-settings" data-bind="visible: alias.showCreateModal">
   <div class="snippet-settings" data-bind="visible: alias.showCreateModal">
 
 
-    <input data-bind="value: alias.name"></input>
+    <input type="text" data-bind="value: alias.name"/>
     <select data-bind="options: alias.availableCollections, selectedOptions: alias.chosenCollections, optionsText: 'name', optionsValue: 'name'" size="5" multiple="true"></select>
     <select data-bind="options: alias.availableCollections, selectedOptions: alias.chosenCollections, optionsText: 'name', optionsValue: 'name'" size="5" multiple="true"></select>
 
 
     <a href="javascript:void(0)" class="btn" data-bind="click: alias.create, visible: alias.chosenCollections().length > 0">
     <a href="javascript:void(0)" class="btn" data-bind="click: alias.create, visible: alias.chosenCollections().length > 0">
@@ -130,7 +130,7 @@ ${ commonheader(_("Solr Indexes"), "search", user, "60px") | n,unicode }
 <script type="text/html" id="create-index-wizard">
 <script type="text/html" id="create-index-wizard">
   <div class="snippet-settings" data-bind="visible: createWizard.show">
   <div class="snippet-settings" data-bind="visible: createWizard.show">
 
 
-    ${ _('Name') } <input data-bind="value: createWizard.name"></input>
+    ${ _('Name') } <input type="text" data-bind="value: createWizard.name"/>
     
     
     <!-- ko if: createWizard.name() -->
     <!-- ko if: createWizard.name() -->
     <select data-bind="options: createWizard.availableWizards, value: createWizard.wizard, optionsText: 'name'" size="5"></select>
     <select data-bind="options: createWizard.availableWizards, value: createWizard.wizard, optionsText: 'name'" size="5"></select>
@@ -171,7 +171,7 @@ ${ commonheader(_("Solr Indexes"), "search", user, "60px") | n,unicode }
   <!-- ko if: name() == 'file' -->
   <!-- ko if: name() == 'file' -->
     <div class="snippet-settings" data-bind="visible: show">
     <div class="snippet-settings" data-bind="visible: show">
 
 
-      ${ _('Path') } <input data-bind="value: path"></input>
+      ${ _('Path') } <input type="text" data-bind="value: path"/>
       <select data-bind="visible: path, options: availableFormats, value: format" size="5"></select>
       <select data-bind="visible: path, options: availableFormats, value: format" size="5"></select>
 
 
     </div>
     </div>
@@ -183,8 +183,8 @@ ${ commonheader(_("Solr Indexes"), "search", user, "60px") | n,unicode }
   <!-- ko if: name() == 'hive' -->
   <!-- ko if: name() == 'hive' -->
     <div class="snippet-settings" data-bind="visible: show">
     <div class="snippet-settings" data-bind="visible: show">
 
 
-      ${ _('Database') } <input data-bind="value: database"></input>
-      ${ _('Table') } <input data-bind="value: table"></input>
+      ${ _('Database') } <input type="text" data-bind="value: database"/>
+      ${ _('Table') } <input type="text" data-bind="value: table"/>
 
 
     </div>
     </div>
   <!-- /ko -->
   <!-- /ko -->

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -2200,7 +2200,7 @@ ${ hueIcons.symbols() }
   </div>
   </div>
   <div class="modal-footer">
   <div class="modal-footer">
     <a class="btn" data-dismiss="modal">${_('Cancel')}</a>
     <a class="btn" data-dismiss="modal">${_('Cancel')}</a>
-    <input type="button" class="btn btn-primary disable-feedback" value="${_('Save')}" data-dismiss="modal" data-bind="click: saveAsNotebook, enable: $root.selectedNotebook().name().length > 0"></input>
+    <input type="button" class="btn btn-primary disable-feedback" value="${_('Save')}" data-dismiss="modal" data-bind="click: saveAsNotebook, enable: $root.selectedNotebook().name().length > 0"/>
   </div>
   </div>
   <!-- /ko -->
   <!-- /ko -->
 </div>
 </div>

+ 4 - 4
docs/sdk/sdk.md

@@ -253,10 +253,10 @@ to include a simple form:
       <form action=${url("calculator.views.index")} method=POST>
       <form action=${url("calculator.views.index")} method=POST>
         ${ csrf_token(request) | n,unicode }
         ${ csrf_token(request) | n,unicode }
         <input name="a">
         <input name="a">
-        <input type="radio" name="op" value="add">+</input>
-        <input type="radio" name="op" value="subtract">-</input>
-        <input type="radio" name="op" value="multiply">*</input>
-        <input type="radio" name="op" value="divide">/</input>
+        <input type="radio" name="op" value="add" />+
+        <input type="radio" name="op" value="subtract"/>-
+        <input type="radio" name="op" value="multiply"/>*
+        <input type="radio" name="op" value="divide"/>/
         <input name="b">
         <input name="b">
         <input type="submit" value="Calculate">
         <input type="submit" value="Calculate">
       </form>
       </form>

部分文件因为文件数量过多而无法显示