<?php $__env->startSection('content'); ?>
<div id="window_title" class="page-window active-window">
  <input type="hidden" class="prev_window"/>
  <form id="title_form" action="password/save" method="POST">

  <div class="grid simple">
    <div class="grid-title">
      <h4><span class="semi-bold"><?php echo e(trans('resource.password')); ?></span></h4>
    </div>
    <div class="grid-body">
      <input type="hidden" name="id" value="1"/>
        <div class="row-fluid">
          <div class="span8">
            <div class="control-group">
              <label class="control-label"><?php echo e(trans('resource.password')); ?></label>
              <div class="controls">
                <input type="password" class="span12" name="password" class=""/>
              </div>
            </div>
          </div>
        </div>
        <div class="row-fluid">
          <div class="span4">
            <div class="control-group">
              <label class="control-label"><?php echo e(trans('resource.passwordconf')); ?></label>
              <div class="controls">
                <input type="password" class="span12" name="password_confirmation" class=""/>
              </div>
            </div>
          </div>
        </div>
        <div class="row-fluid">
          <div class="span8">
             <button type="button" class="btn btn-primary btn-cons" onclick="saveContentCat(); return false;">Хадгалах</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</form>
  <script type="text/javascript">
  function saveContentCat(){
    $.ajax({
        url: '/admin/password/save',
        type: "POST",
        dataType: "json",
        data : new FormData($("#title_form")[0]),
        processData: false,  // tell jQuery not to process the data
        contentType: false,  // tell jQuery not to set contentType
        success: function(data){
            if(data.type == 'success'){
              alert(messages.saved);
            }else{
              uvalidate.setErrors(data);
            }
        }
    });
  }

</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>