{{!
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
}}


<div class="modal chmodal" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title">Edit permission</h4>
      </div>
      <div class="modal-body">

        <form class="form-horizontal" role="form">
          <div class="form-group">
            <label class="col-sm-2 control-label">User</label>
            <div class="col-sm-10">
              <div class="btn-group" data-toggle="buttons">
                <label {{bind-attr class=":btn :btn-sm usrR:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=usrR}} <span>Read</span>
                </label>
                <label {{bind-attr class=":btn :btn-sm usrW:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=usrW}} <span>Write</span>
                </label>
                <label {{bind-attr class=":btn :btn-sm usrE:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=usrE}} <span>Execute</span>
                </label>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">Group</label>
            <div class="col-sm-10">
              <div class="btn-group" data-toggle="buttons">
                <label {{bind-attr class=":btn :btn-sm grpR:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=grpR}} <span>Read</span>
                </label>
                <label {{bind-attr class=":btn :btn-sm grpW:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=grpW}} <span>Write</span>
                </label>
                <label {{bind-attr class=":btn :btn-sm grpE:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=grpE}} <span>Execute</span>
                </label>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">Other</label>
            <div class="col-sm-10">
              <div class="btn-group" data-toggle="buttons">
                <label {{bind-attr class=":btn :btn-sm otrR:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=otrR}} <span>Read</span>
                </label>
                <label {{bind-attr class=":btn :btn-sm otrW:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=otrW}} <span>Write</span>
                </label>
                <label {{bind-attr class=":btn :btn-sm otrE:btn-primary:btn-default :btn-chmod" }} >
                  {{input type="checkbox" checked=otrE}} <span>Execute</span>
                </label>
              </div>
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
              <div class="checkbox">
                <label>
                  {{input type="checkbox"}} <span> Modify recursively</span>
                </label>
              </div>
            </div>
          </div>
        </form>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" {{action 'close' target="view"}}>Close</button>
        <button type="button" class="btn btn-primary" {{action 'confirm' target="view"}}>Save changes</button>
      </div>
    </div>
  </div>
</div>
