*** empty log message ***
This commit is contained in:
parent
4a9865e9ca
commit
44f5963d9d
|
@ -36,7 +36,8 @@ $ui_fmask = array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => 'Station Logo path',
|
'label' => 'Station Logo path',
|
||||||
'default' => 'img/stationlogo.gif',
|
'default' => 'img/stationlogo.gif',
|
||||||
'required' => TRUE
|
'required' => TRUE,
|
||||||
|
'attributes'=> array('disabled' => 'on')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'rule' => 'regex',
|
'rule' => 'regex',
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
<!-- $Id: smarty-dynamic-fancygroup.tpl,v 1.5 2005/02/25 16:58:26 sebastian Exp $ -->
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td valign="top" align="right">
|
|
||||||
<b{if $element.error} style="color: Red;"{/if}>{if $element.required}<font color="red">*</font>{/if}{$element.label}:</b>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table cellspacing="2" border="0">
|
|
||||||
{foreach key=gkey item=gitem from=$element.elements}
|
|
||||||
<tr>
|
|
||||||
{if $gitem.type eq "radio"}
|
|
||||||
<td colspan="2" class="green">
|
|
||||||
{$gitem.html}
|
|
||||||
</td>
|
|
||||||
{else}
|
|
||||||
<td class="green" align="right">
|
|
||||||
{if $gitem.required}<font color="red">*</font>{/if}
|
|
||||||
{$gitem.label}
|
|
||||||
</td>
|
|
||||||
<td class="green">
|
|
||||||
{$gitem.html}
|
|
||||||
</td>
|
|
||||||
{/if}
|
|
||||||
</tr>
|
|
||||||
{/foreach}
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
|
@ -1,9 +0,0 @@
|
||||||
<!-- $Id: smarty-dynamic-green.tpl,v 1.5 2005/02/25 16:58:26 sebastian Exp $ -->
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td align="right" valign="top" class="green"><b>{$element.label}:</b></td>
|
|
||||||
<td valign="top" align="left" class="green">
|
|
||||||
{if $element.error}<font color="red">{$element.error}</font><br />{/if}
|
|
||||||
{$element.html}{if $element.required}<font color="red">*</font>{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
|
@ -1,134 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<!-- $Id: smarty-dynamic.tpl,v 1.5 2005/02/25 16:58:26 sebastian Exp $ -->
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Smarty template for Array renderer</title>
|
|
||||||
<style type="text/css">
|
|
||||||
{literal}
|
|
||||||
body, td, th {
|
|
||||||
font-family: sans-serif;
|
|
||||||
color: Navy;
|
|
||||||
background-color : #EEE;
|
|
||||||
font-size: smaller;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.maintable {
|
|
||||||
border: thin dashed #D0D0D0;
|
|
||||||
background-color: #EEE;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
color: #FFF;
|
|
||||||
background-color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.green {
|
|
||||||
background-color: #CFC;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
{/literal}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
{$form.javascript}
|
|
||||||
|
|
||||||
<table border="0" class="maintable" align="center">
|
|
||||||
<form{$form.attributes}>{$form.hidden}
|
|
||||||
|
|
||||||
{foreach item=sec key=i from=$form.sections}
|
|
||||||
<tr>
|
|
||||||
<td class="header" colspan="2">
|
|
||||||
<b>{$sec.header}</b></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{foreach item=element from=$sec.elements}
|
|
||||||
|
|
||||||
<!-- elements with alternative layout in external template file-->
|
|
||||||
{if $element.style}
|
|
||||||
{include file="smarty-dynamic-`$element.style`.tpl}
|
|
||||||
|
|
||||||
{*
|
|
||||||
NOTE: Another way ist to have smarty template code in
|
|
||||||
$element.style. In this case you can do:
|
|
||||||
|
|
||||||
{if $element.style}
|
|
||||||
{eval var=$element.style}
|
|
||||||
*}
|
|
||||||
|
|
||||||
<!-- submit or reset button (don't display on frozen forms) -->
|
|
||||||
{elseif $element.type eq "submit" or $element.type eq "reset"}
|
|
||||||
{if not $form.frozen}
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
<td align="left">{$element.html}</td>
|
|
||||||
</tr>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<!-- normal elements -->
|
|
||||||
{else}
|
|
||||||
<tr>
|
|
||||||
{if $element.type eq "textarea"}
|
|
||||||
<td colspan="2">
|
|
||||||
{if $element.required}<font color="red">*</font>{/if}<b>{$element.label}</b><br />
|
|
||||||
{else}
|
|
||||||
<td align="right" valign="top">
|
|
||||||
{if $element.required}<font color="red">*</font>{/if}<b>{$element.label}:</b></td>
|
|
||||||
<td>
|
|
||||||
{/if}
|
|
||||||
{if $element.error}<font color="red">{$element.error}</font><br />{/if}
|
|
||||||
{if $element.type eq "group"}
|
|
||||||
{foreach key=gkey item=gitem from=$element.elements}
|
|
||||||
{$gitem.label}
|
|
||||||
{$gitem.html}{if $gitem.required}<font color="red">*</font>{/if}
|
|
||||||
{if $element.separator}{cycle values=$element.separator}{/if}
|
|
||||||
{/foreach}
|
|
||||||
{else}
|
|
||||||
{$element.html}
|
|
||||||
{/if}
|
|
||||||
<div style="font-size: 80%;">{$element.label_note}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
|
||||||
{/foreach}
|
|
||||||
|
|
||||||
{if $form.requirednote and not $form.frozen}
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
<td valign="top">{$form.requirednote}</td>
|
|
||||||
</tr>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>Collected Errors:</b><br />
|
|
||||||
{foreach key=name item=error from=$form.errors}
|
|
||||||
<font color="red">{$error}</font> in element [{$name}]<br />
|
|
||||||
{/foreach}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><strong>Best Practice: </strong><br />
|
|
||||||
Use only one dynamic form template like this for your <br />
|
|
||||||
Smarty driven project. You include this where <br />
|
|
||||||
to place a form with the formdata-Array rendered by <br />
|
|
||||||
SmartyDynamic QuickForm Renderer as option:</p>
|
|
||||||
|
|
||||||
<pre style="font-size: 12px;">
|
|
||||||
<strong>{ldelim}include file=form-dynamic.tpl form=$formdata{rdelim}</strong>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<p><strong>The used "Dynamic" Array </strong></p>
|
|
||||||
<pre style="font-size: 12px;">
|
|
||||||
{$dynamic_array|htmlentities}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -18,6 +18,16 @@
|
||||||
|
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
{literal}
|
{literal}
|
||||||
|
|
||||||
|
var MData_confirmChangeVisited = false;
|
||||||
|
function MData_confirmChange(element)
|
||||||
|
{
|
||||||
|
//if (MData_confirmChangeVisited) return true;
|
||||||
|
MData_confirmChangeVisited = true;
|
||||||
|
if (confirm("Are you sure you want to change this information?") == false) element.blur();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function MData_loadLang()
|
function MData_loadLang()
|
||||||
{
|
{
|
||||||
{/literal}
|
{/literal}
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
{*Smarty template*}
|
|
||||||
|
|
||||||
{include file="header.tpl"}
|
|
||||||
{$loginform.javascript}
|
|
||||||
|
|
||||||
<center>
|
|
||||||
<div id="login">
|
|
||||||
<form {$loginform.attributes}>
|
|
||||||
{$loginform.hidden}
|
|
||||||
<table>
|
|
||||||
<tr><td align="right">{$loginform.login.label}</td><td>{$loginform.login.html}</td></tr>
|
|
||||||
<tr><td align="right">{$loginform.pass.label}</td><td>{$loginform.pass.html}</td></tr>
|
|
||||||
<tr><td>{$loginform.requirednote}</td><td>{$loginform.Submit.html}</td></tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</center>
|
|
||||||
{include file="footer.tpl"}
|
|
||||||
|
|
|
@ -8,6 +8,15 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{literal}
|
{literal}
|
||||||
|
|
||||||
|
var MData_confirmChangeVisited = false;
|
||||||
|
function MData_confirmChange(element)
|
||||||
|
{
|
||||||
|
//if (MData_confirmChangeVisited) return true;
|
||||||
|
MData_confirmChangeVisited = true;
|
||||||
|
if (confirm("Are you sure you want to change this information?") == false) element.blur();
|
||||||
|
}
|
||||||
|
|
||||||
function MData_submit()
|
function MData_submit()
|
||||||
{
|
{
|
||||||
if (validate_editMetaData(document.forms["editMetaData"])) {
|
if (validate_editMetaData(document.forms["editMetaData"])) {
|
||||||
|
|
|
@ -392,7 +392,10 @@ class uiBrowser extends uiBase {
|
||||||
$mask['pages'][$key][$k]['element'] = $key.'___'.$this->_formElementEncode($v['element']);
|
$mask['pages'][$key][$k]['element'] = $key.'___'.$this->_formElementEncode($v['element']);
|
||||||
$mask['pages'][$key][$k]['attributes'] = array_merge($mask['pages'][$key][$k]['attributes'], array('onChange' => "spread(this, '".$this->_formElementEncode($v['element'])."')"));
|
$mask['pages'][$key][$k]['attributes'] = array_merge($mask['pages'][$key][$k]['attributes'], array('onChange' => "spread(this, '".$this->_formElementEncode($v['element'])."')"));
|
||||||
## load data from GreenBox
|
## load data from GreenBox
|
||||||
$mask['pages'][$key][$k]['default'] = $this->_getMDataValue($id, $v['element'], $langid);
|
if ($getval = $this->_getMDataValue($id, $v['element'], $langid)) {
|
||||||
|
$mask['pages'][$key][$k]['default'] = $getval;
|
||||||
|
$mask['pages'][$key][$k]['attributes']['onFocus'] = 'MData_confirmChange(this)';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$form->addElement('static', NULL, NULL, "<div id='div_$key'>");
|
$form->addElement('static', NULL, NULL, "<div id='div_$key'>");
|
||||||
$this->_parseArr2Form($form, $mask['pages'][$key]);
|
$this->_parseArr2Form($form, $mask['pages'][$key]);
|
||||||
|
|
|
@ -368,7 +368,10 @@ class uiPlaylist
|
||||||
|
|
||||||
foreach ($mask['playlist'] as $k=>$v) {
|
foreach ($mask['playlist'] as $k=>$v) {
|
||||||
$mask['playlist'][$k]['element'] = $this->Base->_formElementEncode($v['element']);
|
$mask['playlist'][$k]['element'] = $this->Base->_formElementEncode($v['element']);
|
||||||
$mask['playlist'][$k]['default'] = $this->Base->_getMDataValue($id, $v['element'], $langid);
|
if ($getval = $this->Base->_getMDataValue($id, $v['element'], $langid)) {
|
||||||
|
$mask['playlist'][$k]['default'] = $getval;
|
||||||
|
$mask['playlist'][$k]['attributes']['onFocus'] = 'MData_confirmChange(this)';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
$form = new HTML_QuickForm('editMetaData', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
$form = new HTML_QuickForm('editMetaData', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
||||||
$this->Base->_parseArr2Form($form, $mask['basics']);
|
$this->Base->_parseArr2Form($form, $mask['basics']);
|
||||||
|
|
Loading…
Reference in New Issue