editsimple.smarty 2.95 KB
{capture assign=sCSS}
{literal}
/* inactivity */
.active .inactivity_message { display: none; }

.save_button,
.done_button { display: none; }

.active.editing .save_button,
.active.editing .done_button { display: block; }

.active.editing .edit_button { display: none; }


.active { position: relative; }

.inactive { background: #ccc; position: relative; }
.inactive .fixed_message, 
.inactive .unassigned_items,
.inactive .available_behaviours,
.inactive .behaviour_edit_options 
{
   display: none;
}

.inactive .item_list { display: none; }

.helpText {
   color: #666;
}


/*   logging support */
#brad-log .severity-INFO { color: blue; font-weight: bold; }
#brad-log .severity-DEBUG { color: green; font-weight: bold; }
#brad-log .severity-ERROR { color: red; font-weight: bold; }
#brad-log .explanation { font-family: monospace; white-space: pre; }

{/literal}
{/capture}
{$context->oPage->requireCSSStandalone($sCSS)}

<!-- include the mochikit js -->
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Base.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/DateTime.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Iter.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Async.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/DOM.js")}

{$context->oPage->requireJSResource("resources/js/taillog.js")}
{$context->oPage->requireJSResource("resources/js/conditional_simple_edit.js")}



{capture assign=sJS}
addLoadEvent(partial(editSimpleField, {$iMasterFieldId}));
{/capture}
{$context->oPage->requireJSStandalone($sJS)}



<h2>{i18n}Editing Fieldset Rules (Simple){/i18n}</h2>

<form method="POST" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="fieldset_id" id="global-fieldset-id" value="{$fieldset_id}" />

<table id="simple_conditional_edit">
<tr>
  <th>Column 1</th>
  <th>Column 2</th>
  <th>Column 3</th>
</tr>
<tr valign="top">

{foreach from=$aFields item=oField}
  <td class="inactive" id="md_{$oField->getId()}">
     <p class="inactivity_message">{i18n}This field is not controlled by the currently active group.{/i18n}</p>
     <div class="lookup_items">
     <h3>Field: {$oField->getName()}</h3>
         <select class="item_list">
  {foreach from=$oField->getValues() item=oMetaData}
				<option value="{$oMetaData->getId()}">{$oMetaData->getName()|escape}</option>
  {/foreach}
           </select>
         <div class="buttonset">
             <input type="button" value="{i18n}edit{/i18n}" class="edit_button" onclick="editSimpleField({$oField->getId()})" />
             <input type="button" value="{i18n}save{/i18n}" class="save_button" onclick="saveSimpleField({$oField->getId()})" />
             <input type="button" value="{i18n}done{/i18n}" class="done_button" onclick="finishSimpleField({$oField->getId()})" />
         </div>
     </div>
  </td>
{/foreach}
  
</tr>
</table>

<table id="brad-log">
<tr>
    <th>Severity</th>
    <th>Time</th>
    <th>Entry</th>
</tr>
<tbody  >

</tbody>
</table>