From 3549e0c49d976babeb810f10b538dfa8450cff34 Mon Sep 17 00:00:00 2001 From: iglocska Date: Mon, 3 Jun 2013 12:29:07 +0200 Subject: [PATCH] More UI changes --- app/View/Events/contact.ctp | 4 + app/View/Events/view.ctp | 18 ++--- app/View/ShadowAttributes/add.ctp | 80 +++++++++++++------- app/View/ShadowAttributes/add_attachment.ctp | 68 ++++++++++++----- 4 files changed, 116 insertions(+), 54 deletions(-) diff --git a/app/View/Events/contact.ctp b/app/View/Events/contact.ctp index 1c8418e1c..8ac364a29 100755 --- a/app/View/Events/contact.ctp +++ b/app/View/Events/contact.ctp @@ -1,3 +1,7 @@ +request->data['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $this->request->data['Event']['orgc'] == $me['org'])); +$mayPublish = ($isAclPublish && $this->request->data['Event']['orgc'] == $me['org']); +?>
Form->create('Event');?>
diff --git a/app/View/Events/view.ctp b/app/View/Events/view.ctp index e18c87b32..7e4271606 100755 --- a/app/View/Events/view.ctp +++ b/app/View/Events/view.ctp @@ -20,8 +20,6 @@ $mayPublish = ($isAclPublish && $event['Event']['orgc'] == $me['org']);
  • Form->postLink('Publish Event', array('action' => 'alert', $event['Event']['id']), null, 'Are you sure this event is complete and everyone should be informed?'); ?>
  • Form->postLink('Publish (no email)', array('action' => 'publish', $event['Event']['id']), null, 'Publish but do NOT send alert email? Only for minor changes!'); ?>
  • - -
  • Not published
  • @@ -94,21 +92,21 @@ endif; ?>   -
    Distribution
    -
    - -   -
    - +
    Info
     
    +
    Published
    +
    + +   +

    diff --git a/app/View/ShadowAttributes/add.ctp b/app/View/ShadowAttributes/add.ctp index 7f249229f..9d82a6bb0 100644 --- a/app/View/ShadowAttributes/add.ctp +++ b/app/View/ShadowAttributes/add.ctp @@ -3,36 +3,62 @@ Form->create('ShadowAttribute');?>
    -Form->hidden('event_id'); -echo $this->Form->input('category', array( - 'between' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeCategoryDiv')), - 'empty' => '(choose one)' + Form->hidden('event_id'); + echo $this->Form->input('category', array( + 'after' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeCategoryDiv')), + 'empty' => '(choose one)', + 'div' => 'input' + )); + echo $this->Form->input('type', array( + 'after' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeTypeDiv')), + 'empty' => '(first choose category)' + )); + ?> +
    + Form->input('value', array( + 'type' => 'textarea', + 'error' => array('escape' => false), + 'class' => 'input-xxlarge clear' )); -echo $this->Form->input('type', array( - 'between' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeTypeDiv')), - 'empty' => '(first choose category)' + ?> +
    + Form->input('batch_import', array( + 'type' => 'checkbox', + 'after' => $this->Html->div('forminfo', 'Create multiple attributes one per line'), )); -echo $this->Form->input('to_ids', array( - 'checked' => true, - 'before' => $this->Html->div('forminfo', isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc']), - 'label' => 'IDS Signature?' -)); -echo $this->Form->input('batch_import', array( - 'type' => 'checkbox', - 'after' => $this->Html->div('forminfo', 'Create multiple attributes one per line'), -)); -echo $this->Form->input('value', array( - 'type' => 'textarea', - 'error' => array('escape' => false), -)); - -// link an onchange event to the form elements -$this->Js->get('#ShadowAttributeCategory')->event('change', 'formCategoryChanged("#ShadowAttributeCategory")'); -$this->Js->get('#ShadowAttributeType')->event('change', 'showFormInfo("#ShadowAttributeType")'); -?> + echo $this->Form->input('to_ids', array( + 'checked' => true, + 'after' => $this->Html->div('forminfo', isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc']), + 'label' => 'IDS Signature?', + )); + // link an onchange event to the form elements + $this->Js->get('#ShadowAttributeCategory')->event('change', 'formCategoryChanged("#ShadowAttributeCategory")'); + $this->Js->get('#ShadowAttributeType')->event('change', 'showFormInfo("#ShadowAttributeType")'); + ?>
    -Form->end(__('Submit'));?> +Form->button('Propose', array('class' => 'btn btn-primary')); + echo $this->Form->end(); +?> +
    +
    +