<?php /* Smarty version Smarty-3.1.11, created on 2026-03-02 00:25:11
         compiled from "..\views\default\currencyview\add.html" */ ?>
<?php /*%%SmartyHeaderCode:2985069a4bcc7e56451-92562993%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd056a8ac1ff55575bf34f808a7d55bbacb02552d' => 
    array (
      0 => '..\\views\\default\\currencyview\\add.html',
      1 => 1752437506,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2985069a4bcc7e56451-92562993',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'Programsettingdata' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_69a4bcc7f351c9_92596629',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_69a4bcc7f351c9_92596629')) {function content_69a4bcc7f351c9_92596629($_smarty_tpl) {?>

<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">خصائص عامة</a></li>
            <li><a href="currencyController.php?do=show">العملات</a></li>
            <li class="active">اضافة </li>
        </ol>


        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">اضافة </h3>
            </div>
            <div class="panel-body">


                
                <form id="myform" class="nameToBeChecked form-horizontal" role="form" action="currencyController.php?do=add" method="post" >

                    




                    <div class="form-group">
                        <label class="col-lg-2 control-label">اسم العملة</label>
                        <div class="col-lg-4">
                            <span id="sprytextfield1">
                                <input type="text" name="name" id="name" class="form-control" />
                                <span class="textfieldRequiredMsg">*</span></span>
                            <div id="nameError" style="display:none"></div>
                        </div>
                    </div>

                    <!-- =================================================   -->




                    <div class="form-group">
                        <label class="col-lg-2 control-label">رمز العملة</label>
                        <div class="col-lg-4">

                            <input type="text" name="symbol" id="symbol" class="form-control " />

                        </div>
                    </div>


                    <!-- =================================================   -->



                    <div class="form-group">
                        <label class="col-lg-2 control-label">معامل التحويل</label>
                        <div class="col-lg-4">
                            <span id="sprytextfield2">
                                <input type="text" name="conversionFactor" id="conversionFactor" class="form-control positivefloat calcOther" style="display: inline-block;width: 34%"/>
                                <span class="textfieldRequiredMsg">*</span></span>
                            =
                            <div class="input-group" style="display: inline;">
                                <input type="text" name="othercFactor" id="othercFactor" class="form-control positivefloat calcOther" style="display: inline-block;width: 34%">
                                <span class="input-group-addon" style="display: inline-block;width: 23%"><?php echo $_smarty_tpl->tpl_vars['Programsettingdata']->value->currancy;?>
</span>
                            </div>
                        </div>

                    </div>

                    <!-- =================================================   -->

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="submit"  id="savebtn" class="btn btn-primary pull-left">حفظ الامر</button>
                        </div>
                    </div>


                </form>
            </div>
        </div>




    </div>
</div>




<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    $('.calcOther').live('keyup', function () {
        var val = Number($(this).val());
        if (val == 0) {
            var otherVal = 0;
        } else {
            var otherVal = Number((1 / val).toFixed(10));
        }
        if ($(this).attr('id') == 'conversionFactor') {
            $('#othercFactor').val(otherVal);
        } else {
            $('#conversionFactor').val(otherVal);
        }

    });
</script>

<?php }} ?>