* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 *
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 *
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/

*}
<?php 
echo smarty_function_sugarvar(array('key' => 'value'), $this);
    echo smarty_function_sugarvar(array('key' => 'name'), $this);
    ?>
" id="btn_clr_<?php 
    echo smarty_function_sugarvar(array('key' => 'name'), $this);
    ?>
" tabindex="<?php 
    echo $this->_tpl_vars['tabindex'];
    ?>
" title="{sugar_translate label="<?php 
    echo $this->_tpl_vars['displayParams']['accessKeyClearTitle'];
    ?>
"}" class="button lastChild" onclick="this.form.<?php 
    echo smarty_function_sugarvar(array('key' => 'name'), $this);
    ?>
.value = ''; this.form.<?php 
    echo smarty_function_sugarvar(array('memberName' => 'vardef.id_name', 'key' => 'name'), $this);
    ?>
.value = '';" value="{sugar_translate label="<?php 
    echo $this->_tpl_vars['displayParams']['accessKeyClearLabel'];
    ?>
"}" <?php 
    if (isset($this->_tpl_vars['displayParams']['javascript']['btn_clear'])) {
        echo $this->_tpl_vars['displayParams']['javascript']['btn_clear'];
    }
    ?>
><img src="{sugar_getimagepath file="id-ff-clear.png"}"></button>
</span>
<?php 
}
?>
   <?php 
    $this->assign('idname', $this->_tpl_vars['displayParams']['idName']);
}
?>

{if strlen(<?php 
echo smarty_function_sugarvar(array('key' => 'value', 'string' => true), $this);
?>
) <= 0}
{assign var="value" value=<?php 
echo smarty_function_sugarvar(array('key' => 'default_value', 'string' => true), $this);
?>
 }
{else}
{assign var="value" value=<?php 
echo smarty_function_sugarvar(array('key' => 'value', 'string' => true), $this);
?>
 }
{/if}  

<input type='text' name='<?php 
echo $this->_tpl_vars['idname'];
?>
' id='<?php 
echo $this->_tpl_vars['idname'];
?>
' size='<?php 
echo is_array($_tmp = @$this->_tpl_vars['displayParams']['size']) ? $this->_run_mod_handler('default', true, $_tmp, 30) : smarty_modifier_default($_tmp, 30);
?>
' <?php 
if (isset($this->_tpl_vars['displayParams']['maxlength'])) {
echo $this->_tpl_vars['idname'];
?>
" name="<?php 
echo $this->_tpl_vars['idname'];
?>
" value="{$fields[<?php 
echo smarty_function_sugarvar(array('key' => 'name', 'stringFormat' => true), $this);
?>
].value}">
<script type="text/javascript" src="{sugar_getjspath file="include/SugarFields/Fields/Datetimecombo/Datetimecombo.js"}"></script>
<script type="text/javascript">
var combo_<?php 
echo $this->_tpl_vars['idname'];
?>
 = new Datetimecombo("{$fields[<?php 
echo smarty_function_sugarvar(array('key' => 'name', 'stringFormat' => true), $this);
?>
].value}", "<?php 
echo $this->_tpl_vars['idname'];
?>
", "{$TIME_FORMAT}", "<?php 
echo $this->_tpl_vars['tabindex'];
?>
", '<?php 
echo $this->_tpl_vars['displayParams']['showNoneCheckbox'];
?>
', false, true);
//Render the remaining widget fields
text = combo_<?php 
echo $this->_tpl_vars['idname'];
?>
{if strval(<?php 
echo smarty_function_sugarvar(array('key' => 'value', 'stringFormat' => 'false'), $this);
?>
) == "1" || strval(<?php 
echo smarty_function_sugarvar(array('key' => 'value', 'stringFormat' => 'false'), $this);
?>
) == "yes" || strval(<?php 
echo smarty_function_sugarvar(array('key' => 'value', 'stringFormat' => 'false'), $this);
?>
) == "on"} 
{assign var="checked" value="CHECKED"}
{else}
{assign var="checked" value=""}
{/if}
<input type="checkbox" class="checkbox" name="<?php 
echo smarty_function_sugarvar(array('key' => 'name'), $this);
?>
" id="<?php 
echo smarty_function_sugarvar(array('key' => 'name'), $this);
?>
" value="<?php 
echo smarty_function_sugarvar(array('key' => 'value', 'stringFormat' => 'false'), $this);
?>
" disabled="true" {$checked}>
<?php 
if (!empty($this->_tpl_vars['displayParams']['enableConnectors'])) {
    echo smarty_function_sugarvar_connector(array('view' => 'DetailView'), $this);
    ?>
 
<?php 
}
        echo $this->_tpl_vars['tabindex'];
        ?>
" title="{sugar_translate label="<?php 
        echo $this->_tpl_vars['displayParams']['accessKeyClearTitle'];
        ?>
"}"  class="button lastChild"
onclick="SUGAR.clearRelateField(this.form, '<?php 
        echo $this->_tpl_vars['idname'];
        ?>
', '<?php 
        if (!empty($this->_tpl_vars['displayParams']['idName'])) {
            echo $this->_tpl_vars['displayParams']['idName'];
            ?>
_<?php 
        }
        echo smarty_function_sugarvar(array('key' => 'id_name'), $this);
        ?>
');"  value="{sugar_translate label="<?php 
        echo $this->_tpl_vars['displayParams']['accessKeyClearLabel'];
        ?>
"}" <?php 
        if (isset($this->_tpl_vars['displayParams']['javascript']['btn_clear'])) {
            echo $this->_tpl_vars['displayParams']['javascript']['btn_clear'];
        }
        ?>
><img src="{sugar_getimagepath file="id-ff-clear.png"}"></button>
<?php 
    }
    ?>
</span>
<?php