File "1d88410f6c432b723b8fda2b35f276b5a34a552c_0.file.admin-users-edit.tmpl.php"

Full Path: /srv/www/www.cadoro.it/src/templates_c/1d88410f6c432b723b8fda2b35f276b5a34a552c_0.file.admin-users-edit.tmpl.php
File size: 22.54 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/* Smarty version 3.1.29, created on 2024-02-21 17:52:31
  from "/srv/www/www.cadoro.it/src/templates/admin-users-edit.tmpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_65d62a4f792a40_21978277',
  'file_dependency' => 
  array (
    '1d88410f6c432b723b8fda2b35f276b5a34a552c' => 
    array (
      0 => '/srv/www/www.cadoro.it/src/templates/admin-users-edit.tmpl',
      1 => 1708527642,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:layout-admin.tmpl' => 1,
  ),
),false)) {
function content_65d62a4f792a40_21978277 ($_smarty_tpl) {
if (!is_callable('smarty_function_html_options')) require_once '/srv/www/www.cadoro.it/src/vendor/smarty/smarty/libs/plugins/function.html_options.php';
$_smarty_tpl->ext->_inheritance->init($_smarty_tpl, true);
?>

<html>
  <body>
    <?php 
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "breadcrumbs", array (
  0 => 'block_81062051465d62a4f6f0ba4_99156129',
  1 => false,
  3 => 0,
  2 => 0,
));
?>

    <?php 
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "content", array (
  0 => 'block_40139145265d62a4f6f45d7_75690106',
  1 => false,
  3 => 0,
  2 => 0,
));
?>

  </body>
</html>
<?php $_smarty_tpl->ext->_inheritance->endChild($_smarty_tpl);
$_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, "file:layout-admin.tmpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 2, false);
}
/* {block 'breadcrumbs'}  file:admin-users-edit.tmpl */
function block_81062051465d62a4f6f0ba4_99156129($_smarty_tpl, $_blockParentStack) {
?>

    <div class="breadcrumbs">
      <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users">Utenti registrati</a> <span class="divider">&raquo;</span>
      <strong><?php echo $_smarty_tpl->tpl_vars['user']->value['lastname'];?>
 <?php echo $_smarty_tpl->tpl_vars['user']->value['firstname'];?>
</strong>
    </div>
    <?php
}
/* {/block 'breadcrumbs'} */
/* {block 'content'}  file:admin-users-edit.tmpl */
function block_40139145265d62a4f6f45d7_75690106($_smarty_tpl, $_blockParentStack) {
?>

    <div class="sheet">
      <div class="sheet-header">
        <h1>
          Modifica utente
          <small><?php echo $_smarty_tpl->tpl_vars['user']->value['lastname'];?>
 <?php echo $_smarty_tpl->tpl_vars['user']->value['firstname'];?>
</small>
        </h1>
      </div>
      <div class="sheet-body">
        <?php if ($_smarty_tpl->tpl_vars['status']->value == 1) {?>
        <div class="alert alert-success">
          <strong>Le modifiche sono state salvate correttamente.</strong>
          <?php if ($_smarty_tpl->tpl_vars['user']->value['card']) {?>
          <p class="mt5">
            <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users/<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
?pdf=1" class="btn btn-default">Stampa PDF</a>
          </p>
          <?php }?>
        </div>
        <?php } elseif ($_smarty_tpl->tpl_vars['status']->value == 2) {?>
        <div class="alert alert-danger">
          <strong>Prima di procedere con la stampa del PDF è necessario inserire un numero tessera.</strong>
        </div>
        <?php }?>
        <form class="form-horizontal" method="post" action="">
          <fieldset>
            <legend>Dati utente</legend>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['card'])) {?> has-error<?php }?>">
              <label class="control-label col-md-2" for="card">Tessera</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="card" name="card" value="<?php echo _f('card',$_smarty_tpl->tpl_vars['user']->value);?>
" <?php if ((_a($_smarty_tpl->tpl_vars['user']->value,'card') || !$_smarty_tpl->tpl_vars['user']->value['active'] || $_smarty_tpl->tpl_vars['user']->value['deleted_at']) && $_smarty_tpl->tpl_vars['principal']->value['role'] != 1) {?> readonly<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['card']) && $_smarty_tpl->tpl_vars['errors']->value['card'] == 1) {?><p class="help-block has-error">Questo numero tessera non corrisponde al punto vendita!</p><?php }?>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['card']) && $_smarty_tpl->tpl_vars['errors']->value['card'] == 2) {?><p class="help-block has-error">Questo numero tessera ha già un'anagrafica associata!</p><?php }?>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['card']) && $_smarty_tpl->tpl_vars['errors']->value['card'] == 3) {?><p class="help-block has-error">Numero carta non trovato</p><?php }?>
                <?php if (!$_smarty_tpl->tpl_vars['user']->value['card'] && $_smarty_tpl->tpl_vars['user']->value['store'] && false) {?>
                <div class="mt10">
                  <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users/<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
?card=new" class="btn btn-default">Assegna una nuova card</a>
                </div>
                <?php }?>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2" for="lastname">Cognome</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="lastname" name="lastname" value="<?php echo _f('lastname',$_smarty_tpl->tpl_vars['user']->value);?>
" readonly>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2" for="firstname">Nome</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="firstname" name="firstname" value="<?php echo _f('firstname',$_smarty_tpl->tpl_vars['user']->value);?>
" readonly>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2" for="email">Email</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="email" name="email" value="<?php echo _f('email',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2" for="password">Password</label>
              <div class="controls col-md-10">
                <input type="password" class="form-control" id="password" name="password" value=""<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['phone'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="phone">Telefono</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="phone" name="phone" value="<?php echo _f('phone',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['phone'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['mobile'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="mobile">Cellulare</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="mobile" name="mobile" value="<?php echo _f('mobile',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['mobile'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['birthday'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="birthday">Data di nascita</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="birthday" name="birthday" value="<?php echo _fd('birthday',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php } else { ?> data-behaviour="datepicker"<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['birthday'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['gender'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="gender">Sesso</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="gender" name="gender" value="<?php echo _f('gender',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['gender'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
          </fieldset>
          <fieldset class="mt30">
            <legend>Indirizzo</legend>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['address'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="address">Indirizzo</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="address" name="address" value="<?php echo _f('address',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['address'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['address_no'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="address_no">Civico</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="address_no" name="address_no" value="<?php echo _f('address_no',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['address_no'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['province'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="province">Provincia</label>
              <div class="controls col-md-10">
                <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?>
                <input type="hidden" name="province" value="<?php echo _f('province',$_smarty_tpl->tpl_vars['user']->value);?>
">
                <input type="text" class="form-control" value="<?php echo _v(_f('province',$_smarty_tpl->tpl_vars['user']->value),$_smarty_tpl->tpl_vars['PROVINCES']->value);?>
" readonly>
                <?php } else { ?>
                <select name="province" id="province" class="form-control">
                  <option value=""></option>
                  <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['PROVINCES']->value,'selected'=>_f('province',$_smarty_tpl->tpl_vars['user']->value)),$_smarty_tpl);?>

                </select>
                <?php }?>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['province'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['city'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="city">Città</label>
              <div class="controls col-md-10">
                <input type="text" name="city" id="city_text" class="form-control" value="<?php echo _f('city',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['city'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['zipcode'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="zipcode">CAP</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="zipcode" name="zipcode" value="<?php echo _f('zipcode',$_smarty_tpl->tpl_vars['user']->value);?>
"<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> readonly<?php }?>>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['zipcode'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['country'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="country">Nazione</label>
              <div class="controls col-md-10">
                <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?>
                <input type="hidden" name="country" value="<?php echo _f('country',$_smarty_tpl->tpl_vars['user']->value);?>
">
                <input type="text" class="form-control" value="<?php echo _v(_f('country',$_smarty_tpl->tpl_vars['user']->value),$_smarty_tpl->tpl_vars['COUNTRIES']->value);?>
" readonly>
                <?php } else { ?>
                <select name="country" id="country" class="form-control">
                  <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['COUNTRIES']->value,'selected'=>_f('country',$_smarty_tpl->tpl_vars['user']->value)),$_smarty_tpl);?>

                </select>
                <?php }?>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['country'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['store'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="store">Punto vendita</label>
              <div class="controls col-md-10">
                <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?>
                <input type="hidden" name="store" value="<?php echo _f('store',$_smarty_tpl->tpl_vars['user']->value);?>
">
                <input type="text" class="form-control" value="<?php echo _v(_f('store',$_smarty_tpl->tpl_vars['user']->value),$_smarty_tpl->tpl_vars['stores']->value);?>
" readonly>
                <?php } else { ?>
                <select name="store" id="store" class="form-control">
                  <option value=""></option>
                  <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['stores']->value,'selected'=>_f('store',$_smarty_tpl->tpl_vars['user']->value)),$_smarty_tpl);?>

                </select>
                <?php }?>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['store'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
          </fieldset>
          <fieldset class="mt30">
            <legend>Attivazione e consensi privacy</legend>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['active'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="active">Attivo</label>
              <div class="controls col-md-10">
                <div class="checkbox">
                  <label>
                    <input type="checkbox" name="active" value="<?php echo max($_smarty_tpl->tpl_vars['user']->value['active'],1);?>
"<?php if (_f('active',$_smarty_tpl->tpl_vars['user']->value)) {?> checked="checked"<?php }
if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> disabled<?php }?>>
                  </label>
                </div>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['active'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['privacy'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="privacy">Accetta privacy</label>
              <div class="controls col-md-10">
                <div class="checkbox">
                  <label>
                    <input type="checkbox" name="privacy" value="1"<?php if (_f('privacy',$_smarty_tpl->tpl_vars['user']->value)) {?> checked="checked"<?php }
if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> disabled<?php }?>>
                  </label>
                </div>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['privacy'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['privacy1'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="privacy1">Pubblicitario/Promozionale </label>
              <div class="controls col-md-10">
                <div class="checkbox">
                  <label>
                    <input type="checkbox" name="privacy1" value="1"<?php if (_f('privacy1',$_smarty_tpl->tpl_vars['user']->value)) {?> checked="checked"<?php }
if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> disabled<?php }?>>
                  </label>
                </div>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['privacy1'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['privacy2'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="privacy2">Offerte personalizzate</label>
              <div class="controls col-md-10">
                <div class="checkbox">
                  <label>
                    <input type="checkbox" name="privacy2" value="1"<?php if (_f('privacy2',$_smarty_tpl->tpl_vars['user']->value)) {?> checked="checked"<?php }
if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> disabled<?php }?>>
                  </label>
                </div>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['privacy2'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['privacy3'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="privacy3">Ricerche di mercato</label>
              <div class="controls col-md-10">
                <div class="checkbox">
                  <label>
                    <input type="checkbox" name="privacy3" value="1"<?php if (_f('privacy3',$_smarty_tpl->tpl_vars['user']->value)) {?> checked="checked"<?php }
if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> disabled<?php }?>>
                  </label>
                </div>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['privacy3'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
          </fieldset>
          <fieldset class="mt30">
            <legend>Mobile app</legend>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['app_token'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="app_token">Token</label>
              <div class="controls col-md-10">
                <input type="text" class="form-control" id="app_token" name="app_token" value="<?php echo _f('app_token',$_smarty_tpl->tpl_vars['user']->value);?>
">
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['app_token'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['app_notifications'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="app_notifications">Notifiche</label>
              <div class="controls col-md-10">
                <div class="checkbox">
                  <label>
                    <input type="checkbox" name="app_notifications" value="1"<?php if (_f('app_notifications',$_smarty_tpl->tpl_vars['user']->value)) {?> checked="checked"<?php }
if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 2) {?> disabled<?php }?>>
                  </label>
                </div>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['app_notifications'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
            <div class="form-group<?php if (isset($_smarty_tpl->tpl_vars['errors']->value['app_details'])) {?> error<?php }?>">
              <label class="control-label col-md-2" for="app_details">Dettagli</label>
              <div class="controls col-md-10">
                <textarea class="form-control" id="app_details" name="app_details"><?php echo _json_encode(_f('app_details',$_smarty_tpl->tpl_vars['user']->value));?>
</textarea>
                <?php if (isset($_smarty_tpl->tpl_vars['errors']->value['app_details'])) {?><p class="help-block error">Campo obbligatorio!</p><?php }?>
              </div>
            </div>
          </fieldset>
          <div class="form-group mt30"><div class="col-md-offset-2 col-md-10">
            <button type="submit" class="btn btn-primary">Salva le modifiche</button>
            <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users" class="btn btn-default">Annulla</a>
          </div></div>
        </form>
      </div>
    </div>
    <?php
}
/* {/block 'content'} */
}