Improves in UI when editing a category

This commit is contained in:
Diego Najar 2018-11-01 20:25:17 -03:00
parent 4ba177cf53
commit c668d4ace1
1 changed files with 6 additions and 7 deletions

View File

@ -19,7 +19,7 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'value'=>$categoryMap['key'] 'value'=>$categoryMap['key']
)); ));
echo Bootstrap::formInputTextBlock(array( echo Bootstrap::formInputText(array(
'name'=>'name', 'name'=>'name',
'label'=>$L->g('Name'), 'label'=>$L->g('Name'),
'value'=>$categoryMap['name'], 'value'=>$categoryMap['name'],
@ -28,7 +28,7 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formTextareaBlock(array( echo Bootstrap::formTextarea(array(
'name'=>'description', 'name'=>'description',
'label'=>$L->g('Description'), 'label'=>$L->g('Description'),
'value'=>isset($categoryMap['description'])?$categoryMap['description']:'', 'value'=>isset($categoryMap['description'])?$categoryMap['description']:'',
@ -38,7 +38,7 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'rows'=>3 'rows'=>3
)); ));
echo Bootstrap::formInputTextBlock(array( echo Bootstrap::formInputText(array(
'name'=>'template', 'name'=>'template',
'label'=>$L->g('Template'), 'label'=>$L->g('Template'),
'value'=>isset($categoryMap['template'])?$categoryMap['template']:'', 'value'=>isset($categoryMap['template'])?$categoryMap['template']:'',
@ -47,21 +47,20 @@ echo Bootstrap::formOpen(array('id'=>'jsform'));
'tip'=>'' 'tip'=>''
)); ));
echo Bootstrap::formInputGroupText(array( echo Bootstrap::formInputText(array(
'name'=>'newKey', 'name'=>'newKey',
'label'=>$L->g('Friendly URL'), 'label'=>$L->g('Friendly URL'),
'labelInside'=>DOMAIN_CATEGORIES,
'value'=>$categoryMap['key'], 'value'=>$categoryMap['key'],
'class'=>'', 'class'=>'',
'placeholder'=>'', 'placeholder'=>'',
'tip'=>'' 'tip'=>DOMAIN_CATEGORIES.$categoryMap['key']
)); ));
echo ' echo '
<div class="form-group mt-4"> <div class="form-group mt-4">
<button type="submit" class="btn btn-primary">'.$L->g('Save').'</button> <button type="submit" class="btn btn-primary">'.$L->g('Save').'</button>
<button type="button" class="btn btn-danger" data-toggle="modal" data-target="#jsdeleteModal">'.$L->g('Delete').'</button>
<a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'categories" role="button">'.$L->g('Cancel').'</a> <a class="btn btn-secondary" href="'.HTML_PATH_ADMIN_ROOT.'categories" role="button">'.$L->g('Cancel').'</a>
<button type="button" class="btn btn-secondary" data-toggle="modal" data-target="#jsdeleteModal">'.$L->g('Delete').'</button>
</div> </div>
'; ';